View Full Version : Change the number of products per row
stubiewan
20-Feb-2003, 09:02 AM
Hi, has anyone been able to change the number of products displyed per row in v6 as you could in previous versions?
This is a v5 site done with 4 products in a row,
Chan Abbott Studios (http://www.chanabbottstudios.co.uk)
Sorry have no v6 site to show yet.
Many thanks
Stubiewan
stubiewan
20-Feb-2003, 04:20 PM
I now have 2 or 3 or 4 products in a row!!!!
Only thing is and I don't know if this is related, I now get an error when I add an item to the cart using the options to choose quantity on page or on confirm page (not when in shopping cart).
http://www.goldcare.co.uk/acatalog/home.html
If you want the code I used for extra products please let me know.
Any help with the above would be great.
cdicken
21-Feb-2003, 08:06 AM
It is going to be trickier with v6 because as well as making sure that you start each product with NETQUOTEVAR:ENDSEPARATOR and ending each product with NETQUOTEVAR:NEXT you have also got to make sure the new NETQUOTEVAR:PRODUCTFORMBEGIN and NETQUOTEVAR:PRODUCTFORMEND tags are in there.
The following code structure should work in a Product Layout tempate to lay out three products in a row:
NETQUOTEVAR:ENDSEPARATOR
NETQUOTEVAR:PRODUCTFORMBEGIN
<tr>
<td>
[product code]
</td>
NETQUOTEVAR:PRODUCTFORMEND
NETQUOTEVAR:NEXT
NETQUOTEVAR:ENDSEPARATOR
NETQUOTEVAR:PRODUCTFORMBEGIN
<td>
[product code]
</td>
NETQUOTEVAR:PRODUCTFORMEND
NETQUOTEVAR:NEXT
NETQUOTEVAR:ENDSEPARATOR
NETQUOTEVAR:PRODUCTFORMBEGIN
<td>
[product code]
</td>
</tr>
NETQUOTEVAR:PRODUCTFORMEND
NETQUOTEVAR:NEXT
Naturally, you need to replace [product code] with code for inserting a product into the HTML. This would be a self contained HTML table that lays out one product in a compact way.
stubiewan
21-Feb-2003, 08:27 AM
Many Thanks,
That was the code I ended up with last night :)
Stubiewan
NormanRouxel
21-Feb-2003, 11:01 AM
You may want to check what will happen if you don't have the final column full. You will miss the final </tr> tag. When I did my version I put a </tr> into Act_ProductBody.html just before the </table> so that things would work out in that case.
It will still generate slightly dodgy HTML as you will get two </tr> tags on a fully filled final line but that seems better than omitting one.
Norman
stubiewan
21-Feb-2003, 11:21 AM
Thanks Norman,
hadn't noticed that, as it was working okay in IE6 and we had not yet tested NN or earlier IE.
Stubiewan
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.