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

Featured products: Disabled on some pages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-27-2005, 01:45 PM
 
mikalou mikalou is offline
 

Advanced Member
  
Join Date: Jun 2005
Posts: 71
 

Default Featured products: Disabled on some pages

I would like to disable featured products on static pages that I've created and on built-in pages like the Terms & Conditions and Privacy Policy page but at the same time I dont want to disable it on pages like the home page, product, or category pages.

I cant seem to track down where this can be done. Anybody?
__________________
X-Cart Gold 4.2.2 - 3.1.19
Reply With Quote
  #2  
Old 06-27-2005, 06:17 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Unless you have changed something, the featured products already work this way. They display on whatever category/sub-category you add them to in the 'Categories' section of your admin area, but don't display on the help pages, static pages or any pages that you have not added them to.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 06-28-2005, 10:19 AM
 
mikalou mikalou is offline
 

Advanced Member
  
Join Date: Jun 2005
Posts: 71
 

Default

After further checking into this problem, I discovered that you're right. I did change something that allowed the featured products page to be displayed on all pages.

Here's what I did to accidentally create the problem and then solve it, in hopes that my plunder will help someone else:

Last week, I edited customer/home.tpl, so that the placement of my featured products was displayed more near the center of the home.php page. To accomplish this, I simply moved the following line of code:
{include file="customer/main/featured.tpl" f_products=$f_products} further up. However, the new location of this code effectively placed it outside of the conditional statement: {if $main eq "catalog" and $current_category.category eq ""}
which caused my problem of having the featured products being displayed on all pages.

To solve the problem, I simply surrounded the featured products code with the conditional.
{if $main eq "catalog" and $current_category.category eq ""}
{include file="customer/main/featured.tpl" f_products=$f_products}
{/if}

Doing this seems to have corrected the problem. Thanks for pointing this blind man in the right direction.
__________________
X-Cart Gold 4.2.2 - 3.1.19
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 10:43 PM.

   

 
X-Cart forums © 2001-2020