Forum Moderators: coopster

Message Too Old, No Replies

promo code system

using google checkout & paypal

         

sakredei

2:22 am on Jan 24, 2007 (gmt 0)

10+ Year Member



i was hoping maybe someone can point me in the right direction here: i am selling something online, but only a single product, so i don't really need a shopping card. for now payment is just processed through google and/or paypal. my problem is that i have many different promo codes so that i can track who is referring the customer, but i'm not sure of the most effective way to implement a system to change the price. anyone have suggestions to another post in regards to this or maybe some kind of open source code i could start with?

coopster

2:34 pm on Jan 24, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I don't off hand, unless you downloaded the source code for one of the more popular open source commerce solutions and scanned their code. However, I believe this would be fairly simple for you to implement yourself using a switch [php.net] or other control structure in your form processing page. Pseudocode ...
switch ($promoCode) { 
case 'BIGPROMO':
$discount = 200.00;
break;
case 'MEDPROMO':
$discount = 100.00;
break;
default:
$discount = 0;
}