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)
-   -   How to not show price for featured products on home page (https://forum.x-cart.com/showthread.php?t=23587)

tahirfayyaz 07-26-2006 03:01 AM

How to not show price for featured products on home page
 
Hi. I do not want to show the price for featured products on the home page. How do I do this?

Thanks

balinor 07-26-2006 04:05 AM

The the featured products template is actually the products template. Are you using a multi-column layout for both the products and featured products?

tahirfayyaz 07-26-2006 04:27 AM

yes I am. It is a 3 column format. I thought it was a separate file but could find anything. Is it possible? If not no problem as its not that bad.

Thanks

carpeperdiem 07-26-2006 05:39 AM

Maybe (I'm still learning this, so my logic may be fuzzy):

1. duplicate your products.tpl template, i.e. "products-main.tpl"
2. in /customer/main/featured.tpl, change:

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

to

{include file="customer/main/products-main.tpl" products=$f_products featured="Y"}


3. Edit products-main.tpl to not display prices

Could this work? Will this get in the way of anything? I am only a week into this journey, so there are many things (most things?) that I don't fully understand - but I am getting the hang of template editing and the 4D chess game that we're playing....

OR -- is this only a 4.0.x thing -- I just realized that you are using 4.1 -- hmm... sorry.

balinor 07-26-2006 05:41 AM

Yes, that is what I would suggest :) Should be similar for 4.1

Scott DeToffol 09-24-2006 11:21 AM

Re: How to not show price for featured products on home page
 
I got this to work: created products_featured.tpl so the featured product show different info than regular.

BUT, under General Settings, Appearance Options and "Display products list in multiple columns (1-3) (leave empty to use standard format):" I have it empty for standard format, which gives me one column of featured products. If I change this to 2 and keep "Display only featured products list in multicolumn format:" checked, I get two column of featured products (cool!), but I loose the changes I made in products_featured.tpl (uncool!).

Apparently, selecting multiple columns somehow changes which featured.tpl it references?

Scott DeToffol 09-29-2006 04:32 PM

Re: How to not show price for featured products on home page
 
I'm getting close. I figured out that when choosing multi-column, x-cart uses products_t.tpl instead of products.tpl. So, how do you customize the look of products in the Featured Products when you have multi-columns? Does x-cart not use featured.tpl when using multi-column layout?

Below is my featured.tpl

Quote:

{* $Id: featured.tpl,v 1.14.8.1 2005/04/04 13:21:51 max Exp $ *}
{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_featured.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%"}

ranger82nd 10-18-2006 07:50 AM

Re: How to not show price for featured products on home page
 
Without completely knowing what else products_t.tpl controls, couldn't you just {*comment out*} this:

skin1/customer/main/products_t.tpl
Code:

{*{if $products[product].taxed_price ne 0}
{if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price}
{math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%3.0f" assign=discount}
{if $discount gt 0}
<FONT class="MarketPrice">{$lng.lbl_market_price}: <S>
{include file="currency.tpl" value=$products[product].list_price}
</S></FONT><BR>
{/if}
{/if}
<FONT class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</FONT><BR><FONT class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</FONT>{if $discount gt 0}{if $config.General.alter_currency_symbol ne ""}, {/if}{$lng.lbl_save_price} {$discount}%{/if}
{if $products[product].taxes}<BR>{include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes}{/if}
{else}
<FONT class="ProductPrice">{$lng.lbl_enter_your_price}</FONT>
{/if}*}

Would you loose the price somewhere else?

Scott DeToffol 10-18-2006 08:05 AM

Re: How to not show price for featured products on home page
 
That did it, thanks again ranger! (can I call you ranger?)

ranger82nd 10-18-2006 08:22 AM

Re: How to not show price for featured products on home page
 
I would just keep an eye out to make sure you're not "loosing" the price somewhere else.
Quote:

(can I call you ranger?)
Sure!:wink:


All times are GMT -8. The time now is 10:40 AM.

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