X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   DON'T want Featured Products (https://forum.x-cart.com/showthread.php?t=32140)

LittleLizard 06-27-2007 06:12 PM

DON'T want Featured Products
 
At the moment, Featured Products do not fit my client's current business model. It will eventually, but for right now I need to get that table off my front page. I'm still in the process of setting everything up and working the graphics and CSS, so there are still most of the sample product data still in.

I couldn't find any reference of how to remove that block from the front page (I've got the default Skin1).

Thanks!

carpeperdiem 06-27-2007 07:18 PM

Re: DON'T want Featured Products
 
to make featured products go away forever,

you can simply not assign any.

to idiotproof it from your store, you can comment out the entire template, /skin1/customer/main/featured.tpl

Code:

{* {capture name=dialog}
{if $f_products ne ""}
{if $total_pages gt 2}
<br />
{ include file="customer/main/navigation.tpl" }
{/if}
{include file="customer/main/products.tpl" products=$f_products featured="Y"}
{if $total_pages gt 2}
<br />
{ include file="customer/main/navigation.tpl" }
{/if}
{else}
{$lng.txt_no_featured}
{/if}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_featured_products content=$smarty.capture.dialog extra='width="100%"'} *}


but -- if you don't assign a featured product, they simply won't display.

Get to know webmaster mode, so you can see what templates are working for you.

LittleLizard 06-28-2007 06:59 AM

Re: DON'T want Featured Products
 
I don't have any featured products, but the box is still showing up saying there are no featured products.

Commenting worked just fine. Thanks.

carpeperdiem 06-28-2007 07:10 AM

Re: DON'T want Featured Products
 
OK, this is understandable...

in the featured.tpl, do you see the code lines:
Code:

{if $f_products ne ""}
{if $total_pages gt 2}
<br />
{ include file="customer/main/navigation.tpl" }
{/if}
{include file="customer/main/products.tpl" products=$f_products featured="Y"}
{if $total_pages gt 2}
<br />
{ include file="customer/main/navigation.tpl" }
{/if}
{else}
{$lng.txt_no_featured}


IF featured products are empty, then it will display the language var, $lng.txt_no_featured -- and wrap it in a dialog...

You could (as i have) simply comment out the include call to featured.tpl in welcome.tpl, as well as wherever else it is called...

Code:

{* {include file="customer/main/featured.tpl" f_products=$f_products} *}

There is more than one way to accomplish this.

Webmaster mode will help you... look for any calls to customer/main/featured.tpl and comment them out.

BUT -- I think if you lose it from welcome.tpl, the if/elses should solve the rest.


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.