本文整理汇总了PHP中JError::raiseWarnig方法的典型用法代码示例。如果您正苦于以下问题:PHP JError::raiseWarnig方法的具体用法?PHP JError::raiseWarnig怎么用?PHP JError::raiseWarnig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JError
的用法示例。
在下文中一共展示了JError::raiseWarnig方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initPriceForm
private function initPriceForm()
{
if ($this->context == null) {
$this->context = JeproshopContext::getContext();
}
if ($this->product->product_id) {
$shops = JeproshopShopModelShop::getShops();
$countries = JeproshopCountryModelCountry::getStaticCountries($this->context->language->lang_id);
$groups = JeproshopGroupModelGroup::getStaticGroups($this->context->language->lang_id);
$currencies = JeproshopCurrencyModelCurrency::getStaticCurrencies();
$attributes = $this->product->getAttributesGroups((int) $this->context->language->lang_id);
$combinations = array();
if (count($attributes)) {
foreach ($attributes as $attribute) {
$combinations[$attribute->product_attribute_id] = new JObject();
$combinations[$attribute->product_attribute_id]->product_attribute_id = $attribute->product_attribute_id;
if (!isset($combinations[$attribute->product_attribute_id]->attributes)) {
$combinations[$attribute->product_attribute_id]->attributes = '';
}
if (isset($combinations[$attribute->product_attribute_id])) {
$combinations[$attribute->product_attribute_id]->attributes .= $attribute->attribute_name . ' - ';
$combinations[$attribute->product_attribute_id]->price = JeproshopTools::displayPrice(JeproshopTools::convertPrice(JeproshopProductModelProduct::getStaticPrice((int) $this->product->product_id, false, $attribute->product_attribute_id), $this->context->currency), $this->context->currency);
}
}
foreach ($combinations as $combination) {
if (isset($combination->attributes)) {
$combination->attributes = rtrim($combination->attributes, ' - ');
}
}
}
$specificPriceModificationForm = $this->displaySpecificPriceModificationForm($this->context->currency, $shops, $currencies, $countries, $groups);
$this->assignRef('specific_price_modification_form', $specificPriceModificationForm);
$this->assignRef('ecotax_tax_excluded', $this->product->ecotax);
//$this->applyTaxToEcotax();
$this->assignRef('shops', $shops);
/*$admin_one_shop = count($this->context->employee->getAssociatedShops()) == 1;
$this->assignRef('admin_one_shop', $admin_one_shop); */
$this->assignRef('currencies', $currencies);
$this->assignRef('currency', $this->context->currency);
$this->assignRef('countries', $countries);
$this->assignRef('groups', $groups);
$this->assignRef('combinations', $combinations);
$multiShop = JeproshopShopModelShop::isFeaturePublished();
$this->assignRef('multi_shop', $multiShop);
} else {
JError::raiseWarnig(JText::_('COM_JEPROSHOP_YOU_MUST_SAVE_THIS_PRODUCT_BEFORE_ADDING_SPECIFIC_PRICING_MESSAGE'));
$this->product->tax_rules_group_id = JeproshopProductModelProduct::getTaxRulesMostUsedGroupId();
$this->assignRef('ecotax_tax_excluded', 0);
}
$use_tax = JeproshopSettingModelSetting::getValue('use_tax');
$this->assignRef('use_tax', $use_tax);
$use_ecotax = JeproshopSettingModelSetting::getValue('use_eco_tax');
$this->assignRef('use_ecotax', $use_ecotax);
$tax_rules_groups = JeproshopTaxRulesGroupModelTaxRulesGroup::getTaxRulesGroups(true);
$this->assignRef('tax_rules_groups', $tax_rules_groups);
$taxesRatesByGroup = JeproshopTaxRulesGroupModelTaxRulesGroup::getAssociatedTaxRatesByCountryId($this->context->country->country_id);
$this->assignRef('taxesRatesByGroup', $taxesRatesByGroup);
$ecotaxTaxRate = JeproshopTaxModelTax::getProductEcotaxRate();
$this->assignRef('ecotaxTaxRate', $ecotaxTaxRate);
$tax_exclude_tax_option = JeproshopTaxModelTax::taxExcludedOption();
$this->assignRef('tax_exclude_tax_option', $tax_exclude_tax_option);
$this->product->price = JeproshopTools::convertPrice($this->product->price, $this->context->currency, true, $this->context);
if ($this->product->unit_price_ratio != 0) {
$unit_price = JeproshopTools::roundPrice($this->product->price / $this->product->unit_price_ratio, 2);
} else {
$unit_price = 0;
}
$this->assignRef('unit_price', $unit_price);
}