Can i delete multiple shopping cart price rules at a time in magento v1.7?
I have accidenatlly managed to upload 1491 shopping cart price rule voucher codes (whilst fidling with an elgento groupon codes extension and an example csv file)in Magento V1.7. The csv file I was uploading only had 5 voucher codes on but it seems to have generated a whole load on its own and instead of uploading 5 it has uploaded nearly 1500! I really want to delete these all but dont have the time to go into each rule and delete them manually. Is there a way I can batch delete them without deleting the rules I want to keep? PLEASE HELP!!!
This sounds like something more than likely that will need to be manually done at the database level. You can typically use phpMyAdmin to quickly work on your database using certain queries to update multiple database entries at once, instead of relying on your application's administration interface.
I'd recommend first taking a look at getting into phpMyAdmin and pulling up your database:
Manage a MySQL database in phpMyAdmin
Before doing any modifying I'd take an export of your current database, that way if you happen to break anything in your clean-up process you can simply revert back to your working version:
Backing up your WordPress
The exact queries you'll need to use to mass update things is gonna be a bit hard to guess without taking a look at your database myself. I'd recommend submitting a ticket so we can pull up your account and database directly.
In order to submit a ticket, please shoot an e-mail to (firstname.lastname@example.org) being sure to include your username, and the original cPanel password of your account or the last 4 digits of the credit card on file for verification. Or you can submit a ticket directly through our support interface here:
Submit a support ticket
The general structure of a SQL query to update things like this would appear something along the lines of this:
UPDATE `magento_items` SET voucher_code = replace(voucher_code "Groupon-012345", "NONE") WHERE item_number != 001 AND item_number != 002 AND item_number != 003
This would basically go through a table called (magento_items) and change any (voucher_code) field entries that are (Groupon-012345) and change them to (NONE) where the (item_number) is not 001, 002, or 003. So if you had 100 items it'd update all but your first 3 in this case.
Hope that gets you headed in the right direction. If you have any further questions feel free to comment below, or submit a ticket and we'd be glad to take a deeper look into this issue for you.
Like this Question? Tweet
Support Center Login
Social Media Login
It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!