News:

Support the VirtueMart project and become a member

Main Menu

No Price Update on Quantity Change

Started by ishmaal, November 12, 2012, 02:09:09 AM

Previous topic - Next topic

ishmaal

Hi, Im having an issue where the price in the shop does not update as you increase the quantity selection.

Exact same issue as this person here http://forum.virtuemart.net/index.php?topic=103854.msg345227#msg345227

Im using Joomla 2.5.7, and VM 2.0.12f (first VM install was version 2.0.10)

Any advice would be greatly appreciated!

chetanmadaan


anisimow

Quote from: ishmaal on November 12, 2012, 02:09:09 AM
Hi, Im having an issue where the price in the shop does not update as you increase the quantity selection.

Exact same issue as this person here http://forum.virtuemart.net/index.php?topic=103854.msg345227#msg345227

Im using Joomla 2.5.7, and VM 2.0.12f (first VM install was version 2.0.10)

Any advice would be greatly appreciated!
I had got the same problem until change the core )
on  components\com_virtuemart\controllers\productdetails.php
after line 296 //VmConfig::$echoDebug = TRUE;
$prices = $product_model->getPrice ($virtuemart_product_id, $customPrices, $quantity);[code]

add [code]                $prices['basePrice'] = $prices['basePrice'] * $quantity;
                $prices['basePriceWithTax'] = $prices['basePriceWithTax'] * $quantity;
                $prices['discountedPriceWithoutTax'] = $prices['discountedPriceWithoutTax'] * $quantity;
                $prices['salesPrice'] = $prices['salesPrice'] * $quantity;
                $prices['salesPriceWithDiscount'] = $prices['salesPriceWithDiscount'] * $quantity;
                $prices['taxAmount'] = $prices['taxAmount'] * $quantity;
                $prices['discountAmount'] = $prices['discountAmount'] * $quantity;
                $prices['basePriceWithTax'] = $prices['basePriceWithTax'] * $quantity;

remeedella

anisimov your awesome. You're code above helped avoid a big commercial extension today

konpatsogiannis


[/quote]
I had got the same problem until change the core )
on  components\com_virtuemart\controllers\productdetails.php
after line 296 //VmConfig::$echoDebug = TRUE;
$prices = $product_model->getPrice ($virtuemart_product_id, $customPrices, $quantity);[code]

add [code]                $prices['basePrice'] = $prices['basePrice'] * $quantity;
                $prices['basePriceWithTax'] = $prices['basePriceWithTax'] * $quantity;
                $prices['discountedPriceWithoutTax'] = $prices['discountedPriceWithoutTax'] * $quantity;
                $prices['salesPrice'] = $prices['salesPrice'] * $quantity;
                $prices['salesPriceWithDiscount'] = $prices['salesPriceWithDiscount'] * $quantity;
                $prices['taxAmount'] = $prices['taxAmount'] * $quantity;
                $prices['discountAmount'] = $prices['discountAmount'] * $quantity;
                $prices['basePriceWithTax'] = $prices['basePriceWithTax'] * $quantity;

[/quote]

Hi. What should I add in this code in order to have an update price in the value without the tax?

jenkinhill

Look at the dates of the earlier messages in this thread!!!   Do not edit the core - if you need function changes then do it by using a plugin.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

konpatsogiannis

Quote from: jenkinhill on April 09, 2014, 11:42:37 AM
Look at the dates of the earlier messages in this thread!!!   Do not edit the core - if you need function changes then do it by using a plugin.

There are many complaints for the fuction of the plugin you say but even this way, the plugin costs 50€ and I only need one extra lne to make it work for the prices without tax!

DayCounts