2.0.16 Adding 1 euro to all cost prices?! [SOLVED]

Started by atrus, December 22, 2012, 11:13:31 AM

Previous topic - Next topic

atrus

Hi to all,

We have noticed something strange with our installation: VM2 adds 1 euro (shop's default currency) to all cost prices when it displays them, i.e. if the cost price is set to 20 euros, VM2 will display 21 euros and so on! We have disabled all rules. When the product is added to the cart, its price is normal, 20 euros. So it is a matter of display only. We are checking any template overrides here also, but the issue persists, also confirmed on the beez20 template.

Any ideas what to check next?

Thanks,
Chris

Milbo

This happened due a change of a function. It shows clearly that you use some incompatible 3rd party or some layout overwrite. We changed in calculationh.php

public function getProductPrices($product, $catIds=0, $variant=0.0, $amount=0, $ignoreAmount=true, $currencydisplay=true) {


to

public function getProductPrices($product, $variant=0.0, $amount=0) {


check your layout, product_edit_information, search for getProductPrices, just delete the second param, done.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

atrus

Thanks for your assistance, will check it out; (just a clarification: at the backend, all prices are shown correctly, it is only at the frontend that the 1 euro is added to the cost price)

Rgrds,
Chris


atrus

#3
Hi again Milbo,

Just checked as per your instructions:

in /administrator/components/com_virtuemart/helpers/calculationh.php the code is actually:

public function getProductPrices($product, $variant=0.0, $amount=0, $ignoreAmount=true, $currencydisplay=true) { (the $catIds=0 only has been removed)

In our installation there doesn't seem to be any layout overwrite (or maybe we are missing smth). The only product_edit_information.php is located in /administrator/components/com_virtuemart/views/product/tmpl/  and the only call to getProductPrices is at the following line:

$this->calculatedPrices = $calculator->getProductPrices ($this->tempProduct);

In any case, the price calculation and display is perfectly correct at the backend. I.e. you can see for a product (no rules applied):

Cost price: 14.3 Euro
Base Price: 14.3 Euro
Final Price: 14.3 Euro

But when you go to the frontend the Salesprice is 15.3 Euro!

Rgrds,
Chris

Milbo

It is quite sure one of your hacks or layout overrides. It would be interesting to know which function is creating the problem, but at the end it has something todo with this function. Do you use plugins for your customfields?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

atrus

Hi Milbo,

Thanks for the tip, we searched through all our plugins and the issue was found in a system plugin used by Chameleon extension (http://www.metamodpro.com/). We have advised the developer accordingly and he will correct accordingly ;)

Rgrds,
Chris