本文整理匯總了PHP中Coupon::edit方法的典型用法代碼示例。如果您正苦於以下問題:PHP Coupon::edit方法的具體用法?PHP Coupon::edit怎麽用?PHP Coupon::edit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Coupon
的用法示例。
在下文中一共展示了Coupon::edit方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: view_settings
/**
* Set up the common elements and individual content of various
* settings pages
*
* Includes VAT, shipping, countries, zones and more
* @access private
* @static
*/
static function view_settings()
{
global $_ARRAYLANG;
\Cx\Core\Setting\Controller\Setting::init('Shop', 'config');
if (ShopSettings::storeSettings() === false) {
// Triggers update
ShopSettings::errorHandler();
\Cx\Core\Setting\Controller\Setting::init('Shop', 'config');
}
// $success may also be '', in which case no changed setting has
// been detected.
// Refresh the Settings, so changes are made visible right away
\Cx\Core\Setting\Controller\Setting::init('Shop', 'config');
self::$pageTitle = $_ARRAYLANG['TXT_SETTINGS'];
self::$objTemplate->loadTemplateFile('module_shop_settings.html');
if (empty($_GET['tpl'])) {
$_GET['tpl'] = '';
}
switch ($_GET['tpl']) {
case 'currency':
self::view_settings_currency();
break;
case 'payment':
Payment::view_settings(self::$objTemplate);
break;
case 'shipment':
self::view_settings_shipment();
break;
case 'countries':
self::view_settings_countries();
break;
case 'zones':
self::view_settings_zones();
break;
case 'mail':
self::view_settings_mail();
break;
case 'vat':
self::view_settings_vat();
break;
case 'coupon':
self::$objTemplate->addBlockfile('SHOP_SETTINGS_FILE', 'settings_block', 'module_shop_discount_coupon.html');
Coupon::edit(self::$objTemplate);
break;
default:
self::view_settings_general();
break;
}
}