AAAAPKE\& view.html.phpnuW+AgetCoupon(); $this->SetViewTitle('', $coupon->coupon_code); $layoutName = JRequest::getWord('layout', 'default'); // if(Vmconfig::get('multix','none')!=='none'){ // $vendorList= ShopFunctions::renderVendorList($coupon->virtuemart_vendor_id); // $this->assignRef('vendorList', $vendorList); // } $vendorModel = VmModel::getModel('Vendor'); $vendorModel->setId(1); $vendor = $vendorModel->getVendor(); $currencyModel = VmModel::getModel('Currency'); $currencyModel = $currencyModel->getCurrency($vendor->vendor_currency); $this->assignRef('vendor_currency', $currencyModel->currency_symbol); if ($layoutName == 'edit') { if ($coupon->virtuemart_coupon_id < 1) { // Set a default expiration date $_expTime = explode(',', VmConfig::get('coupons_default_expire','14,D')); if (!empty( $_expTime[1]) && $_expTime[1] == 'W') { $_expTime[0] = $_expTime[0] * 7; $_expTime[1] = 'D'; } if (version_compare(PHP_VERSION, '5.3.0', '<')) { $_dtArray = getdate(time()); if ($_expTime[1] == 'D') { $_dtArray['mday'] += $_expTime[0]; } elseif ($_expTime[1] == 'M') { $_dtArray['mon'] += $_expTime[0]; } elseif ($_expTime[1] == 'Y') { $_dtArray['year'] += $_expTime[0]; } $coupon->coupon_expiry_date = mktime($_dtArray['hours'], $_dtArray['minutes'], $_dtArray['seconds'] , $_dtArray['mon'], $_dtArray['mday'], $_dtArray['year']); } else { $_expDate = new DateTime(); $_expDate->add(new DateInterval('P'.$_expTime[0].$_expTime[1])); $coupon->coupon_expiry_date = $_expDate->format("U"); } } $this->assignRef('coupon', $coupon); $this->addStandardEditViewCommands(); } else { $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model); $coupons = $model->getCoupons(); $this->assignRef('coupons', $coupons); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } parent::display($tpl); } } // pure php no closing tag PKE\ index.htmlnuW+APKE\M!==tmpl/default.phpnuW+A
coupons); $i < $n; $i++) { $row = $this->coupons[$i]; $checked = JHTML::_('grid.id', $i, $row->virtuemart_coupon_id); $editlink = JROUTE::_('index.php?option=com_virtuemart&view=coupon&task=edit&cid[]=' . $row->virtuemart_coupon_id); ?>
sort('virtuemart_coupon_id', 'COM_VIRTUEMART_ID') ?>
coupon_code; ?> percent_or_total); ?> coupon_type); ?> coupon_value); ?> percent_or_total=='percent') echo '%' ; else echo $this->vendor_currency; ?> coupon_value_valid); ?> vendor_currency; ?> coupon_type=='gift'){ if ($row->coupon_used ) { echo JText::_('COM_VIRTUEMART_YES'); } else { echo JText::_('COM_VIRTUEMART_NO'); } } ?> virtuemart_coupon_id); ?>
pagination->getListFooter(); ?>
PKE\Xo o tmpl/edit.phpnuW+A
coupon->coupon_code,'class="inputbox"','',20,32); ?> coupon->coupon_value,'class="inputbox"','',10,32); ?> coupon->percent_or_total); ?> coupon->coupon_type,'','value', 'text',false) ; ?> coupon->coupon_value_valid, 'class="inputbox"','',10,255,' ' . $this->vendor_currency ); ?> coupon->coupon_start_date , 'coupon_start_date') ); ?> coupon->coupon_expiry_date,'coupon_expiry_date') ); ?>
addStandardHiddenToForm(); ?>
PKE\tmpl/index.htmlnuW+APKE\)tmpl/.htaccessnuW+A Order allow,deny Deny from all PKE\) .htaccessnuW+A Order allow,deny Deny from all PKE\& view.html.phpnuW+APKE\ ; index.htmlnuW+APKE\M!==u tmpl/default.phpnuW+APKE\Xo o tmpl/edit.phpnuW+APKE\'tmpl/index.htmlnuW+APKE\)'tmpl/.htaccessnuW+APKE\) (.htaccessnuW+APKR)