Author Topic: Dynamic prices update  (Read 6523 times)

nikonor

  • Beginner
  • *
  • Posts: 3
Dynamic prices update
« 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();

Jumbo!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 873
  • Full-stack Web Developer
    • www.virtueplanet.com
  • VirtueMart Version: Always the latest
Re: Dynamic prices update
« Reply #1 on: February 26, 2012, 16:25:17 pm »
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!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 873
  • Full-stack Web Developer
    • www.virtueplanet.com
  • VirtueMart Version: Always the latest
Re: Dynamic prices update
« Reply #2 on: February 26, 2012, 16:40:16 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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10530
  • VM4.0.7 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Dynamic prices update
« Reply #3 on: February 26, 2012, 17:55:55 pm »
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

  • Beginner
  • *
  • Posts: 9
Re: Dynamic prices update
« Reply #4 on: March 05, 2012, 12:45:12 pm »
Man your'e the f...ing best  ;D

THANK YOU!

MikeUK

  • Global Moderator
  • Full Member
  • *
  • Posts: 1343
Re: Dynamic prices update
« Reply #5 on: April 04, 2012, 17:15:46 pm »
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:

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

TarGG58

  • Beginner
  • *
  • Posts: 9
Re: Dynamic prices update
« Reply #6 on: April 18, 2012, 14:21:37 pm »
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!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 873
  • Full-stack Web Developer
    • www.virtueplanet.com
  • VirtueMart Version: Always the latest
Re: Dynamic prices update
« Reply #7 on: May 14, 2012, 08:10:21 am »
This problem is already resolved in VM 2.0.6