Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

How to Exclude from {section} loop

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-28-2004, 04:54 AM
 
xcell67 xcell67 is offline
 

Senior Member
  
Join Date: Dec 2003
Posts: 149
 

Default How to Exclude from {section} loop

I tried searching for this but couldn't find it. Anyway I have an item called "Ebay Auction Payment" set at $0. The thing is, I don't want this item to show up on the recommends list when customers are browsing other products.

How do I exclude the ebay payment item from the recommends loop?

thanks


.Version 3.5.11
Reply With Quote
  #2  
Old 10-28-2004, 06:54 AM
 
pmstudios pmstudios is offline
 

Senior Member
  
Join Date: May 2004
Posts: 133
 

Default

This should be more streamlined, but here's a quick fix to exclude that single product.

Apply to modules/Recommended_Products/recommends.tpl
Code:
{section name=num loop=$recommends} {if $recommends[num].product ne "Ebay Auction Payment"} <LI> <SPAN class="ItemsList">{$recommends[num].product}</SPAN> </LI> {/if} {/section}

A better way would be to create a new field, perhaps in the products table, that could be set to exclude products from the recommended list. Then in recommends.php, you could add a conditional check to determine whether or not a product should be included. Then you could manage the exclusions from the modify product/create new product pages.
__________________
X-Cart 4.0.5
MySQL: 3.23.58
PHP 4.3.2
Reply With Quote
  #3  
Old 10-28-2004, 03:09 PM
 
xcell67 xcell67 is offline
 

Senior Member
  
Join Date: Dec 2003
Posts: 149
 

Default

that worked great, thanks pm!
Reply With Quote
  #4  
Old 10-28-2004, 03:47 PM
 
pmstudios pmstudios is offline
 

Senior Member
  
Join Date: May 2004
Posts: 133
 

Default

^_^ !
__________________
X-Cart 4.0.5
MySQL: 3.23.58
PHP 4.3.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:02 AM.

   

 
X-Cart forums © 2001-2020