Zen Cart Logo

Import Coupon Codes En Masse?

Locked

Views: 4,227

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
12 Jul 2006, 7:31 AM
#1
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Import Coupon Codes En Masse?

Hello there,

Thought this question might be useful for others two, if it is indeed possible. I have set up an affiliation with a group that has id cards for a d10% discount at our bricks and mortar shop. I have a list of the unique numbers, but is it possible to insert them in one go, as there is over 100. I am guessing it is a case of running a sql query, but I have limited knowledge, so I could be wrong. I would be most grateful for any help of any kind.

Regards,

Russ

13 Jul 2006, 5:06 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Import Coupon Codes En Masse?

You would need to write a set of scripts to do the import.

You have two tables: coupons and coupons_description

"coupons" contains all the main info for the coupons:

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     

and "coupons_description" contains the name and description, for each supported language on your site:

coupon_id    
language_id      
coupon_name       
coupon_description 

coupon_id must be the same in each table for each coupon.

Here's one possible method:
http://www.zen-cart.com/forum/showthread.php?t=14096

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 Jul 2006, 2:10 PM
#3
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Import Coupon Codes En Masse?

Thankyou so much Dr Byte,

That is a useful guide to setting up. They are going to be 10% off coupons, so it might not be as difficult as I first thought. Going to have a poke around in SQL and see what I come out with.

Many thanks,

Russ