| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Display Certain Number of Featured Products | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
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
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#2
|
|||||||||
|
|||||||||
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
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#3
|
|||||||||
|
|||||||||
Re: Display Certain Number of Featured Products
Cool ... That makes sense ..
Thanks Steve! Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#4
|
|||||||||
|
|||||||||
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
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#5
|
|||||||||
|
|||||||||
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
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#6
|
|||||||||
|
|||||||||
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
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#7
|
|||||||||
|
|||||||||
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
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|||
X-Cart forums © 2001-2020
|