VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Seoirserob on June 23, 2015, 14:01:44 PM

Title: VM3 calculate cost error in multivendor
Post by: Seoirserob on June 23, 2015, 14:01:44 PM
Joomla 3.4.1 VM 3.0.9, multivendor

I have created a calculation rule, to add a margin to a product price. The form for this calculation has an option "shared", which is ticked.
However, the very last option on this form is to select a vendor.
I select the vendor and save.

I then click through to edit/create a product, enter the final price of the product, and tick "calculate cost".

This is successful ONLY if I am logged in as the same vendor selected in the calculation rule above.

If I am logged in as a different vendor to the one set in the calculation rule, then the "calculate cost" will not work.

The same failed operation occurs, for all users, if the vendor in the calculation rule is set to "0", or left at "please select".
Title: Re: VM3 calculate cost error in multivendor
Post by: Milbo on June 24, 2015, 20:02:48 PM
Interesting observation. But does it work correctly, when you enter the net price?
Title: Re: VM3 calculate cost error in multivendor
Post by: Seoirserob on June 24, 2015, 22:27:23 PM
Yes, it would appear to operate as normal when the cost price is entered.

And the over-ride price appears to work correctly.

Sometimes when the final price is entered, with calculate cost selected, it reads this as the cost price instead, and calculates as if you had entered the cost price. I suspect this is in cases where there has been an existing price, ie when editing a product, rather than creating one, and the calculation is taken from the "base" price. To reproduce the original problem, you'd need to delete the existing price and create a new one, or, enter "0" in cost and save, then continue.

Pricing appears to be quite buggy in multi-vendor. I would love to continue working on the project I have started using VM, but vendors need to be able to enter their own prices as Cost OR Final, with a common margin calculated either way.
Title: Re: VM3 calculate cost error in multivendor
Post by: Seoirserob on June 28, 2015, 22:39:11 PM
I'm interested to know if there is a fix available for this?

Maybe it's not a priority, but is it very complicated? . . will it be rectified in an update in the near future?

Thanks.
Title: Re: VM3 calculate cost error in multivendor
Post by: Milbo on June 29, 2015, 07:00:02 AM
This is a project, that means you can influence this yourself.

You can write a fix, send it to me and I check and integrate it. You can also buy a http://extensions.virtuemart.net/support/virtuemart-supporter-membership-detail Silver/Gold and then write that you wanna have it fixed.
As hint, the general problem is that the logged in user determines the used calculation rules.
Title: Re: VM3 calculate cost error in multivendor
Post by: Seoirserob on July 02, 2015, 12:31:10 PM
I didn't see any information in your link as to the difference between bronze/silver/gold.

I understand from your post, Milbo (and thanks for the advice), that I would need a silver/gold in order to request this fix. I am not a developer myself, I am highly qualified in design, but my knowledge of 'code' (as they call it these days!) is purely through osmosis, and I would not be confident writing the fix myself, nor do I have the time to learn right now.
Title: Re: VM3 calculate cost error in multivendor
Post by: Milbo on July 02, 2015, 17:14:38 PM
At the moment I have just an idea for the reason. I estimate 1-2 hours.