![]() |
Display Certain Number of Featured Products
Hi All ...
I'm developing an XC site on which I have 16 featured products assigned on the homepage. However, I'd only want to display the first 8. Is something I can tweak in the smarty code to achieve this? The last 8 will only be displayed to customers with a certain membership level. Can anyone help? Many Thanks Shafiq :sK |
Re: Display Certain Number of Featured Products
You can use position field - set position for the first 8 you want to show say between 0 and 100 and above 100 for the rest and then just do check in the foreach loop in featured.tpl
{foreach from=xxx item=x} {if $x.orderby lt 100} show products code {/if} {if $x.orderby gt 100 && $userinfo.membershipid eq "y"} show products code {/if} {/foreach} You have to check on the correct variables syntax |
Re: Display Certain Number of Featured Products
Cool ... That makes sense ..
Thanks Steve! Shafiq :sK |
Re: Display Certain Number of Featured Products
I've just noticed that within the $f_featured smarty variable, the orderby field is not available.
Any idea on how I can retrieve this information? Many Thanks |
Re: Display Certain Number of Featured Products
If not there you will have to modify the php script to include it. Look in /featured_products.php
|
Re: Display Certain Number of Featured Products
Quote:
Yeah, i've just been looking in there, but i'm not 100% sure on how to do this. Could you assist on this? Thanks a lot |
Re: Display Certain Number of Featured Products
It should be in search.php. Yes order doesn't exist in there, I would report this to QT as bug, if cart allows you to set it up it should be in included in the array
|
All times are GMT -8. The time now is 09:40 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.