Before using Promo Codes remember to enable this option by setting promo_codes to true. When the option is enabled the field will be visible in the Shopping Cart.
You can define new Promo Codes using following markup:
1 2 3 4 5 6 7 8 9 |
<script> $('body').ctshop({ promo_codes: 'true', promo_values: { 'discount30%': '30%', 'discount300$': 300, }, }); </script> |
Promo Codes (examples) | Discount value | DESCRIPTION |
“discount30%” | “30%” | Customer will get discount equal to 30% of the full price |
“discount300$” | 300 | Customer will get discount equal to 300 in the currency which is used in the shop |
Creating promotional codes you need to remember that the codes that your clients will use, need to be a string value in the script.
The discount value for the Promo Codes can be set as a string (it has to end with %) or as a number.