[-] BO : small fixes on AdminCartRules #PSFV-506
This commit is contained in:
@@ -15,20 +15,20 @@
|
||||
<label class="t" for="apply_discount_percent"> <img src="../img/admin/enabled.gif" alt="{l s='Enabled'}" title="{l s='Enabled'}" style="cursor:pointer" /> {l s='Percent (%)'}</label>
|
||||
|
||||
<input type="radio" name="apply_discount" id="apply_discount_amount" value="amount" {if $currentTab->getFieldValue($currentObject, 'reduction_amount')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="apply_discount_amount"> <img src="../img/admin/enabled.gif" alt="{l s='Enabled'}" title="{l s='Enabled'}" style="cursor:pointer" /> {l s='Amount (¤)'}</label>
|
||||
<label class="t" for="apply_discount_amount"> <img src="../img/admin/enabled.gif" alt="{l s='Enabled'}" title="{l s='Enabled'}" style="cursor:pointer" /> {l s='Amount'}</label>
|
||||
|
||||
<input type="radio" name="apply_discount" id="apply_discount_off" value="off" {if !$currentTab->getFieldValue($currentObject, 'reduction_amount')|intval && !$currentTab->getFieldValue($currentObject, 'reduction_percent')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="apply_discount_off"> <img src="../img/admin/disabled.gif" alt="{l s='Disabled'}" title="{l s='Disabled'}" style="cursor:pointer" /> {l s='None'}</label>
|
||||
</div>
|
||||
<div id="apply_discount_percent_div">
|
||||
<label>{l s='Value (%)'}</label>
|
||||
<label>{l s='Value'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" id="reduction_percent" name="reduction_percent" value="{$currentTab->getFieldValue($currentObject, 'reduction_percent')|floatval}" />
|
||||
<input type="text" id="reduction_percent" name="reduction_percent" value="{$currentTab->getFieldValue($currentObject, 'reduction_percent')|floatval}" style="width:40px" /> %
|
||||
<p>{l s='Does not apply to the shipping costs'}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="apply_discount_amount_div">
|
||||
<label>{l s='Value (¤)'}</label>
|
||||
<label>{l s='Value'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" id="reduction_amount" name="reduction_amount" value="{$currentTab->getFieldValue($currentObject, 'reduction_amount')|floatval}" />
|
||||
<select name="reduction_currency">
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
<div class="translatable">
|
||||
{foreach from=$languages item=language}
|
||||
<div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $defaultLanguage}block{else}none{/if};float:left">
|
||||
<input type="text" id="name_{$language.id_lang}" name="name_{$language.id_lang}" value="{$currentTab->getFieldValue($currentObject, 'name', $language.id_lang)}" />
|
||||
<input type="text" id="name_{$language.id_lang}" name="name_{$language.id_lang}" value="{$currentTab->getFieldValue($currentObject, 'name', $language.id_lang)}" style="width:400px" />
|
||||
<sup>*</sup>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
@@ -370,6 +370,20 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
$reduction_product_filter = trim($product->reference.' '.$product->name);
|
||||
|
||||
$product_rule_groups = $this->getProductRuleGroupsDisplay($current_object);
|
||||
|
||||
$attribute_groups = AttributeGroup::getAttributesGroups(Context::getContext()->language->id);
|
||||
$currencies = Currency::getCurrencies();
|
||||
$languages = Language::getLanguages();
|
||||
$countries = $current_object->getAssociatedRestrictions('country', true, true);
|
||||
$groups = $current_object->getAssociatedRestrictions('group', false, true);
|
||||
$shops = $current_object->getAssociatedRestrictions('shop', false, false);
|
||||
$cart_rules = $current_object->getAssociatedRestrictions('cart_rule', false, true);
|
||||
$carriers = $current_object->getAssociatedRestrictions('carrier', true, false);
|
||||
foreach ($carriers as &$carriers2)
|
||||
foreach ($carriers2 as &$carrier)
|
||||
foreach ($carrier as $field => &$value)
|
||||
if ($field == 'name' && $value == '0')
|
||||
$value = Configuration::get('PS_SHOP_NAME');
|
||||
|
||||
Context::getContext()->smarty->assign(
|
||||
array(
|
||||
@@ -377,7 +391,6 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
'toolbar_btn' => $this->toolbar_btn,
|
||||
'toolbar_fix' => $this->toolbar_fix,
|
||||
'title' => $this->l('Payment : Cart Rules '),
|
||||
'languages' => Language::getLanguages(),
|
||||
'defaultDateFrom' => date('Y-m-d H:00:00'),
|
||||
'defaultDateTo' => date('Y-m-d H:00:00', strtotime('+1 month')),
|
||||
'customerFilter' => $customer_filter,
|
||||
@@ -385,15 +398,16 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
'reductionProductFilter' => $reduction_product_filter,
|
||||
'defaultCurrency' => Configuration::get('PS_CURRENCY_DEFAULT'),
|
||||
'defaultLanguage' => Configuration::get('PS_LANG_DEFAULT'),
|
||||
'currencies' => Currency::getCurrencies(),
|
||||
'countries' => $current_object->getAssociatedRestrictions('country', true, true),
|
||||
'carriers' => $current_object->getAssociatedRestrictions('carrier', true, true),
|
||||
'groups' => $current_object->getAssociatedRestrictions('group', false, true),
|
||||
'shops' => $current_object->getAssociatedRestrictions('shop', false, false),
|
||||
'cart_rules' => $current_object->getAssociatedRestrictions('cart_rule', false, true),
|
||||
'languages' => $languages,
|
||||
'currencies' => $currencies,
|
||||
'countries' => $countries,
|
||||
'carriers' => $carriers,
|
||||
'groups' => $groups,
|
||||
'shops' => $shops,
|
||||
'cart_rules' => $cart_rules,
|
||||
'product_rule_groups' => $product_rule_groups,
|
||||
'product_rule_groups_counter' => count($product_rule_groups),
|
||||
'attribute_groups' => AttributeGroup::getAttributesGroups(Context::getContext()->language->id),
|
||||
'attribute_groups' => $attribute_groups,
|
||||
'currentIndex' => self::$currentIndex,
|
||||
'currentToken' => $this->token,
|
||||
'currentObject' => $current_object,
|
||||
|
||||
Reference in New Issue
Block a user