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)
-   -   recommended $list_price not displaying (https://forum.x-cart.com/showthread.php?t=39137)

effour 04-16-2008 01:02 PM

recommended $list_price not displaying
 
I'm hoping someone can help me figure out why this snippet won't display on the recommends.tpl page

PHP Code:

{include file="currency.tpl" value=$products[product].list_price


Any help is appreciated.

Thx

balinor 04-16-2008 01:10 PM

Re: recommended $list_price not displaying
 
This isn't a bug, so moving to Template Editing. You need to look at the code - the array called on the recommends page is not the same as the product page, so you can't just copy code. You need to use the same value format that is used to call the links and product names.

effour 04-16-2008 01:22 PM

Re: recommended $list_price not displaying
 
Would you know what file i would edit to modify the array?

Thanks,

E

Quote:

Originally Posted by balinor
This isn't a bug, so moving to Template Editing. You need to look at the code - the array called on the recommends page is not the same as the product page, so you can't just copy code. You need to use the same value format that is used to call the links and product names.


balinor 04-16-2008 01:33 PM

Re: recommended $list_price not displaying
 
You just need to call the correct code in the template you are editing. Look at the way the products are called, then copy that format for the price.

effour 04-16-2008 02:01 PM

Re: recommended $list_price not displaying
 
The product price displays using the following code in the recommends:
${$product.price}

I try to display the list price using {$product.list_price} and it doesn't display anything.

Is that what you mean?

Thx,

kube 04-16-2008 02:14 PM

Re: recommended $list_price not displaying
 
Is the [product] part populated with an item when you are passing it through?

Code:

{include file="currency.tpl" value=$products[product].list_price}

ie. does printing {$products[product].list_price} produce a price on the same .tpl from which you are calling from?

kube 04-16-2008 02:31 PM

Re: recommended $list_price not displaying
 
The only price I can see from the recommends array is taxed price...

Code:

{section name=num loop=$recommends}
        <li><a href="product.php?productid={$recommends[num].productid}" class="ItemsList">{$recommends[num].product}</a> {include file="currency.tpl" value=$recommends[num].taxed_price}</li>
{/section}


effour 04-17-2008 08:06 AM

Re: recommended $list_price not displaying
 
No, {$products[product].list_price} does not display the list price.

{$recommends[num].productid} displays the product IDIs there some other options that I can try?

Thx!



Quote:

Originally Posted by kube
Is the [product] part populated with an item when you are passing it through?

Code:

{include file="currency.tpl" value=$products[product].list_price}

ie. does printing {$products[product].list_price} produce a price on the same .tpl from which you are calling from?


balinor 04-17-2008 08:23 AM

Re: recommended $list_price not displaying
 
$recommends[num].list_price

effour 04-17-2008 08:25 AM

Re: recommended $list_price not displaying
 
This doesn't work either

Quote:

Originally Posted by balinor
{$recommends[num].list_price}



All times are GMT -8. The time now is 11:21 AM.

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