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)
-   -   Show Market price (list price) on product detail page (https://forum.x-cart.com/showthread.php?t=65485)

Hallsons 11-26-2012 05:22 PM

Show Market price (list price) on product detail page
 
Hello,

I've been trying to find a solution to this for years now, and have searched all over for it without much luck.

In the category list, when an item is discounted, it shows the list price with a strikethrough above the actual price and then there is a percent off shown (save x%) next to the actual price.

But in the product detail page it just shows the price. Yes, there is a % off label showing, but I want it to display exactly like it does on the category listing with the regular price just above the actual price with the percent off showing there.

I've tried to move around some of the same code from products.tpl to product.tpl and it just won't show the actual price so I'm missing some kind of variable and am not sure what changes to make at this point.

So does anyone have a mod to show the market price on the product detail page, or direct me to a solution?

Thank you!

Chris

totaltec 11-27-2012 11:36 AM

Re: Show Market price (list price) on product detail page
 
More recent versions show this by default. I don't have access to your version at the moment. Can you use webmaster mode to check if the market price is include in the $product array? Or you could temporarily add this to the template of your dev site {$product|@print_r} to print the entire contents of the array. http://www.smarty.net/forums/viewtopic.php?t=11435

If the value is included, just access it with {$product.NameofValue}. If it is not then you are likely to have to edit some php.

Hallsons 11-27-2012 11:47 AM

Re: Show Market price (list price) on product detail page
 
Thank you for the reply. I'll look into it more to see if it is included in the product array.

If this is in 4.2, can anyone share their product.tpl file with me, so I can see how it is included?

Thanks.

Chris

Hallsons 11-27-2012 11:55 AM

Re: Show Market price (list price) on product detail page
 
I checked and yes, it pulls the[list_price] into the product array. Now I just need to figure out how to add it to the template :)

totaltec 11-27-2012 01:18 PM

Re: Show Market price (list price) on product detail page
 
Great! Try simply {$product.list_price} #guessing.

Hallsons 11-27-2012 04:19 PM

Re: Show Market price (list price) on product detail page
 
Okay, this is what I did and it works just fine, so that when an item is on sale the list price will show up. I won't worry about the %off since that does already display on the page.

In skin1/customer/main/product.tpl

Find:

Code:

<tr><td class="ProductPriceConverting" valign="top">{$lng.lbl_price}:</td>

and BEFORE this I put:

Code:

{if $product.list_price gt 0}
<tr>
 <td><font class="MarketPrice">{$lng.lbl_market_price}: </font></td>
 <td><font class="MarketPrice">{include file="currency.tpl" value=$product.list_price}</font></td>
</tr>
{/if}


I don't use the strikethrough because it makes it hard to read the price.

Hopefully this works okay, and I hope this is helpful for anyone else still searching for this.

totaltec 11-27-2012 04:25 PM

Re: Show Market price (list price) on product detail page
 
Thanks Chris, it always helps when you share your final solution.

gozindagi 02-24-2014 04:13 AM

Re: Show Market price (list price) on product detail page
 
1 Attachment(s)
Hi,

Please tell me how can I update list price field(MRP field)?My X-CART version is x-cart 4.6.2

totaltec 02-24-2014 05:37 AM

Re: Show Market price (list price) on product detail page
 
That field should be located on the product page. Directly under the price field.

If the product has variants, then you may need to update prices on the variants page.

gozindagi 02-24-2014 09:21 PM

Re: Show Market price (list price) on product detail page
 
Quote:

Originally Posted by totaltec
That field should be located on the product page. Directly under the price field.

If the product has variants, then you may need to update prices on the variants page.

Thanks for reply but if the product has no variants then how can i modify above mention field(MRP field)?


All times are GMT -8. The time now is 09:51 AM.

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