Author Topic: Bulk change shopper group under product pricing  (Read 949 times)

allfromboats

  • Beginner
  • *
  • Posts: 4
  • A beginner
Bulk change shopper group under product pricing
« 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



 

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 517
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Bulk change shopper group under product pricing
« Reply #1 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.

--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

allfromboats

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Bulk change shopper group under product pricing
« Reply #2 on: October 16, 2019, 13:13:33 pm »
Sounds good. Could you help me with the SQL query?

allfromboats

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Bulk change shopper group under product pricing
« Reply #3 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

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 517
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Bulk change shopper group under product pricing
« Reply #4 on: October 16, 2019, 13:48:13 pm »
Welcome,

feels much better to have gotten to the SQL yourself, doesn't it. ;-)
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3016
  • VirtueMart Version: 3.6.3
Re: Bulk change shopper group under product pricing
« Reply #5 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

Code: [Select]
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
regards
A

Joomla 3.9.12
php 7.2