Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Framework\App\Helper\Context $context, array $couponParameters) | |
getFormatsList () | |
getDefaultLength () | |
getDefaultFormat () | |
getDefaultPrefix () | |
getDefaultSuffix () | |
getDefaultDashInterval () | |
getCharset ($format) | |
getCodeSeparator () | |
![]() | |
__construct (Context $context) | |
isModuleOutputEnabled ($moduleName=null) | |
Data Fields | |
const | COUPON_FORMAT_ALPHANUMERIC = 'alphanum' |
const | COUPON_FORMAT_ALPHABETICAL = 'alpha' |
const | COUPON_FORMAT_NUMERIC = 'num' |
const | COUPON_TYPE_SPECIFIC_AUTOGENERATED = 1 |
const | XML_PATH_SALES_RULE_COUPON_LENGTH = 'promo/auto_generated_coupon_codes/length' |
const | XML_PATH_SALES_RULE_COUPON_FORMAT = 'promo/auto_generated_coupon_codes/format' |
const | XML_PATH_SALES_RULE_COUPON_PREFIX = 'promo/auto_generated_coupon_codes/prefix' |
const | XML_PATH_SALES_RULE_COUPON_SUFFIX = 'promo/auto_generated_coupon_codes/suffix' |
const | XML_PATH_SALES_RULE_COUPON_DASH_INTERVAL = 'promo/auto_generated_coupon_codes/dash' |
Protected Attributes | |
$_couponParameters | |
![]() | |
$_moduleName | |
$_request | |
$_moduleManager | |
$_logger | |
$_urlBuilder | |
$_httpHeader | |
$_eventManager | |
$_remoteAddress | |
$urlEncoder | |
$urlDecoder | |
$scopeConfig | |
$_cacheConfig | |
Additional Inherited Members | |
![]() | |
_getRequest () | |
_getModuleName () | |
_getUrl ($route, $params=[]) | |
Helper for coupon codes creating and managing
@api
Definition at line 15 of file Coupon.php.
__construct | ( | \Magento\Framework\App\Helper\Context | $context, |
array | $couponParameters | ||
) |
\Magento\Framework\App\Helper\Context | $context | |
array | $couponParameters |
Definition at line 53 of file Coupon.php.
getCharset | ( | $format | ) |
Get Coupon's alphabet as array of chars
string | $format |
Definition at line 146 of file Coupon.php.
getCodeSeparator | ( | ) |
getDefaultDashInterval | ( | ) |
Get dashes occurrences frequency in coupon code
Definition at line 132 of file Coupon.php.
getDefaultFormat | ( | ) |
getDefaultLength | ( | ) |
getDefaultPrefix | ( | ) |
getDefaultSuffix | ( | ) |
getFormatsList | ( | ) |
|
protected |
Definition at line 47 of file Coupon.php.
const COUPON_FORMAT_ALPHABETICAL = 'alpha' |
Definition at line 22 of file Coupon.php.
const COUPON_FORMAT_ALPHANUMERIC = 'alphanum' |
Constants which defines all possible coupon codes formats
Definition at line 20 of file Coupon.php.
const COUPON_FORMAT_NUMERIC = 'num' |
Definition at line 24 of file Coupon.php.
const COUPON_TYPE_SPECIFIC_AUTOGENERATED = 1 |
Defines type of Coupon
Definition at line 29 of file Coupon.php.
const XML_PATH_SALES_RULE_COUPON_DASH_INTERVAL = 'promo/auto_generated_coupon_codes/dash' |
Definition at line 42 of file Coupon.php.
const XML_PATH_SALES_RULE_COUPON_FORMAT = 'promo/auto_generated_coupon_codes/format' |
Definition at line 36 of file Coupon.php.
const XML_PATH_SALES_RULE_COUPON_LENGTH = 'promo/auto_generated_coupon_codes/length' |
XML paths to coupon codes generation options
Definition at line 34 of file Coupon.php.
const XML_PATH_SALES_RULE_COUPON_PREFIX = 'promo/auto_generated_coupon_codes/prefix' |
Definition at line 38 of file Coupon.php.
const XML_PATH_SALES_RULE_COUPON_SUFFIX = 'promo/auto_generated_coupon_codes/suffix' |
Definition at line 40 of file Coupon.php.