News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

2.0.18 wrong multiple price for children products

Started by atrus, January 08, 2013, 21:45:14 PM

Previous topic - Next topic

atrus

Correct; i really hope the devs will take a look at this bug at some point, it's there for some time now.

Rgrds

Joseph Kwan

In case the child product price is the same as parent product price,  comment out lines 625-627 in the file /plugins/vmcustom/stockable/stockable.php will probably help.

Not sure this will work but you can give it a try and report back.
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

atrus

Hi Joseph,

Removed the following as per your suggestion:

{

            $db = JFactory::getDBO();

            $db->setQuery('SELECT `product_price` FROM `#__virtuemart_product_prices`  WHERE `virtuemart_product_id`="' . (int)$selected . '" ');

            if ($price = $db->loadResult()) $product->product_price = (float)$price;

         }

and it seems to WORK!

So it this a VM bug?

We are now checking / testing all other functionalities to see if anything is broken,thanks again!

Joseph Kwan

Good news. As I said, the stockable price calculation does not take into account the shopper group and other issue. This is a bug that needs to be fixed.

By commenting out the 3 lines, we are bypassing the stockable recalculation. That makes VM resort to the parent price. This works only if the parent and child price are the same. I don't foresee there are problems other than that.

Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

atrus

#19
QuoteThis works only if the parent and child price are the same.

Correct, this solution ofcourse doesn't work when the child product price is different than the parent product.

I'm trying to fix this by changing line 626 to smth like:

$db->setQuery('SELECT `product_price` FROM `#__virtuemart_product_prices`  WHERE `virtuemart_product_id`="' . (int)$selected . '" AND `virtuemart_shoppergroup_id`="' . (int)$_shopperGroupId . '" ');

But it's not working, i guess there is more than. Would appreciate a fix by the devs

Rgrds

atrus

Hi to all,

Any fix included in the latest svn?

Rgrds


Milbo

The problem is that the stockable plugin is not using the standard vm method to load a product. So the normal stuff of deriving values from the parent do not work as expected.

We have two different methods to display stockable variants. One method is by openglobal, great js stuff and nice to handle. But it is old vm1 style, also the reason vm1 veterans prefer this method.

The other method "dynamical child variants" is using the vm methods to load a product. All parent/child stuff is there working as expected.

The future is a bit different. I want to add for vm2.1 a stock for every customfield, so we dont need anylonger this complex constructions, just for the stock.

The real fun with this stuff is atm anyway most time not used. For example to change the product image or dimensions.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

travelbaba

Hello,

same problem for me. It looks like its' a bug of virtuemart.

DID YOU FIND THE SOLUTION?

I have many shopper groups, with different prices.
Let's say for group A the premier bag (all different color variant) costs 9 EUr
For group B 10 EUr
for group C 11

If I log with account A and I check all the variants it appears sometime 9, sometime 10, 11 with no reason.

Please check here: www.timeoutsport.com
login:
test test
and go to
http://www.timeoutsport.com/premier.html

thanks
Matteo

atrus

Hello Mateo,

Pls find a fix here:

http://forum.virtuemart.net/index.php?topic=117080.0

Just note that above fix works only if the user is assigned to 1 group, not multiple shopper groups.

Rgrds,
Chris

travelbaba

Hello,

it works!!!!

If you could reach you I will kiss your feet!!!!!

I had a sleepless night, and this morning You made me a wonderful gift!!!!!

THanks

Matteo