VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: pcr387 on March 04, 2012, 09:05:11 AM

Title: Default shoppergroup part. not applied when registered user has none set
Post by: pcr387 on March 04, 2012, 09:05:11 AM
When a user is newly registered and has no vmuser and thus no shoppergroup set yet, as far as I understand the default shoppergroup should be used.
It seems that this is partially not implemented, as least as far as price display rules are concerned.
In CurrencyDisplay::setPriceArray(), when a joomla user is logged in, the price display rule of the shoppergroup corresponding to the user is fetched from the database. There is however no lookup of the default shoppergrop rule if there is no shoppergroup assigned in the database.

This is tested on VirtueMart 2.0.0RC3 (Joomla! 1.7.3), but the code in question seems to be unchanged in 2.0.2.

I do not really know about the VirtueMart internals, so take the attached patch more as illustration of my point than a fix.

[attachment cleanup by admin]