[-] 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>
|
<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} />
|
<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} />
|
<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>
|
<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>
|
||||||
<div id="apply_discount_percent_div">
|
<div id="apply_discount_percent_div">
|
||||||
<label>{l s='Value (%)'}</label>
|
<label>{l s='Value'}</label>
|
||||||
<div class="margin-form">
|
<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>
|
<p>{l s='Does not apply to the shipping costs'}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="apply_discount_amount_div">
|
<div id="apply_discount_amount_div">
|
||||||
<label>{l s='Value (¤)'}</label>
|
<label>{l s='Value'}</label>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<input type="text" id="reduction_amount" name="reduction_amount" value="{$currentTab->getFieldValue($currentObject, 'reduction_amount')|floatval}" />
|
<input type="text" id="reduction_amount" name="reduction_amount" value="{$currentTab->getFieldValue($currentObject, 'reduction_amount')|floatval}" />
|
||||||
<select name="reduction_currency">
|
<select name="reduction_currency">
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
<div class="translatable">
|
<div class="translatable">
|
||||||
{foreach from=$languages item=language}
|
{foreach from=$languages item=language}
|
||||||
<div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $defaultLanguage}block{else}none{/if};float:left">
|
<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>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -371,13 +371,26 @@ class AdminCartRulesControllerCore extends AdminController
|
|||||||
|
|
||||||
$product_rule_groups = $this->getProductRuleGroupsDisplay($current_object);
|
$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(
|
Context::getContext()->smarty->assign(
|
||||||
array(
|
array(
|
||||||
'show_toolbar' => true,
|
'show_toolbar' => true,
|
||||||
'toolbar_btn' => $this->toolbar_btn,
|
'toolbar_btn' => $this->toolbar_btn,
|
||||||
'toolbar_fix' => $this->toolbar_fix,
|
'toolbar_fix' => $this->toolbar_fix,
|
||||||
'title' => $this->l('Payment : Cart Rules '),
|
'title' => $this->l('Payment : Cart Rules '),
|
||||||
'languages' => Language::getLanguages(),
|
|
||||||
'defaultDateFrom' => date('Y-m-d H:00:00'),
|
'defaultDateFrom' => date('Y-m-d H:00:00'),
|
||||||
'defaultDateTo' => date('Y-m-d H:00:00', strtotime('+1 month')),
|
'defaultDateTo' => date('Y-m-d H:00:00', strtotime('+1 month')),
|
||||||
'customerFilter' => $customer_filter,
|
'customerFilter' => $customer_filter,
|
||||||
@@ -385,15 +398,16 @@ class AdminCartRulesControllerCore extends AdminController
|
|||||||
'reductionProductFilter' => $reduction_product_filter,
|
'reductionProductFilter' => $reduction_product_filter,
|
||||||
'defaultCurrency' => Configuration::get('PS_CURRENCY_DEFAULT'),
|
'defaultCurrency' => Configuration::get('PS_CURRENCY_DEFAULT'),
|
||||||
'defaultLanguage' => Configuration::get('PS_LANG_DEFAULT'),
|
'defaultLanguage' => Configuration::get('PS_LANG_DEFAULT'),
|
||||||
'currencies' => Currency::getCurrencies(),
|
'languages' => $languages,
|
||||||
'countries' => $current_object->getAssociatedRestrictions('country', true, true),
|
'currencies' => $currencies,
|
||||||
'carriers' => $current_object->getAssociatedRestrictions('carrier', true, true),
|
'countries' => $countries,
|
||||||
'groups' => $current_object->getAssociatedRestrictions('group', false, true),
|
'carriers' => $carriers,
|
||||||
'shops' => $current_object->getAssociatedRestrictions('shop', false, false),
|
'groups' => $groups,
|
||||||
'cart_rules' => $current_object->getAssociatedRestrictions('cart_rule', false, true),
|
'shops' => $shops,
|
||||||
|
'cart_rules' => $cart_rules,
|
||||||
'product_rule_groups' => $product_rule_groups,
|
'product_rule_groups' => $product_rule_groups,
|
||||||
'product_rule_groups_counter' => count($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,
|
'currentIndex' => self::$currentIndex,
|
||||||
'currentToken' => $this->token,
|
'currentToken' => $this->token,
|
||||||
'currentObject' => $current_object,
|
'currentObject' => $current_object,
|
||||||
|
|||||||
Reference in New Issue
Block a user