Discount Code
AddDiscountCode
Add a discount code to the customer's current order.
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
code | string | Code to add. |
Example
Arguments
Name | Type | Default | Description |
code | string | | Code to add. |
storeId | long | _storeId | Id of the store. |
async | boolean | true | Specifies if a request should be asynchronously. |
successfn | function(json[, jQForm]) | | A function to be called if the request succeeds. |
errorfn | function(json) | | A function to be called if the request fails. |
Return values
Type | Description |
methodsCalled | An object containing information about the methods called, related data to the methods and the order object if present.
Will only be returned if you use async = false |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
code | string | Code to add. |
Return values
Type | Description |
AppliedDiscountCode | The added discount code object. |
Example
RemoveDiscountCode
Remove a discount code from the customer's current order.
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
code | string | Code to remove. |
Example
Arguments
Name | Type | Default | Description |
code | string | | Code to remove. |
storeId | long | _storeId | Id of the store. |
async | boolean | true | Specifies if a request should be asynchronously. |
successfn | function(json[, jQForm]) | | A function to be called if the request succeeds. |
errorfn | function(json) | | A function to be called if the request fails. |
Return values
Type | Description |
methodsCalled | An object containing information about the methods called, related data to the methods and the order object if present.
Will only be returned if you use async = false |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
code | string | Code to remove. |
Return values
Type | Description |
AppliedDiscountCode | The removed discount code object. |
Example
Last Updated: 9/2/2019, 10:22:34 AM