Разные цены для разных доменов
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
|
||||
<li><a href="#tab-data" data-toggle="tab">{{ tab_data }}</a></li>
|
||||
<li><a href="#tab-prices" data-toggle="tab">{{ tab_prices }}</a></li>
|
||||
<li><a href="#tab-links" data-toggle="tab">{{ tab_links }}</a></li>
|
||||
<li><a href="#tab-attribute" data-toggle="tab">{{ tab_attribute }}</a></li>
|
||||
<li><a href="#tab-image" data-toggle="tab">{{ tab_image }}</a></li>
|
||||
@@ -104,56 +105,14 @@
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-data">
|
||||
<div class="form-group required">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-model">{{ entry_model }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="model" value="{{ model }}" placeholder="{{ entry_model }}" id="input-model" class="form-control"/>
|
||||
{% if error_model %}
|
||||
<div class="text-danger">{{ error_model }}</div>
|
||||
{% endif %}</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sku"><span data-toggle="tooltip" title="{{ help_sku }}">{{ entry_sku }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sku" value="{{ sku }}" placeholder="{{ entry_sku }}" id="input-sku" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-upc"><span data-toggle="tooltip" title="{{ help_upc }}">{{ entry_upc }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="upc" value="{{ upc }}" placeholder="{{ entry_upc }}" id="input-upc" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-ean"><span data-toggle="tooltip" title="{{ help_ean }}">{{ entry_ean }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="ean" value="{{ ean }}" placeholder="{{ entry_ean }}" id="input-ean" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-jan"><span data-toggle="tooltip" title="{{ help_jan }}">{{ entry_jan }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="jan" value="{{ jan }}" placeholder="{{ entry_jan }}" id="input-jan" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-isbn"><span data-toggle="tooltip" title="{{ help_isbn }}">{{ entry_isbn }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="isbn" value="{{ isbn }}" placeholder="{{ entry_isbn }}" id="input-isbn" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-mpn"><span data-toggle="tooltip" title="{{ help_mpn }}">{{ entry_mpn }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="mpn" value="{{ mpn }}" placeholder="{{ entry_mpn }}" id="input-mpn" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-location">{{ entry_location }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="location" value="{{ location }}" placeholder="{{ entry_location }}" id="input-location" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-price">{{ entry_price }}</label>
|
||||
<div class="col-sm-10">
|
||||
@@ -172,33 +131,7 @@
|
||||
<input type="text" name="price_3" value="{{ price_3 }}" placeholder="{{ entry_price_3 }}" id="input-price-3" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-tax-class">{{ entry_tax_class }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="tax_class_id" id="input-tax-class" class="form-control">
|
||||
<option value="0">{{ text_none }}</option>
|
||||
|
||||
|
||||
{% for tax_class in tax_classes %}
|
||||
{% if tax_class.tax_class_id == tax_class_id %}
|
||||
|
||||
|
||||
<option value="{{ tax_class.tax_class_id }}" selected="selected">{{ tax_class.title }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="{{ tax_class.tax_class_id }}">{{ tax_class.title }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-quantity">{{ entry_quantity }}</label>
|
||||
<div class="col-sm-10">
|
||||
@@ -211,76 +144,7 @@
|
||||
<input type="text" name="minimum" value="{{ minimum }}" placeholder="{{ entry_minimum }}" id="input-minimum" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-subtract">{{ entry_subtract }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="subtract" id="input-subtract" class="form-control">
|
||||
|
||||
|
||||
{% if subtract %}
|
||||
|
||||
|
||||
<option value="1" selected="selected">{{ text_yes }}</option>
|
||||
<option value="0">{{ text_no }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="1">{{ text_yes }}</option>
|
||||
<option value="0" selected="selected">{{ text_no }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-stock-status"><span data-toggle="tooltip" title="{{ help_stock_status }}">{{ entry_stock_status }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="stock_status_id" id="input-stock-status" class="form-control">
|
||||
|
||||
|
||||
{% for stock_status in stock_statuses %}
|
||||
{% if stock_status.stock_status_id == stock_status_id %}
|
||||
|
||||
|
||||
<option value="{{ stock_status.stock_status_id }}" selected="selected">{{ stock_status.name }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="{{ stock_status.stock_status_id }}">{{ stock_status.name }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_shipping }}</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline"> {% if shipping %}
|
||||
<input type="radio" name="shipping" value="1" checked="checked"/>
|
||||
{{ text_yes }}
|
||||
{% else %}
|
||||
<input type="radio" name="shipping" value="1"/>
|
||||
{{ text_yes }}
|
||||
{% endif %} </label> <label class="radio-inline"> {% if not shipping %}
|
||||
<input type="radio" name="shipping" value="0" checked="checked"/>
|
||||
{{ text_no }}
|
||||
{% else %}
|
||||
<input type="radio" name="shipping" value="0"/>
|
||||
{{ text_no }}
|
||||
{% endif %} </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-date-available">{{ entry_date_available }}</label>
|
||||
<div class="col-sm-3">
|
||||
@@ -290,80 +154,7 @@
|
||||
</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-length">{{ entry_dimension }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="length" value="{{ length }}" placeholder="{{ entry_length }}" id="input-length" class="form-control"/>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="width" value="{{ width }}" placeholder="{{ entry_width }}" id="input-width" class="form-control"/>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="height" value="{{ height }}" placeholder="{{ entry_height }}" id="input-height" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-length-class">{{ entry_length_class }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="length_class_id" id="input-length-class" class="form-control">
|
||||
|
||||
|
||||
{% for length_class in length_classes %}
|
||||
{% if length_class.length_class_id == length_class_id %}
|
||||
|
||||
|
||||
<option value="{{ length_class.length_class_id }}" selected="selected">{{ length_class.title }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="{{ length_class.length_class_id }}">{{ length_class.title }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-weight">{{ entry_weight }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="weight" value="{{ weight }}" placeholder="{{ entry_weight }}" id="input-weight" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-weight-class">{{ entry_weight_class }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="weight_class_id" id="input-weight-class" class="form-control">
|
||||
|
||||
|
||||
{% for weight_class in weight_classes %}
|
||||
{% if weight_class.weight_class_id == weight_class_id %}
|
||||
|
||||
|
||||
<option value="{{ weight_class.weight_class_id }}" selected="selected">{{ weight_class.title }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="{{ weight_class.weight_class_id }}">{{ weight_class.title }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
@@ -397,6 +188,36 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-prices">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_price }}</td>
|
||||
<td class="text-left">{{ entry_price_2 }}</td>
|
||||
<td class="text-left">{{ entry_price_3 }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-left">{{ store.name }}</td>
|
||||
<td class="text-left">
|
||||
<input type="text" name="product_prices[{{ store.store_id }}][price]" value="{{ product_prices[store.store_id] ? product_prices[store.store_id].price }}" class="form-control" />
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<input type="text" name="product_prices[{{ store.store_id }}][price_2]" value="{{ product_prices[store.store_id] ? product_prices[store.store_id].price_2 }}" class="form-control" />
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<input type="text" name="product_prices[{{ store.store_id }}][price_3]" value="{{ product_prices[store.store_id] ? product_prices[store.store_id].price_3 }}" class="form-control" />
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-links">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-manufacturer"><span data-toggle="tooltip" title="{{ help_manufacturer }}">{{ entry_manufacturer }}</span></label>
|
||||
|
||||
@@ -77,18 +77,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-manufacturer-name">{{ entry_manufacturer }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_manufacturer_name" value="{{ filter_manufacturer_name }}" placeholder="{{ entry_manufacturer }}" id="input-manufacturer-name" class="form-control" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-clear-input-manufacturer-name" class="btn btn-default"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="filter_manufacturer" value="{{ filter_manufacturer_name }}" id="input-manufacturer" class="form-control" />
|
||||
</div>
|
||||
-->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-price">{{ entry_price }}</label>
|
||||
<div class="row">
|
||||
@@ -135,77 +123,16 @@
|
||||
<label class="control-label" for="input-status">{{ entry_status }}</label>
|
||||
<select name="filter_status" id="input-status" class="form-control">
|
||||
<option value=""></option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% if filter_status == '1' %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if filter_status == '0' %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -245,10 +172,10 @@
|
||||
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
|
||||
<td class="text-center">{{ column_image }}</td>
|
||||
<td class="text-left">{% if sort == 'pd.name' %} <a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a> {% else %} <a href="{{ sort_name }}">{{ column_name }}</a> {% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'p.model' %} <a href="{{ sort_model }}" class="{{ order|lower }}">{{ column_model }}</a> {% else %} <a href="{{ sort_model }}">{{ column_model }}</a> {% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'p.price' %} <a href="{{ sort_price }}" class="{{ order|lower }}">{{ column_price }}</a> {% else %} <a href="{{ sort_price }}">{{ column_price }}</a> {% endif %}</td>
|
||||
<td class="text-left">{{ column_prices }}</td>
|
||||
<td class="text-right">{% if sort == 'p.quantity' %} <a href="{{ sort_quantity }}" class="{{ order|lower }}">{{ column_quantity }}</a> {% else %} <a href="{{ sort_quantity }}">{{ column_quantity }}</a> {% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'p.status' %} <a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a> {% else %} <a href="{{ sort_status }}">{{ column_status }}</a> {% endif %}</td>
|
||||
<td class="text-left">{{ column_stores }}</td>
|
||||
<td class="text-left">{% if sort == 'p.noindex' %} <a href="{{ sort_noindex }}" class="{{ order|lower }}">{{ column_noindex }}</a> {% else %} <a href="{{ sort_noindex }}">{{ column_noindex }}</a> {% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
@@ -265,14 +192,19 @@
|
||||
{% endif %}</td>
|
||||
<td class="text-center">{% if product.image %} <img src="{{ product.image }}" alt="{{ product.name }}" class="img-thumbnail" /> {% else %} <span class="img-thumbnail list"><i class="fa fa-camera fa-2x"></i></span> {% endif %}</td>
|
||||
<td class="text-left">{{ product.name }}</td>
|
||||
<td class="text-left">{{ product.model }}</td>
|
||||
<td class="text-right">{% if product.special %} <span style="text-decoration: line-through;">{{ product.price }}</span><br/>
|
||||
<div class="text-danger">{{ product.special }}</div>
|
||||
{% else %}
|
||||
{{ product.price }}
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{% if product.prices_html %}{{ product.prices_html }}{% else %}{{ product.price }}{% endif %}</td>
|
||||
<td class="text-right">{% if product.quantity <= 0 %} <span class="label label-warning">{{ product.quantity }}</span> {% elseif product.quantity <= 5 %} <span class="label label-danger">{{ product.quantity }}</span> {% else %} <span class="label label-success">{{ product.quantity }}</span> {% endif %}</td>
|
||||
<td class="text-left">{{ product.status }}</td>
|
||||
<td class="text-left">
|
||||
{% for store in stores %}
|
||||
<div class="checkbox" style="margin:0;min-height:0;">
|
||||
<label style="font-size:11px;">
|
||||
<input type="checkbox" class="toggle-store" data-product-id="{{ product.product_id }}" data-store-id="{{ store.store_id }}" value="{{ store.store_id }}"{% if store.store_id in product.product_stores %} checked="checked"{% endif %} />
|
||||
{{ store.name }}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td class="text-left">{{ product.noindex }}</td>
|
||||
<td class="text-right">
|
||||
<a target="_blank" href="{{ product.href_shop }}" data-toggle="tooltip" title="{{ button_shop }}" class="btn btn-success"><i class="fa fa-eye"></i></a>
|
||||
@@ -282,7 +214,7 @@
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="9">{{ text_no_results }}</td>
|
||||
<td class="text-center" colspan="10">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
@@ -511,5 +443,22 @@ $('input[name=\'filter_name\'], input[name=\'filter_model\'], input[name=\'filte
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Toggle store for product
|
||||
$(document).on('change', '.toggle-store', function() {
|
||||
var $checkbox = $(this);
|
||||
var product_id = $checkbox.data('product-id');
|
||||
var store_id = $checkbox.data('store-id');
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/product/toggleStore&user_token={{ user_token }}&product_id=' + product_id + '&store_id=' + store_id,
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
if (json.success) {
|
||||
// do nothing, checkbox already changed
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
{{ footer }}
|
||||
|
||||
Reference in New Issue
Block a user