VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: allfromboats on October 16, 2019, 11:22:14 AM

Title: Bulk change shopper group under product pricing
Post by: allfromboats on October 16, 2019, 11:22:14 AM
Hi,
he we run the latest version of VirtueMart.

We have several hundred products in our shop. At the moment users who are not logged in, cannot see any prices. We want to change this, so any user who visits the site can see prices and add products to the cart.

Actual we have a shopper group called "members". All products are set to the shopper group under the 'Product pricing' (NOT under Product information)  to "members".

How can i change this field for all products to "available for all" ? Because i really donĀ“t want to open each article and set it manually.

Thanks
Max



Title: Re: Bulk change shopper group under product pricing
Post by: StefanSTS on October 16, 2019, 12:25:05 PM
Fastest will be to set the column virtuemart_shoppergroup_id in your database table #__virtuemart_product_prices to 0.
Should take a second.

Title: Re: Bulk change shopper group under product pricing
Post by: allfromboats on October 16, 2019, 13:13:33 PM
Sounds good. Could you help me with the SQL query?
Title: Re: Bulk change shopper group under product pricing
Post by: allfromboats on October 16, 2019, 13:44:16 PM
Ok, i got it:

UPDATE #(prefix)_virtuemart_product_prices
SET
`virtuemart_shoppergroup_id` = 0
WHERE 1

Thanks
Title: Re: Bulk change shopper group under product pricing
Post by: StefanSTS on October 16, 2019, 13:48:13 PM
Welcome,

feels much better to have gotten to the SQL yourself, doesn't it. ;-)
Title: Re: Bulk change shopper group under product pricing
Post by: AH on October 16, 2019, 14:08:21 PM
IMHO you should have ensured you only change where the shoppergroup was equal to the mis-configured shoppergroup

UPDATE #(prefix)_virtuemart_product_prices
SET
`virtuemart_shoppergroup_id` = 0

where `virtuemart_shoppergroup_id` = the configured shoppergroup


But my opinion may be wrong because you did not state the full information about the current price table values