Dynamic prices update not worked for me. (VM 2.0.2 Joomla! 2.5.1)
I make this patch and it`s working!
administrator\components\com_virtuemart\helpers\calculationh.php
line around 324
after this
if (empty($prices['basePriceVariant'])) {
$prices['basePriceVariant'] = $prices['basePrice'];
}
paste this $prices['basePrice']=$prices['basePrice']*$this->_amount;//nikonor
then go to components\com_virtuemart\controllers\productdetails.php
line around 248
after foreach ( $prices as $name => $product_price ){
$priceFormated[$name] = $currency->createPriceDiv($name,'',$prices,true);
}
comment next code //$document = JFactory::getDocument();
//$document->setName('recalculate');
//JResponse::setHeader('Cache-Control','no-cache, must-revalidate');
//JResponse::setHeader('Expires','Mon, 6 Jul 2000 10:00:00 GMT');
//$document->setMimeEncoding( 'application/json' );
//JResponse::setHeader('Content-Disposition','attachment;filename="recalculate.json"', true);
//JResponse::sendHeaders();
I reconfirm this. Dynamic price update feature has stopped working in VM 2.0.2. This needs to be fixed in the upcoming version.
Quote from: nikonor on February 26, 2012, 12:25:01 PM
Dynamic prices update not worked for me. (VM 2.0.2 Joomla! 2.5.1)
I make this patch and it`s working!
administrator\components\com_virtuemart\helpers\calculationh.php
line around 324
after this
if (empty($prices['basePriceVariant'])) {
$prices['basePriceVariant'] = $prices['basePrice'];
}
paste this $prices['basePrice']=$prices['basePrice']*$this->_amount;//nikonor
then go to components\com_virtuemart\controllers\productdetails.php
line around 248
after foreach ( $prices as $name => $product_price ){
$priceFormated[$name] = $currency->createPriceDiv($name,'',$prices,true);
}
comment next code //$document = JFactory::getDocument();
//$document->setName('recalculate');
//JResponse::setHeader('Cache-Control','no-cache, must-revalidate');
//JResponse::setHeader('Expires','Mon, 6 Jul 2000 10:00:00 GMT');
//$document->setMimeEncoding( 'application/json' );
//JResponse::setHeader('Content-Disposition','attachment;filename="recalculate.json"', true);
//JResponse::sendHeaders();
This solution does not work for me.
This is just the session, logout and login again. The reason for this is the performance.
Man your'e the f...ing best ;D
THANK YOU!
Interesting...... Two things to add here.....
1) I don't think nikonor's fix is quote going about this the right way.
2) I don't think this is only a session issue, although @TarGG58, would be good if you could state what you did that worked for you. Did you just logout / login? Was it anything to do with nikonor's post? It might help others if you could clarify.
I looked into this briefly due to a client project, although the solution I wanted was not about 'fixing' this, so haven't followed up yet (due to time). Neither the client's site, nor my test site had dynamic price updating (version 2.02, Joomla 1.7) on quantity change. A variety of Jquery configs (google api on / off, vm jquery on/off) in VM backend didn't affect this.
What I'm going to do is test this with the latest release, different server, latest Joomla. It may simply be my / clients setup. If not sorted, I will see if client's work can be converted to a fix here for this (assuming I get their permission).
Sry for the late answer.
I just take the code from the first post, and so it works. There is no session fault or something like that
This problem is already resolved in VM 2.0.6