Files
interblue.pl/modules/x13allegro/views/templates/helpers/custom_prices/custom-prices.tpl
2024-10-25 14:16:28 +02:00

116 lines
5.3 KiB
Smarty
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script type="text/javascript">
if (typeof XAllegroCustomPrices === 'undefined') {
var XAllegroCustomPrices = new X13Allegro();
XAllegroCustomPrices.ajaxUrl = "{$custom_prices_ajax_url}";
XAllegroCustomPrices.ajaxToken = "{$custom_prices_token}";
XAllegroCustomPrices.presta17 = {$custom_prices_is_17|intval};
XAllegroCustomPrices.customPricesInit({$productId|intval});
}
var XAllegroCustomPricesConfirmChangePrice = "{l s='Czy na pewno chcesz zmienić cenę kombinacji? Usunie to wpływ na główną cenę produktu przy zapisie' js=1}";
var XAllegroCustomPricesConfirmChangePriceFlat = "{l s='Czy na pewno chcesz zmienić cenę podstawową produktu? Usunie to wpływ na kombinacje produktu przy zapisie' js=1}";
var XAllegroCustomPricesConfirmChangeAccount = "{l s='Zmiana konta spowoduje anulowanie niezapisanych zmian cen, kontynuować?' js=1}";
var XAllegroCustomPricesConfirmDelete = "{l s='Czy na pewno usunąć wszystkie ceny dedykowane dla Allegro tego produktu? Ta operacja jest nieodwracalna.' js=1}";
var XAllegroCustomPricesAccountId = {$current_account};
</script>
<div class="form-group clearfix">
<input type="hidden" name="xallegro_custom_price_product" value="{$productId|intval}">
<label for="xallegro_custom_price_account" class="control-label form-control-label col-lg-3">
<span>{l s='Konto Allegro' mod='x13allegro'}</span>
</label>
<div class="col-lg-3">
<select class="custom-select" name="xallegro_custom_price_account" id="xallegro_custom_price_account">
<option value="0" {if $current_account == 0}selected="selected"{/if}>{l s='-- wszystkie konta --' mod='x13allegro'}</option>
{foreach $accounts as $account}
<option value="{$account->id}" {if $current_account == $account->id}selected="selected"{/if}>
{$account->username} {if $account->sandbox}(sandbox){/if}
</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group clearfix">
<div class="col-lg-7">
<table class="table">
<thead>
<tr>
<th scope="col"></th>
<th scope="col" style="width: 100px;">{l s='Cena/wpływ' mod='x13allegro'}</th>
<th scope="col" style="width: 225px;">{l s='Typ modyfikacji' mod='x13allegro'}</th>
</tr>
</thead>
<tbody>
{foreach $custom_prices as $row}
<tr>
<td>
{if !$row.id_product_attribute}
<a
title="{l s='Zmiana ceny dla produktu głównego spowodouje narzucenie wpływu na wszystkie jego kombinacji (jeśli istnieją)' mod='x13allegro'}"
class="xallegro-custom-price-helper">
{if $custom_prices_is_17}
<i class="material-icons">
help_outline
</i>
{else}
<i class="icon icon-question-circle" aria-hidden="true"></i>
{/if}
</a>
{/if}
{$row.label}
{if !$row.id_product_attribute}
(produkt główny)
{/if}
</td>
<td>
<input
{if $row.disabled}readonly{/if}
type="text"
class="form-control width-xs{if $row.id_product_attribute} with-combinations{else} wo-combinations{/if}"
placeholder="0.00"
name="custom_price[{$row.id_product_attribute}][value]" value="{$row.value}">
</td>
<td>
<select
{if $row.disabled}readonly{/if}
name="custom_price[{$row.id_product_attribute}][method]"
class="form-control{if $row.id_product_attribute} with-combinations{else} wo-combinations{/if}">
<option
{if $row.method == $method_price}selected{/if}
value="{$method_price}">
{l s='Cena końcowa' mod='x13allegro'}
</option>
<option
{if $row.method == $method_amount}selected{/if}
value="{$method_amount}">
{l s='Wpływ na cenę (wartość)' mod='x13allegro'}
</option>
<option
{if $row.method == $method_percentage}selected{/if}
value="{$method_percentage}">
{l s='Wpływ na cenę (procent)' mod='x13allegro'}
</option>
</select>
</td>
</tr>
{/foreach}
</tbody>
</table>
<p class="text-muted">
<a href="#" id="custom_prices_delete">
{l s='Usuń wszystkie ceny dedykowane dla Allegro tego produktu' mod='x13allegro'}
</a>
</p>
</div>
</div>
<style>
.xallegro-custom-price-helper i {
background: #25b9d7;
color: white;
border-radius: 50%;
margin-right: 3px; margin-top: -2px;
font-size: 15px;
cursor: pointer;
}
</style>