| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
3 column layout with thumbnail for Related Products | ||||
|
|
Thread Tools | Search this Thread |
#41
|
|||||||
|
|||||||
Re: 3 column layout with thumbnail for Related Products
thanks!
|
|||||||
#42
|
|||||||
|
|||||||
Re: 3 column layout with thumbnail for Related Products
Does anyone know how to make this snippet XHTML compliant? The code works fine until you have more than one row of related products.
Currently, the code ends a table row only when we reach the last row of related products Code:
I need the code to add the appropriate </tr> tag before starting a new <tr>. Any ideas anyone? I tried pinching the appropriate code from subcategories.tpl (which correctly adds </tr> after each row), but my limited coding skills just left me confused
__________________
xcart v4.1.2 [unix] |
|||||||
#43
|
|||||||
|
|||||||
Re: 3 column layout with thumbnail for Related Products
I'm a bit lost about what you are trying to do exactly. The code I have allows a maximum of three products per row, then creates a new row.
How about this? { if %cat_num.3 } </tr> {/if} { if %cat_num.last% } </tr></table> {/if} {/section} {/capture} I'm guessing at the "3" in { if %cat_num.3 } as I don't know much about Smarty either, but presumably it would then insert a </tr> after the third item? If your code doesn't add a </tr> after each row, then how does it create a second row? Isn't that impossible without the </tr> tag being there somehow?
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#44
|
|||||||
|
|||||||
Re: 3 column layout with thumbnail for Related Products
Thanks Sisom for your suggestion but this won't work
Code:
I had another little play around and ended up using the code below. I don't know how or why it works but it does and so now i've got XHTML validated product pages. This code works on the assumption that you've got three thumnails across and no more than 12 related items. If you wanted to have more than 12 I guess you could just add an extra $smarty.section.cat_num.index eq 11. Code:
If you want to have a look at it in action see here: http://www.ausgardener.com.au/Diamond-Night-pr-762.html
__________________
xcart v4.1.2 [unix] |
|||||||
#45
|
|||||||
|
|||||||
Re: 3 column layout with thumbnail for Related Products
Great stuff! You certainly know more about Smarty than I do! Loved the look of your site too - very clear and professional.
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#46
|
|||||||
|
|||||||
Re: 3 column layout with thumbnail for Related Products
keystone,
If you want the price to show up in sisoms code from post #36, then you need to change this line of code: Code:
to this: Code:
I have v4.1.8 and it seems to be working O.K. for me. - MoonDog -
__________________
X-CART Gold v4.1.8 |
|||||||
#47
|
|||||||||
|
|||||||||
Re: 3 column layout with thumbnail for Related Products
Quote:
Balinor, No one seems to have posted a clean version of this mod for Version 4.1.8 and i cant get this to work on mine no matter how many times I modify the codes (It still shows the same unglorious text). here is my related_products.tpl code: Code:
Thanks, V
__________________
X-cart gold 4.4.3 Unix |
|||||||||
#48
|
|||||||
|
|||||||
Re: 3 column layout with thumbnail for Related Products
vahidnia,
Just copy sisom's code from post #36 and save it as related_products.tpl Make sure you change one line of code as noted on my previous post above. This change is to display the cost of the product underneath the thumbnail. I have v4.1.8 and had no problems using the above mentioned procedure and it's actually working pretty nice. - MoonDog -
__________________
X-CART Gold v4.1.8 |
|||||||
#49
|
|||||||||
|
|||||||||
Re: 3 column layout with thumbnail for Related Products
MoonDog,
Thank you very much for your help. I kinda mixed "related products" and "recommended products" in the begining. I actually needed the 3 column layout for recommended products which i got from another post. Thanks you again, V
__________________
X-cart gold 4.4.3 Unix |
|||||||||
#50
|
|||||||
|
|||||||
Re: 3 column layout with thumbnail for Related Products
Great Mod working in 4.1.8
Question after upgrade should I restore to default than add the mod or just leave it as is. |
|||||||
|
|||
X-Cart forums © 2001-2020
|