News:

Support the VirtueMart project and become a member

Main Menu

Dynamic prices update

Started by nikonor, February 26, 2012, 12:25:01 PM

Previous topic - Next topic

nikonor

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
Code (php) Select
if (empty($prices['basePriceVariant'])) {
$prices['basePriceVariant'] = $prices['basePrice'];
}

paste this
Code (php) Select
$prices['basePrice']=$prices['basePrice']*$this->_amount;//nikonor

then go to components\com_virtuemart\controllers\productdetails.php
line around 248
after
Code (php) Select
foreach ( $prices as $name => $product_price  ){
$priceFormated[$name] = $currency->createPriceDiv($name,'',$prices,true);
}

comment next code
Code (php) Select
//$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();

Jumbo!

I reconfirm this. Dynamic price update feature has stopped working in VM 2.0.2. This needs to be fixed in the upcoming version.

Jumbo!

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
Code (php) Select
if (empty($prices['basePriceVariant'])) {
$prices['basePriceVariant'] = $prices['basePrice'];
}

paste this
Code (php) Select
$prices['basePrice']=$prices['basePrice']*$this->_amount;//nikonor

then go to components\com_virtuemart\controllers\productdetails.php
line around 248
after
Code (php) Select
foreach ( $prices as $name => $product_price  ){
$priceFormated[$name] = $currency->createPriceDiv($name,'',$prices,true);
}

comment next code
Code (php) Select
//$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.

Milbo

This is just the session, logout and login again. The reason for this is the performance.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

TarGG58

Man your'e the f...ing best  ;D

THANK YOU!

MikeUK

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).
Get answers faster:
    [li]
Search forum. You might find answer[/li]
[li]Use existing threads. Keep Q + A consolidated[/li]
[li]Troubleshooting? See http://forum.virtuemart.net/index.php?topic=60033.0[/li]
[li]For admin user manual - http://virtuemart.net/documentation/User_Manual/index.html[/li]
[li]For coding (developer manual) - http://virtuemart.net/documentation/Developer_Manual/index.html[/li][/list]

I can build your online shop, setup or customize Virtuemart or help your existing shop maximize its potential. Email / PM for info

TarGG58

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

Jumbo!

This problem is already resolved in VM 2.0.6