// Fix cart rules bootstrap design
This commit is contained in:
@@ -1,42 +1,42 @@
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Free shipping'}</label>
|
||||
<div class="input-group col-lg-2">
|
||||
<span class="switch prestashop-switch">
|
||||
<input type="radio" name="free_shipping" id="free_shipping_on" value="1" {if $currentTab->getFieldValue($currentObject, 'free_shipping')|intval}checked="checked"{/if} />
|
||||
<label class="t radio" for="free_shipping_on">
|
||||
<i class="icon-check-sign"></i> {l s='Yes'}
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes'}
|
||||
</label>
|
||||
<input type="radio" name="free_shipping" id="free_shipping_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'free_shipping')|intval}checked="checked"{/if} />
|
||||
<label class="t radio" for="free_shipping_off">
|
||||
<i class="icon-ban-circle"></i> {l s='No'}
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No'}
|
||||
</label>
|
||||
<span class="slide-button btn btn-default"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Apply a discount'}</label>
|
||||
<div class="input-group col-lg-8">
|
||||
<span class="switch prestashop-switch switch-three">
|
||||
<input type="radio" name="apply_discount" id="apply_discount_percent" value="percent" {if $currentTab->getFieldValue($currentObject, 'reduction_percent')|floatval > 0}checked="checked"{/if} />
|
||||
<label class="t radio" for="apply_discount_percent">
|
||||
<i class="icon-check-sign"></i> {l s='Percent (%)'}
|
||||
<i class="icon-check-sign color_success"></i> {l s='Percent (%)'}
|
||||
</label>
|
||||
<input type="radio" name="apply_discount" id="apply_discount_amount" value="amount" {if $currentTab->getFieldValue($currentObject, 'reduction_amount')|floatval > 0}checked="checked"{/if} />
|
||||
<label class="t radio" for="apply_discount_amount">
|
||||
<i class="icon-check-sign"></i> {l s='Amount'}
|
||||
<i class="icon-check-sign color_success"></i> {l s='Amount'}
|
||||
</label>
|
||||
<input type="radio" name="apply_discount" id="apply_discount_off" value="off" {if !$currentTab->getFieldValue($currentObject, 'reduction_amount')|floatval > 0 && !$currentTab->getFieldValue($currentObject, 'reduction_percent')|floatval > 0}checked="checked"{/if} />
|
||||
<label class="t radio" for="apply_discount_off">
|
||||
<i class="icon-ban-circle"></i> {l s='None'}
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='None'}
|
||||
</label>
|
||||
<span class="slide-button btn btn-default"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="apply_discount_percent_div" class="row">
|
||||
<div id="apply_discount_percent_div" class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Value'}</label>
|
||||
<div class="input-group col-lg-2">
|
||||
<span class="input-group-addon">%</span>
|
||||
@@ -45,7 +45,7 @@
|
||||
<span class="help-block"><i class="icon-warning-sign"></i> {l s='Does not apply to the shipping costs'}</span>
|
||||
</div>
|
||||
|
||||
<div id="apply_discount_amount_div" class="row">
|
||||
<div id="apply_discount_amount_div" class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Amount'}</label>
|
||||
<div class="col-lg-7">
|
||||
<div class="row">
|
||||
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="apply_discount_to_div" class="row">
|
||||
<div id="apply_discount_to_div" class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Apply a discount to'}</label>
|
||||
<div class="col-lg-7">
|
||||
<p class="checkbox">
|
||||
@@ -99,7 +99,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="apply_discount_to_product_div" class="row">
|
||||
<div id="apply_discount_to_product_div" class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Product'}</label>
|
||||
<div class="input-group col-lg-5">
|
||||
<input type="text" id="reductionProductFilter" name="reductionProductFilter" value="{$reductionProductFilter|escape:'htmlall':'UTF-8'}" />
|
||||
@@ -108,24 +108,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Send a free gift'}</label>
|
||||
<div class="input-group col-lg-2">
|
||||
<span class="switch prestashop-switch">
|
||||
<input type="radio" name="free_gift" id="free_gift_on" value="1" {if $currentTab->getFieldValue($currentObject, 'gift_product')|intval}checked="checked"{/if} />
|
||||
<label class="t radio" for="free_gift_on">
|
||||
<i class="icon-check-sign"></i> {l s='Yes'}
|
||||
<i class="icon-check-sign color_success"></i> {l s='Yes'}
|
||||
</label>
|
||||
<input type="radio" name="free_gift" id="free_gift_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'gift_product')|intval}checked="checked"{/if} />
|
||||
<label class="t radio" for="free_gift_off">
|
||||
<i class="icon-ban-circle"></i> {l s='No'}
|
||||
<i class="icon-ban-circle color_danger"></i> {l s='No'}
|
||||
</label>
|
||||
<span class="slide-button btn btn-default"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="free_gift_div" class="row">
|
||||
<div id="free_gift_div" class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Search a product'}</label>
|
||||
<div class="input-group col-lg-5">
|
||||
<input type="text" id="giftProductFilter" value="{$giftProductFilter}" />
|
||||
@@ -134,16 +134,15 @@
|
||||
</div>
|
||||
|
||||
<div id="gift_products_found" {if $gift_product_select == ''}style="display:none"{/if}>
|
||||
<br/>
|
||||
<div id="gift_product_list" class="row" >
|
||||
<div id="gift_product_list" class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Matching products'}</label>
|
||||
<div class="col-lg-5">
|
||||
<select name="gift_product" id="gift_product" onclick="displayProductAttributes();">
|
||||
<select name="gift_product" id="gift_product" onclick="displayProductAttributes();" class="control-form">
|
||||
{$gift_product_select}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gift_attributes_list" class="row" {if !$hasAttribute}style="display:none"{/if}>
|
||||
<div id="gift_attributes_list" class="form-group" {if !$hasAttribute}style="display:none"{/if}>
|
||||
<label class="control-label col-lg-3">{l s='Available combinations'}</label>
|
||||
<div class="col-lg-5" id="gift_attributes_list_select">
|
||||
{$gift_product_attribute_select}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3 required">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='This will be displayed in the cart summary, as well as on the invoice.'}">
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='For your eyes only. This will never be displayed to the customer.'}">
|
||||
@@ -38,11 +38,11 @@
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-8">
|
||||
<textarea name="description" rows="2" >{$currentTab->getFieldValue($currentObject, 'description')|escape}</textarea>
|
||||
<textarea name="description" rows="2" class="textarea-autosize">{$currentTab->getFieldValue($currentObject, 'description')|escape}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='Caution! The rule will automatically be applied if you leave this field blank.'}">
|
||||
@@ -57,7 +57,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='If the voucher is not yet in the cart, it will be displayed in the cart summary.'}">
|
||||
@@ -67,15 +67,15 @@
|
||||
<div class="input-group col-lg-2">
|
||||
<span class="switch prestashop-switch">
|
||||
<input type="radio" name="highlight" id="highlight_on" value="1" {if $currentTab->getFieldValue($currentObject, 'highlight')|intval}checked="checked"{/if}/>
|
||||
<label class="t radio" for="highlight_on"><i class="icon-check-sign"></i> {l s='Yes'}</label>
|
||||
<label class="t radio" for="highlight_on"><i class="icon-check-sign color_success"></i> {l s='Yes'}</label>
|
||||
<input type="radio" name="highlight" id="highlight_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'highlight')|intval}checked="checked"{/if} />
|
||||
<label class="t radio" for="highlight_off"><i class="icon-ban-circle"></i> {l s='No'}</label>
|
||||
<label class="t radio" for="highlight_off"><i class="icon-ban-circle color_danger"></i> {l s='No'}</label>
|
||||
<span class="slide-button btn btn-default"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='Only applicable if the voucher value is greater than the cart total.'}
|
||||
@@ -86,15 +86,15 @@
|
||||
<div class="input-group col-lg-2">
|
||||
<span class="switch prestashop-switch">
|
||||
<input type="radio" name="partial_use" id="partial_use_on" value="1" {if $currentTab->getFieldValue($currentObject, 'partial_use')|intval}checked="checked"{/if} />
|
||||
<label class="t radio" for="partial_use_on"><i class="icon-check-sign"></i> {l s='Yes'}</label>
|
||||
<label class="t radio" for="partial_use_on"><i class="icon-check-sign color_success"></i> {l s='Yes'}</label>
|
||||
<input type="radio" name="partial_use" id="partial_use_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'partial_use')|intval}checked="checked"{/if} />
|
||||
<label class="t radio" for="partial_use_off"><i class="icon-ban-circle"></i> {l s='No'}</label>
|
||||
<label class="t radio" for="partial_use_off"><i class="icon-ban-circle color_danger"></i> {l s='No'}</label>
|
||||
<span class="slide-button btn btn-default"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='Cart rules are applied by priority. A cart rule with a priority of "1" will be processed before a cart rule with a priority of "2".'}">
|
||||
@@ -106,15 +106,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Status'}</label>
|
||||
<div class="input-group col-lg-2">
|
||||
<span class="switch prestashop-switch">
|
||||
<input type="radio" name="active" id="active_on" value="1" {if $currentTab->getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} />
|
||||
<label class="t radio" for="active_on"><i class="icon-check-sign"></i> {l s='Yes'}</label>
|
||||
<label class="t radio" for="active_on"><i class="icon-check-sign color_success"></i> {l s='Yes'}</label>
|
||||
<input type="radio" name="active" id="active_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} />
|
||||
<label class="t radio" for="active_off"><i class="icon-ban-circle"></i> {l s='No'}</label>
|
||||
<label class="t radio" for="active_off"><i class="icon-ban-circle color_danger"></i> {l s='No'}</label>
|
||||
<span class="slide-button btn btn-default"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(".textarea-autosize").autosize();
|
||||
</script>
|
||||
@@ -54,6 +54,7 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
{
|
||||
parent::setMedia();
|
||||
$this->addJqueryPlugin(array('typewatch', 'fancybox', 'autocomplete'));
|
||||
$this->addJS(_PS_JS_DIR_.'jquery/plugins/jquery.autosize.min.js');
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
@@ -536,7 +537,7 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
|
||||
if (count($product['combinations']))
|
||||
{
|
||||
$gift_product_attribute_select .= '<select class="id_product_attribute" id="ipa_'.$product['id_product'].'" name="ipa_'.$product['id_product'].'">';
|
||||
$gift_product_attribute_select .= '<select class="control-form id_product_attribute" id="ipa_'.$product['id_product'].'" name="ipa_'.$product['id_product'].'">';
|
||||
foreach ($product['combinations'] as $combination)
|
||||
{
|
||||
$gift_product_attribute_select .= '
|
||||
|
||||
Reference in New Issue
Block a user