VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: ishmaal on November 12, 2012, 02:09:09 AM

Title: No Price Update on Quantity Change
Post by: 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 (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!
Title: Re: No Price Update on Quantity Change
Post by: chetanmadaan on November 22, 2012, 21:34:28 PM
it's solved in the newer version.

right?

http://forum.virtuemart.net/index.php?topic=101072.0
Title: Re: No Price Update on Quantity Change
Post by: anisimow on February 27, 2013, 13:00:16 PM
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 (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;
Title: Re: No Price Update on Quantity Change
Post by: remeedella on March 17, 2013, 21:41:38 PM
anisimov your awesome. You're code above helped avoid a big commercial extension today
Title: Re: No Price Update on Quantity Change
Post by: konpatsogiannis on April 09, 2014, 00:42:22 AM

[/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?
Title: Re: No Price Update on Quantity Change
Post by: 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.
Title: Re: No Price Update on Quantity Change
Post by: konpatsogiannis on April 09, 2014, 15:26:58 PM
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!
Title: Re: No Price Update on Quantity Change
Post by: DayCounts on July 25, 2018, 01:37:58 AM
Hi Guys,

I have developed a plugin for this
https://www.daycounts.com/shop/plugins/product-detail-price-per-quantity