Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-ASP 7.0 Questions
 Feature Formatting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bducolon
Starting Member

41 Posts

Posted - July 21 2013 :  11:21:23  Show Profile  Reply with Quote
I am trying to add colour swatches to knitted prodcuts. I have them as radio buttons, but they list in a single column. Since I have, in some cases 20 colours, I need to change the formatting so that they can appear in multiple columns and rows as follows:

red blue green dark green
black light blue dark green purple

with the colour swatches beside.

Does anyone know where to do this?

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - July 31 2013 :  03:45:08  Show Profile  Reply with Quote
Hi,

open the file shopproductfeaturesgenerate.asp and find this sub:

'' Generate radio buttons
sub GenerateButton (dbc)

You can alter the way the features table displays here.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

bducolon
Starting Member

41 Posts

Posted - August 03 2013 :  21:29:43  Show Profile  Reply with Quote
I had found that, but I can not get the logic correct. It displays as a single column only. Any idead on how to correct that?
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - August 05 2013 :  06:19:34  Show Profile  Reply with Quote
The logic is as follows:
The sub first writes a table tag to create a table for the features then writes the features header inside this table. It then creates another table within this first one to hold all the feature values. For each feature value it creates a new row. When it gets to the last feature it ends the row and the 2 tables.
So you just need to stop it from writing the <tr> tags until after it displays the last feature.

Regards,
Carrol
www.deanston-electrical.co.uk
Go to Top of Page

bducolon
Starting Member

41 Posts

Posted - August 05 2013 :  11:15:40  Show Profile  Reply with Quote
But then I would have one long row instead of one long column. I need this to add a row, then cells for the radio button colour swatch and name of colour and repeat that for 4 colours. Then change rows and do the same. The idea is to have no more than 4 colours on a row.
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - August 06 2013 :  03:34:38  Show Profile  Reply with Quote
You could also add a variable to hold the number of features and when it gets to 4 it writes the </td></tr>, resets to zero and starts again until all feature records are read.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

bducolon
Starting Member

41 Posts

Posted - August 06 2013 :  19:44:23  Show Profile  Reply with Quote
It''s been a long time since I took asp programming, but what I think you''re talking about is a do while loop. Is that it? Could you provide me with a sample code?
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - August 07 2013 :  07:38:32  Show Profile  Reply with Quote
The forum seems to really mess up code now. I tried to post my custom features sub but it removes all sorts of things and I can''t get the html switched on.
However here is a link to a test screen shot of the features with colour swatches with the column count set to 3
http://www.deanston-electrical.co.uk/TestScreenShot.htm

Send me a note through our website contact us page if you would like the code

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

bducolon
Starting Member

41 Posts

Posted - August 07 2013 :  21:24:50  Show Profile  Reply with Quote
I sent the request earlier today.
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - August 08 2013 :  03:54:18  Show Profile  Reply with Quote
Just got the request (I''m in the UK and I finish work at 5pm GMT) and code has been sent. Any problems, just ask.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00