• Online Demo
  • 30-day Free Trial

A * denotes a required field.

importCoupon(&$coupon) – Import a Coupon.

Input:

  1. Array (
  2.     *[id] => 1
  3.     [code] => DISCOUNT
  4.     [discount] => 5.00
  5.     [used] => 0
  6.     [max] => 10
  7.     [start] => 2008-01-01 12:59:59
  8.     [end] => 2008-02-01 12:59:59
  9.     [active] => 1
  10. )

Returns:NULL

Definition:

  • [id] – Coupon ID.
  • [code] – Coupon code.
  • [discount] – Discount percentage.
  • [used] – Count of how many of these coupons have been used.
  • [max] – Maximum number of these coupons to allow.
  • [start] – Date/time to begin allowing this coupon.
  • [end] – Date/time to stop allowing this coupon.
  • [active] – Active status (1 – active, 0 – inactive).


Import Methods