fixed selecting "special_price" in views

This commit is contained in:
Дмитрий 2019-12-11 12:29:08 +03:00
parent 268e5b4279
commit 2da9acf18d
2 changed files with 2 additions and 0 deletions

View File

@ -176,6 +176,7 @@
<label class="col-sm-2 control-label" style="text-align:right!important;" for="opencart_customer_group_<?php echo $customerGroup['customer_group_id']; ?>"><?php echo $customerGroup['name']; ?></label> <label class="col-sm-2 control-label" style="text-align:right!important;" for="opencart_customer_group_<?php echo $customerGroup['customer_group_id']; ?>"><?php echo $customerGroup['name']; ?></label>
<div class="col-md-4 col-sm-10"> <div class="col-md-4 col-sm-10">
<select id="retailcrm_special_<?php echo $cid; ?>" name="retailcrm_special_<?php echo $cid; ?>" class="form-control"> <select id="retailcrm_special_<?php echo $cid; ?>" name="retailcrm_special_<?php echo $cid; ?>" class="form-control">
<option value="" <?php if (empty($saved_settings['retailcrm_special_' . $cid])) echo 'selected'; ?>>---</option>
<?php foreach ($priceTypes as $k => $priceType): ?> <?php foreach ($priceTypes as $k => $priceType): ?>
<?php if ($priceType['active'] == true and $priceType['default'] == false) :?> <?php if ($priceType['active'] == true and $priceType['default'] == false) :?>
<option value="<?php echo $priceType['code'];?>" <?php if(isset($saved_settings['retailcrm_special_' . $cid]) && $priceType['code'] == $saved_settings['retailcrm_special_' . $cid]):?>selected="selected"<?php endif;?>> <option value="<?php echo $priceType['code'];?>" <?php if(isset($saved_settings['retailcrm_special_' . $cid]) && $priceType['code'] == $saved_settings['retailcrm_special_' . $cid]):?>selected="selected"<?php endif;?>>

View File

@ -177,6 +177,7 @@
<label class="col-sm-2 control-label" for="opencart_customer_group_{{ cud }}">{{ customerGroup.name }}</label> <label class="col-sm-2 control-label" for="opencart_customer_group_{{ cud }}">{{ customerGroup.name }}</label>
<div class="col-md-4 col-sm-10"> <div class="col-md-4 col-sm-10">
<select id="module_retailcrm_special_{{ cud }}" name="module_retailcrm_special_{{ cud }}" class="form-control"> <select id="module_retailcrm_special_{{ cud }}" name="module_retailcrm_special_{{ cud }}" class="form-control">
<option value="" {% if saved_settings['module_retailcrm_special_'~cud] is not defined or saved_settings['module_retailcrm_special_'~cud] is empty %}selected{% endif %}>---</option>
{% for priceType in priceTypes %} {% for priceType in priceTypes %}
{% if priceType.active == true and priceType.default == false%} {% if priceType.active == true and priceType.default == false%}
<option value ="{{ priceType.code }}" {% if saved_settings['module_retailcrm_special_'~cud] is defined and priceType.code == saved_settings['module_retailcrm_special_'~cud] %} selected="selected" {% endif %}> <option value ="{{ priceType.code }}" {% if saved_settings['module_retailcrm_special_'~cud] is defined and priceType.code == saved_settings['module_retailcrm_special_'~cud] %} selected="selected" {% endif %}>