Can i delete multiple shopping cart price rules at a time in magento v1.7?

Category: Magento

williampatey
Asked:
2012-10-11 9:22 am EST

Hits: 1,509
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!!!

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

JacobIMH
Staff
9,968 Points
2012-10-11 1:05 pm EST
Hello William, thanks for the question.

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 (support@inmotionhosting.com) 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.

- Jacob

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!