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

Bulk change "apply No Rule" to "apply generic rule"

Started by chill_e_g, August 05, 2016, 12:45:45 PM

Previous topic - Next topic

chill_e_g

Hi Guys

For some reason I have a lot of product with "appy no rule" set. This is obviously not the default and I have to change each one manually to "apply generic rules" for discounts to be applied. This happend in a csv import. Virtuemart 3.0.7.4

Is it possible to bulk change to default setting "apply generic rules"?  Hope so, manually is pain in the arse!

GJC Web Design

UPDATE `#__virtuemart_product_prices` SET `product_tax_id`= 0 WHERE `product_tax_id` = '-1'
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chill_e_g

Thanks, but nothing happened, I assume this is a sql query that I must submit, I tried with the # and replacing it with the db prefix.

GJC Web Design

works here.. it is correct

UPDATE `YOURPREFIX_virtuemart_product_prices` SET `product_tax_id`= 0 WHERE `product_tax_id` = '-1'

something must happen .. at a minimum an error message
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chill_e_g

Here is my sql reply:
0 rows affected. (Query took 0.1880 seconds.)
Am I doing something wrong?

There are 2 dropdowns in the product, first 1 applies tax and 2nd for discounts, its the second one that needs the bulk change to "apply generic Rules"

GJC Web Design

adjust this ->  WHERE `product_tax_id` = '-1' to what ever u want changed
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chill_e_g

Thanks, but you are assuming I know what to do

If product_tax_id is the first dropdown, what is the name of the second one for discounts?

GJC Web Design

look in the table.. if mine is set on apply no rule the value is -1

you have a product_tax_id which u want to change to 0
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chill_e_g

Nope, sorry, but I think you are incorrect. I dont want to apply tax rules, below that, I want to apply generic rules, see screen shot attached

GJC Web Design

Yes! genetic is 0 .. that is what the query does..

Check directly in your table
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/