Author Topic: 2.0.16 Adding 1 euro to all cost prices?! [SOLVED]  (Read 3692 times)

atrus

  • Jr. Member
  • **
  • Posts: 128
    • Quality Tuning
  • VirtueMart Version: 3.8.6
2.0.16 Adding 1 euro to all cost prices?! [SOLVED]
« on: December 22, 2012, 11:13:31 am »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: 2.0.16 Adding 1 euro to all cost prices?!
« Reply #1 on: December 22, 2012, 11:26:17 am »
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
Code: [Select]
public function getProductPrices($product, $catIds=0, $variant=0.0, $amount=0, $ignoreAmount=true, $currencydisplay=true) {

to
Code: [Select]
public function getProductPrices($product, $variant=0.0, $amount=0) {

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

atrus

  • Jr. Member
  • **
  • Posts: 128
    • Quality Tuning
  • VirtueMart Version: 3.8.6
Re: 2.0.16 Adding 1 euro to all cost prices?!
« Reply #2 on: December 22, 2012, 13:14:31 pm »
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

  • Jr. Member
  • **
  • Posts: 128
    • Quality Tuning
  • VirtueMart Version: 3.8.6
Re: 2.0.16 Adding 1 euro to all cost prices?!
« Reply #3 on: December 22, 2012, 14:24:03 pm »
Hi again Milbo,

Just checked as per your instructions:

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

Code: [Select]
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:

Code: [Select]
$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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: 2.0.16 Adding 1 euro to all cost prices?!
« Reply #4 on: December 23, 2012, 11:15:03 am »
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?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

atrus

  • Jr. Member
  • **
  • Posts: 128
    • Quality Tuning
  • VirtueMart Version: 3.8.6
Re: 2.0.16 Adding 1 euro to all cost prices?!
« Reply #5 on: December 28, 2012, 09:22:02 am »
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