User Tools

Site Tools


merkalt:coupons_using_description

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
merkalt:coupons_using_description [2010/02/02 14:37] – created darumamerkalt:coupons_using_description [2010/02/03 17:35] (current) daruma
Line 1: Line 1:
 **Coupons using description** **Coupons using description**
  
-1. New Coupon is created on sendmail.php page only if customer previously completed his order. Customer data (name and e-mail address) on sendmail.php page taken from DB table, from header record of just completed order. These customer data stored in hidden fields of "Tell a friend" form. When customer fill out "Tell a friend" form fields with one or more e-mail addresses (up to 10 addresses) and click "Send skjema" button, the number of non-empty e-mail addresses is calculated.+1. New Coupon is created automatically on sendmail.php pageonly if customer previously completed his order. Customer data (name and e-mail address) on sendmail.php page are taken from DB table, from header record of just completed order. These customer data are stored in hidden fields of "Tell a friend" form. When customer fill out "Tell a friend" form fields with one or more e-mail addresses (up to 10 addresses) and click "Send skjema" button, the number of non-empty e-mail addresses is calculated. // If name and e-mail address of customer are undefined, customer will be redirected on index page on "Tell a friend" form submit. //
  
 // Initial number of fields in "Tell a friend" form is defined by **SENDMAIL_INIT_TF_FIELDS_AMT** constant in includes/settings.inc.php file. Maximal total number of fields in this for is defined by **SENDMAIL_MAX_TF_FIELDS_AMT** constant in the same file. // // Initial number of fields in "Tell a friend" form is defined by **SENDMAIL_INIT_TF_FIELDS_AMT** constant in includes/settings.inc.php file. Maximal total number of fields in this for is defined by **SENDMAIL_MAX_TF_FIELDS_AMT** constant in the same file. //
  
-Then coupon record with **unique** coupon code is created and value of discount is selected depending on the number of entered e-mail addresses. **Currently the length of coupon code comes to 6 symbols.**+Then coupon record with **unique** coupon code (which is random string) is created and value of discount is selected depending on the number of e-mail addresses, entered by the customer.
  
-// Discount value selected from "[instance prefix]_coupons_discounts", "discount_value" field. "Discount_threshold" field contains minimal number of entered e-mail addresses for each discount value. Currently, we have the following discount schema: //+// Discount value selected from "[instance prefix]_coupons_discounts" table, "discount_value" field. "Discount_threshold" field contains minimal number of entered e-mail addresses for each discount value. At this moment, we have the following discount selection schema: //
  
 ^ discount_threshold ^ discount_value ^ description                          ^ ^ discount_threshold ^ discount_value ^ description                          ^
Line 14: Line 14:
 |                 10 |             30 | from 10 addresses - discount 30%     | |                 10 |             30 | from 10 addresses - discount 30%     |
  
-// You could change current threshold and discount values or add new records for more discount thresholds. Coupons records stored in "[instance  +For instance, customer has entered 3 e-mail addressesCoupon discount value will be set to 10%. If customer has entered 7 e-mail addresses, coupon discount value will be set 20%.
-prefix]_coupons" tablei.e. currently both coupons tables are instance-dependant//+
  
-After "Tell a friend" form submitted, e-mail notification messages created and sent on each entered e-mail address. // These messages created on the basis of template "tell_friend_email.tpl" from templtes folder. // Also notification message with coupon code created and sent to customer// This message created on the basis of "tell_customer_email.tpltemplate from templates folder. //+// You could change current threshold and discount values or add new records for more discount thresholdsCoupons records stored in "[instance prefix]_couponstable. //
  
-2. When customer received notification e-mail with discount coupon code, he could use it on index.php page in order to get discount for the next his order. Coupon code should be entered in "Kupongkodefield. When this field loses focus, coupon code verified against DB table. If coupon code is validdiscount value is appeared, prices and totals are recalculated. **Currently each coupon code could be used unlimited number of times**.+As a result we have coupon record in "[instance prefix]_coupons" table, for example:
  
-**Issues to be resolved**+^ coupon_code ^ coupon_discount ^ 
 +|  AV5DbjRZ                20 |
  
-**1. If coupons which created on merkalt.no root instance are need to be valid for all instances of merkalt.no (bedrift, idband and matmerker), we could introduce separate special prefix for coupon tables ("*_coupons_discountsand "*_coupons")In this case these two tables could be used by all instances of merkalt.no. The same could be done for all site clones - merkalt.dk, labelyourbelongings, etc.**+After "Tell a friend" form submitted, e-mail notification messages created and sent on each entered e-mail address// These messages created on the basis of template "tell_friend_email.tplfrom templtes folder// Also notification message with auto generated coupon code will be created and sent to customer. // This message created on the basis of "tell_customer_email.tpl" template from templates folder//
  
-**2. If coupon code should be used only limited number of times then maximal number of each coupon applications must be defined and additional check must be added in code.**+2. When customer received notification e-mail with discount coupon code, he could use it on index.php page in order to get discount for the next his order. Coupon code should be entered in "Kupongkode" field. When this field loses focus, coupon code verified against DB table. If coupon code is valid, discount value is appeared, prices and totals are recalculated.
  
-**3. Should the length of coupon code be adjustable or fixed?**+3. In order to share coupons between several instances of one site I plan to use common coupons table. In other words, bedrift, idband, matmerker and root instances on merkalt.no (for example) will use the single coupons table, so each coupon will be valid for all intances of merkalt.no.
merkalt/coupons_using_description.1265121453.txt.gz · Last modified: (external edit)