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)
-   -   Calling a Product Price... (https://forum.x-cart.com/showthread.php?t=36667)

crcool75 01-10-2008 12:58 PM

Calling a Product Price...
 
Hello,

We use HTML code in our category descriptions. How would I call a particular product's price and have it displayed in this category description box somewhere? I could statically paste it there, but if the price is change on the product it won't reflect in the category description code.

It seems as though I need to somehow capture the information. I've noticed that only HTML code works in this category description box too.

Thanks

crcool75 01-11-2008 09:03 AM

Re: Calling a Product Price...
 
Well, this must not be possible since nobody's replied.

imexhouse 03-12-2008 05:15 PM

Re: Calling a Product Price...
 
It is possible. First, in /skin1/customer/main/products.tpl, you have to modify
Quote:

$products[product].descr|truncate:300:"...":true
like this:
Quote:

{eval var=$products[product].descr|truncate:300:"...":true}

Than, you woud call it in the short description like this:
Quote:


{$products[product].price|string_format:"%.2f"}

and in full description like this:
Quote:

{$product.price|string_format:"%.2f"}
In /skin1/customer/main/product.tpl, you would use:
Quote:


{if $product.fulldescr ne ""}{eval var=$product.fulldescr}{else}{eval var=$product.descr}{/if}


I hope this helps.


All times are GMT -8. The time now is 01:47 PM.

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