Author |
Topic  |
|
bducolon
Starting Member
41 Posts |
Posted - July 21 2013 : 11:21:23
|
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
|
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 |
 |
|
bducolon
Starting Member
41 Posts |
Posted - August 03 2013 : 21:29:43
|
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? |
 |
|
carfin
VP-CART Expert
  
United Kingdom
948 Posts |
Posted - August 05 2013 : 06:19:34
|
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 |
 |
|
bducolon
Starting Member
41 Posts |
Posted - August 05 2013 : 11:15:40
|
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. |
 |
|
carfin
VP-CART Expert
  
United Kingdom
948 Posts |
Posted - August 06 2013 : 03:34:38
|
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 |
 |
|
bducolon
Starting Member
41 Posts |
Posted - August 06 2013 : 19:44:23
|
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? |
 |
|
carfin
VP-CART Expert
  
United Kingdom
948 Posts |
Posted - August 07 2013 : 07:38:32
|
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 |
 |
|
bducolon
Starting Member
41 Posts |
Posted - August 07 2013 : 21:24:50
|
I sent the request earlier today. |
 |
|
carfin
VP-CART Expert
  
United Kingdom
948 Posts |
Posted - August 08 2013 : 03:54:18
|
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 |
 |
|
|
Topic  |
|