Mass edit of coupons

Locked

Started by stevehare on 20 Oct 2006, 3:54 PM · Views: 2,281

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
20 Oct 2006, 3:54 PM
#1
stevehare avatar

stevehare

Zen Follower

Join Date:
Dec 2005
Posts:
108
Plugin Contributions:
0

Mass edit of coupons

I imported a database of pre-arranged discount coupons.

Now, the client would like to have those coupons limited to one individual category of products.

Is there an easy way to mass edit each of these coupons?

There are about 8,000...

20 Oct 2006, 5:26 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Mass edit of coupons

Discount Coupons have Restrictions for Categories and Products ...

Set the Restriction for what Category you want to allow Discount on ... this is done by picking the Catagory from the dropdown and setting to Allow in the other dropdown and click Add ...

Depending on some combinations of Restrictions ... you many need to add the Top Category to Deny ... then add the remaining restrictions ...

Always test a Discount Coupon before releasing it for use ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

20 Oct 2006, 5:31 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Mass edit of coupons

Once you see the settings for 1 coupon setup properly for this, looking in the tables:
coupons
coupon_restrict

You can update the fields ...

Example: 10% OFF all products for DVD ... ACTION Category only ... where categories_id = 10

coupons table:

coupon_id  	 coupon_type  	 coupon_code  	 coupon_amount  	 coupon_minimum_order  	 coupon_start_date  	 coupon_expire_date  	 uses_per_coupon  	 uses_per_user  	 restrict_to_products  	 restrict_to_categories  	 restrict_to_customers  	 coupon_active  	 date_created  	 date_modified  	 coupon_zone_restriction
1 	P 	DVD10OFFACTION 	10.0000 	0.0000 	2006-10-20 00:00:00 	2007-10-20 00:00:00 	0 	0 	  	  	NULL 	Y 	2006-10-20 13:17:58 	2006-10-20 13:17:58 	0

coupon_restrictions table:

restrict_id  	 coupon_id  	 product_id  	 category_id  	 coupon_restrict
1 	1 	0 	10 	N

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

20 Oct 2006, 5:37 PM
#4
stevehare avatar

stevehare

Zen Follower

Join Date:
Dec 2005
Posts:
108
Plugin Contributions:
0

Re: Mass edit of coupons

Thanks...do you know an easy way of updating each coupon all at once?

I know that I can back up the database and edit it in excel/access...then reload, but I'm afraid I'd have problems.

Is there a way to use phpmyadmin to update mass records all at once?

20 Oct 2006, 5:53 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Mass edit of coupons

If all coupons are for 1 categories_id then you need to build a restriction for each coupon for that specific categories_id ...

This can be done either with an import or via phpMyAdmin but I'd need to see what it is you really have set up so far with the 8000 coupons ...

Be sure before attempting anything that you have good backups of your database ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!