VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: aim on November 28, 2012, 09:29:36 AM

Title: Virtuemart 2.0.14: price can not be seen
Post by: aim on November 28, 2012, 09:29:36 AM
I made some screenshots to clarify my situation:
The prices are all selected, and users anonymous should see general prices.
But only 2 appear in the product prices.
In addition, using the form Virtuemart products, I would like to see the products of the category "Specials" (In Offerta), which is associated with a discount, and show the normal price, and the price with the discount, but I view the same price.
I hope I have explained the situation better.
Thank you.

Regards.

[attachment cleanup by admin]
Title: Re: Virtuemart 2.0.14: price can not be seen
Post by: aim on November 30, 2012, 14:54:22 PM
If I have not explained the situation well, I can try to re-explain this.
I would like to know if it is a problem of Virtuemart, and how to solve it in the case, or is it a setting problem.
Thank you very much.
Title: Re: Virtuemart 2.0.14: price can not be seen
Post by: bytelord on November 30, 2012, 17:49:51 PM
Hi,

Please take a look on those posts

http://forum.virtuemart.net/index.php?topic=109923
https://forum.virtuemart.net/index.php?topic=109443

-----some old ones----
http://forum.virtuemart.net/index.php?topic=96175.0
http://forum.virtuemart.net/index.php?topic=97672.0
http://forum.virtuemart.net/index.php?topic=101110.0

Regards
Title: Re: Virtuemart 2.0.14: price can not be seen
Post by: aim on December 04, 2012, 10:30:14 AM
Thanks for the reply.
Taking a cue from the first link, I made the following changes to the files:

1. joomla_folder/templates/your_joomla_template/html/mod_virtuemart_product/default.php
at about line 23
if (!empty($product->prices['discountAmount'])) {
                                echo $currency->createPriceDiv ('priceWithoutTax', '', $product->prices, FALSE, FALSE, 1.0, TRUE);
                            }
if (!empty($product->prices['salesPrice'])) {
echo $currency->createPriceDiv ('salesPrice', '', $product->prices, FALSE, FALSE, 1.0, TRUE);
}


2. joomla_folder/templates/your_joomla_template/html/com_virtuemart/category/default.php
at about line 292
if (!empty($product->prices['discountAmount'])) {
                                echo $this->currency->createPriceDiv ('priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $product->prices);
                            }
echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
// echo $this->currency->createPriceDiv ('discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $product->prices);


3. joomla_folder/templates/your_joomla_template/html/com_virtuemart/productdetails/default_showprices.php
at about line 47
if (!empty($this->product->prices['discountAmount'])) {
echo $this->currency->createPriceDiv ('priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices);
}
echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $this->product->prices);


Regards
Title: Re: Virtuemart 2.0.14: price can not be seen
Post by: bytelord on December 04, 2012, 19:08:57 PM
Nice!

Great that some people try to work and find a solution for them, nice work and thanks for sharing.

Regards