Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

referral GV coupons


Guest

Recommended Posts

Here is the first post to developp this little hack to add to the allready existing mod: Credit Class & Gift Voucher rel for 2.2.2.

 

I?m starting to look at the code to make and would like to share my ideas before doing it:

 

To redeem the coupon I was thinking about two ways of doing it.

The first way was giving a link that could track the referred customer but I found it too tricky and with to many security problems to solve so I decided to look at the create_account.php page and will do the hack this way:

1. create a gv_email.sql table to track the email sent to the referral

in this table you will find 3 field: email field, customer ID (the referrer to track), the redeem value (to redeem the refferer coupon)

2. add a line in create_account that will check this table to see if the referral address exist while creating the account.

3. if the email exist than use the same code as the ICW - CREDIT CLASS CODE but with 2 new lines in the configure.sql table for referral gift voucher or referral discount voucher.

4. If the email exist in the gv-email.sql, alter the value from 0 to 1 in the redeem field in order to redeem the coupon for the referrer when the registration process is done.

5. if the subscription succeed send automaticly by email to the referrer an new coupon that have to be set as gift or discount in a new line in configure.sql table

 

I?ll check later how to send the invitation to subscribe but I think It should go the same way as the gv_send.php

 

Anyone can see any error in the way I?ll develop this?

Link to comment
Share on other sites

  • 3 months later...

looks ok in theory. can't believe no one responded to this thread at all. as I was sloggin my way through the CCGV thread, I saw this and thought it was a great idea. It's been many, many months, hope you haven't given up on it.

Link to comment
Share on other sites

Hi there,

 

I didn't give up but I had to concentrate on other issues. I'm glad you like this Idea. I should now try to developp it but it seems harder than I thought (i'm not a proffessional coder).

 

Regards

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...