first commit

This commit is contained in:
2024-10-25 14:16:28 +02:00
commit 925276dbb2
33795 changed files with 4780077 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Metoda aktualizacji' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_auction_additional_marketplace_method">
<option value="allegro_auction_additional_marketplace_add">{l s='Aktywuj widoczność na rynkach zagranicznych' mod='x13allegro'}</option>
<option value="allegro_auction_additional_marketplace_delete">{l s='Usuń widoczność z rynków zagranicznych' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Rynki zagraniczne' mod='x13allegro'}
</label>
<div class="col-lg-9">
{foreach $data.marketplaces as $marketplace}
{if $marketplace.id == $data.baseMarketplace}
{continue}
{/if}
<p class="checkbox clearfix">
<label for="allegro_auction_additional_marketplace_{$marketplace.id}">
<input type="checkbox" id="allegro_auction_additional_marketplace_{$marketplace.id}" name="allegro_auction_additional_marketplace[]" value="{$marketplace.id}">
{$marketplace.name|regex_replace:"/^(\w+)/u":"<b>$1</b>"}{if $marketplace.id != $data.baseMarketplace}&nbsp;&nbsp;
<i>({l s='kurs wymiany waluty' mod='x13allegro'}: {$marketplace.currencyConversionRate} {$data.marketplaces[$data.baseMarketplace].currencyIso})</i>{/if}
</label>
</p>
{/foreach}
</div>
</div>

View File

@@ -0,0 +1,42 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Metoda aktualizacji' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_additional_service_mode">
<option value="1" selected="selected">{l s='przypisz dodatkowe usługi' mod='x13allegro'}</option>
<option value="0">{l s='usuń dodatkowe usługi' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Grupa dodatkowych usług' mod='x13allegro'}
</label>
<div class="col-lg-9">
{if !empty($data.additionalServices)}
<input type="hidden" name="allegro_additional_service_name" value="{$data.additionalServices[0]->name}">
<select name="allegro_additional_service">
{foreach $data.additionalServices as $additionalService}
<option value="{$additionalService->id}">{$additionalService->name}</option>
{/foreach}
</select>
{else}
{l s='Brak skonfigurowanych dodatkowych usług' mod='x13allegro'}
{/if}
</div>
</div>
<script>
$(document).on('change', '[name="allegro_additional_service_mode"]', function () {
if (parseInt($(this).val()) === 1) {
$('select[name="allegro_additional_service"]').parents('.form-group').show();
} else {
$('select[name="allegro_additional_service"]').parents('.form-group').hide();
}
});
$(document).on('change', '[name="allegro_additional_service"]', function () {
$('input[name="allegro_additional_service_name"]').val($(this).find('option:selected').text());
});
</script>

View File

@@ -0,0 +1,42 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Warunki zwrotów' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_return_policy">
<option value="0">{l s='nie zmieniaj' mod='x13allegro'}</option>
{foreach $data.returnPolicies as $returnPolicies}
<option value="{$returnPolicies->id}" {if $returnPolicies->id == $data.defaultReturnPolicies}selected="selected"{/if}>{$returnPolicies->name}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Reklamacje' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_implied_warranty">
<option value="0">{l s='nie zmieniaj' mod='x13allegro'}</option>
{foreach $data.impliedWarranties as $impliedWarranties}
<option value="{$impliedWarranties->id}" {if $impliedWarranties->id == $data.defaultImpliedWarranties}selected="selected"{/if}>{$impliedWarranties->name}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Gwarancje' mod='x13allegro'} ({l s='opcjonalnie' mod='x13allegro'})
</label>
<div class="col-lg-9">
<select name="allegro_warranty">
<option value="0">{l s='nie zmieniaj' mod='x13allegro'}</option>
{foreach $data.warranties as $warranties}
<option value="{$warranties->id}" {if $warranties->id == $data.defaultWarranties}selected="selected"{/if}>{$warranties->name}</option>
{/foreach}
<option value="-1">{l s='usuń gwarancję' mod='x13allegro'}</option>
</select>
</div>
</div>

View File

@@ -0,0 +1,16 @@
<div class="form-group row">
<div class="col-lg-12">
<div class="checkbox">
<label>
<input type="checkbox" name="allegro_skip_if_exists" type="checkbox" value="1" checked>
{$data.title}
</label>
{if $data.description}
<p class="help-block">
{$data.description nofilter}
</p>
{/if}
</div>
</div>
</div>

View File

@@ -0,0 +1,7 @@
<div class="row">
<div class="col-lg-12">
<div class="alert alert-{$data.class}">
{$data.message}
</div>
</div>
</div>

View File

@@ -0,0 +1,97 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Metoda wyszukiwania powiązania w PrestaShop' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_bind_method">
<option value="auto">{l s='szukaj automatycznie (kolejno po wszystkich dostępnych metodach powiązania)' mod='x13allegro'}</option>
<option value="select">{l s='wybierz metody powiązania ręcznie' mod='x13allegro'}</option>
</select>
</div>
</div>
<div id="allegro_bind_method_auto" class="form-group row">
<div class="col-lg-12">
<div class="alert alert-info">
{l s='Wyszukuje powiązania kolejno według' mod='x13allegro'}:
<ul>
<li>
{l s='parametr EAN' mod='x13allegro'}
<br><small><i>- {l s='EAN-13 w PrestaShop' mod='x13allegro'}</i></small>
</li>
<li>
{l s='parametr ISBN/ISSN' mod='x13allegro'}
<br><small><i>- {l s='ISBN w PrestaShop' mod='x13allegro'}</i></small>
</li>
<li>
{l s='parametr MPN' mod='x13allegro'}
<br><small><i>- {l s='bazuje na parametrach "Kod producenta", "Numer katalogowy", "Numer katalogowy producenta", "Numer katalogowy części"' mod='x13allegro'}</i></small>
<br><small><i>- {l s='Kod referencyjnny (indeks) i MPN w PrestaShop' mod='x13allegro'}</i></small>
</li>
<li>
{l s='sygnatura oferty (external.id)' mod='x13allegro'}
{if $data.externalId}
<br><small><i>- {l s='%s w PrestaShop' sprintf=[$data.externalId] mod='x13allegro'}</i></small>
{else}
<br><small><i>- {l s='brak wybranego powiązania sygnatury oferty w konfiguracji modułu' mod='x13allegro'}</i></small>
{/if}
</li>
</ul>
</div>
</div>
</div>
<div id="allegro_bind_method_select" class="form-group row" style="display: none;">
<label class="control-label col-lg-3">
{l s='Wyszukaj powiązania w PrestaShop według' mod='x13allegro'}
</label>
<div class="col-lg-9">
<p class="checkbox clearfix">
<label for="allegro_bind_ean13">
<input type="checkbox" id="allegro_bind_ean13" name="allegro_bind_field[]" value="ean13">
{l s='parametr EAN' mod='x13allegro'}
<span class="help-block" style="margin: 0;">{l s='wyszukuje według EAN-13 w PrestaShop' mod='x13allegro'}</span>
</label>
</p>
<p class="checkbox clearfix">
<label for="allegro_bind_isbn">
<input type="checkbox" id="allegro_bind_isbn" name="allegro_bind_field[]" value="isbn" {if version_compare($smarty.const._PS_VERSION_, '1.7.0.0', '<')}disabled="disabled"{/if}>
{l s='parametr ISBN/ISSN' mod='x13allegro'}
<span class="help-block" style="margin: 0;">
{l s='wyszukuje według ISBN w PrestaShop' mod='x13allegro'}
{if version_compare($smarty.const._PS_VERSION_, '1.7.0.0', '<')}({l s='dostępne od PrestaShop 1.7' mod='x13allegro'}){/if}
</span>
</label>
</p>
<p class="checkbox clearfix">
<label for="allegro_bind_reference">
<input type="checkbox" id="allegro_bind_reference" name="allegro_bind_field[]" value="mpn">
{l s='parametr MPN' mod='x13allegro'}
<span class="help-block" style="margin: 0;">{l s='bazuje na parametrach "Kod producenta", "Numer katalogowy", "Numer katalogowy producenta", "Numer katalogowy części"' mod='x13allegro'}</span>
<span class="help-block" style="margin: 0;">{l s='wyszukuje według Kodu referencyjnego (indeks) i MPN w PrestaShop' mod='x13allegro'}</span>
</label>
</p>
<p class="checkbox clearfix">
<label for="allegro_bind_external">
<input type="checkbox" id="allegro_bind_external" name="allegro_bind_field[]" value="external" {if !$data.externalId}disabled="disabled"{/if}>
{l s='sygnatura oferty (external.id)' mod='x13allegro'}
{if $data.externalId}
<span class="help-block" style="margin: 0;">{l s='wyszukuje według %s w PrestaShop' sprintf=[$data.externalId] mod='x13allegro'}</span>
{else}
<span class="help-block" style="margin: 0;">{l s='brak wybranego powiązania sygnatury oferty w konfiguracji modułu' mod='x13allegro'}</span>
{/if}
</label>
</p>
</div>
</div>
<script>
$(document).on('change', '[name="allegro_bind_method"]', function () {
if ($(this).val() === 'select') {
$('#allegro_bind_method_auto').hide();
$('#allegro_bind_method_select').show();
}
else {
$('#allegro_bind_method_auto').show();
$('#allegro_bind_method_select').hide();
}
});
</script>

View File

@@ -0,0 +1,181 @@
{if empty($data.accounts)}
<div class="alert alert-info">
{l s='Nie posiadasz kont Allegro na które można skopiować wybrane oferty' mod='x13allegro'}
</div>
{else}
<div class="form-group row">
<label for="allegro_copy_to_account" class="control-label col-lg-3">
{l s='Wybierz konto docelowe' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select id="allegro_copy_to_account" name="allegro_copy_to_account">
<option value="0">{l s='-- wybierz konto --' mod='x13allegro'}</option>
{foreach $data.accounts as $account}
<option value="{$account.accountId}">{$account.accountName}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group row" style="display: none;">
<label for="allegro_copy_delivery_profile" class="control-label col-lg-3">
{l s='Profil dostawy' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select id="allegro_copy_delivery_profile" name="allegro_copy_delivery_profile">
<option value="0">{l s='zostaw ustawiony profil dostawy' mod='x13allegro'}</option>
{foreach $data.deliveryProfiles as $deliveryProfile}
<option value="{$deliveryProfile.id}">{$deliveryProfile.name}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group row" style="display: none;">
<label for="allegro_copy_prices" class="control-label col-lg-3">
{l s='Cena Kup teraz' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select id="allegro_copy_prices" name="allegro_copy_prices">
<option value="0">{l s='zostaw aktualną cenę' mod='x13allegro'}</option>
<option value="1">{l s='przelicz cenę na podstawie powiązanego produktu i ustawień konta' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="form-group row" style="display: none;">
<label for="allegro_copy_keep_promotion" class="control-label col-lg-3">
{l s='Opcje promowania' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select id="allegro_copy_keep_promotion" name="allegro_copy_keep_promotion">
<option value="1">{l s='zostaw ustawione opcje promowania' mod='x13allegro'}</option>
<option value="0">{l s='usuń opcje promowania' mod='x13allegro'}</option>
</select>
</div>
</div>
{foreach $data.accounts as $accountId => $account}
<div class="allegro-copy-account-settings" data-id="{$accountId}" style="display: none;">
<div class="form-group row">
<div class="col-lg-4">
<label for="allegro_copy_shipping_rate_{$accountId}" class="control-label required">
{l s='Cennik dostawy' mod='x13allegro'}
</label>
<select id="allegro_copy_shipping_rate_{$accountId}" name="allegro_copy_shipping_rate[{$accountId}]">
<option value="0">{l s='-- wybierz --' mod='x13allegro'}</option>
{foreach $account.shippingRates as $shippingRate}
<option value="{$shippingRate->id}" {if $shippingRate->id == $account.shippingRateDefaultId}selected="selected"{/if}>{$shippingRate->name}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group row">
<div class="col-lg-4">
<label for="allegro_copy_return_policy_{$accountId}" class="control-label required">
{l s='Warunki zwrotów' mod='x13allegro'}
</label>
<select id="allegro_copy_return_policy_{$accountId}" name="allegro_copy_return_policy[{$accountId}]">
<option value="0">{l s='-- wybierz --' mod='x13allegro'}</option>
{foreach $account.afterSaleServices.returnPolicies as $returnPolicy}
<option value="{$returnPolicy->id}" {if $returnPolicy->id == $account.returnPolicyDefaultId}selected="selected"{/if}>{$returnPolicy->name}</option>
{/foreach}
</select>
</div>
<div class="col-lg-4">
<label for="allegro_copy_implied_warranty_{$accountId}" class="control-label required">
{l s='Reklamacje' mod='x13allegro'}
</label>
<select id="allegro_copy_implied_warranty_{$accountId}" name="allegro_copy_implied_warranty[{$accountId}]">
<option value="0">{l s='-- wybierz --' mod='x13allegro'}</option>
{foreach $account.afterSaleServices.impliedWarranties as $impliedWarranty}
<option value="{$impliedWarranty->id}" {if $impliedWarranty->id == $account.impliedWarrantyDefaultId}selected="selected"{/if}>{$impliedWarranty->name}</option>
{/foreach}
</select>
</div>
<div class="col-lg-4">
<label for="allegro_copy_warranty_{$accountId}" class="control-label">
{l s='Gwarancje' mod='x13allegro'} ({l s='opcjonalnie' mod='x13allegro'})
</label>
<select id="allegro_copy_warranty_{$accountId}" name="allegro_copy_warranty[{$accountId}]">
<option value="0">{l s='-- wybierz --' mod='x13allegro'}</option>
{foreach $account.afterSaleServices.warranties as $warranty}
<option value="{$warranty->id}" {if $warranty->id == $account.warrantyDefaultId}selected="selected"{/if}>{$warranty->name}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group row">
<div class="col-lg-4">
<label for="allegro_copy_responsible_person_{$accountId}" class="control-label">
{l s='Osoba odpowiedzialna za zgodność produktu' mod='x13allegro'} ({l s='opcjonalnie' mod='x13allegro'})
</label>
<select id="allegro_copy_responsible_person_{$accountId}" name="allegro_copy_responsible_person[{$accountId}]">
<option value="0">{l s='-- wybierz --' mod='x13allegro'}</option>
{foreach $account.responsiblePersons as $responsiblePerson}
<option value="{$responsiblePerson->id}" {if $responsiblePerson->id == $account.responsiblePersonDefaultId}selected="selected"{/if}>{$responsiblePerson->name}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group row">
<div class="col-lg-4">
<label for="allegro_copy_wholesale_price_{$accountId}" class="control-label">
{l s='Cennik hurtowy' mod='x13allegro'}
</label>
<select id="allegro_copy_wholesale_price_{$accountId}" name="allegro_copy_wholesale_price[{$accountId}]">
<option value="0">{l s='-- wybierz --' mod='x13allegro'}</option>
{foreach $account.wholesalePriceList as $wholesalePrice}
<option value="{$wholesalePrice->id}">{$wholesalePrice->benefits[0]->specification->name}</option>
{/foreach}
</select>
</div>
<div class="col-lg-4">
<label for="allegro_copy_size_table_{$accountId}" class="control-label">
{l s='Tabela rozmiarów' mod='x13allegro'}
</label>
<select id="allegro_copy_size_table_{$accountId}" name="allegro_copy_size_table[{$accountId}]">
<option value="0">{l s='-- wybierz --' mod='x13allegro'}</option>
{foreach $account.sizeTables as $sizeTable}
<option value="{$sizeTable->id}">{$sizeTable->name}</option>
{/foreach}
</select>
</div>
<div class="col-lg-4">
<label for="allegro_copy_additional_services_{$accountId}" class="control-label">
{l s='Grupa dodatkowych usług' mod='x13allegro'}
</label>
<select id="allegro_copy_additional_services_{$accountId}" name="allegro_copy_additional_services[{$accountId}]">
<option value="0">{l s='-- wybierz --' mod='x13allegro'}</option>
{foreach $account.additionalServices as $additionalService}
<option value="{$additionalService->id}">{$additionalService->name}</option>
{/foreach}
</select>
</div>
</div>
</div>
{/foreach}
{/if}
<script>
$(document).on('change', '#allegro_copy_to_account', function () {
var accountId = parseInt($(this).val());
var $deliveryProfiles = $('#allegro_copy_delivery_profile').closest('.form-group');
var $prices = $('#allegro_copy_prices').closest('.form-group');
var $keepPromotion = $('#allegro_copy_keep_promotion').closest('.form-group');
if (accountId) {
$deliveryProfiles.slideDown();
$prices.slideDown();
$keepPromotion.slideDown();
$('.allegro-copy-account-settings').slideUp({
complete: function () {
$('.allegro-copy-account-settings[data-id="' + accountId + '"]').slideDown();
}
});
} else {
$deliveryProfiles.slideUp();
$prices.slideUp();
$keepPromotion.slideUp();
$('.allegro-copy-account-settings').slideUp();
}
});
</script>

View File

@@ -0,0 +1,124 @@
<div class="form-group row">
<label for="allegro_description_mode" class="control-label col-lg-3">
{l s='Metoda aktualizacji' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select id="allegro_description_mode" name="allegro_description_mode">
<option value="1" selected="selected">{l s='dodaj do opisu' mod='x13allegro'}</option>
<option value="2">{l s='znajdź i zamień' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="clearfix">
<div class="form-group row">
<label for="allegro_description_add_mode" class="control-label col-lg-3">
{l s='Dodaj do opisu' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select id="allegro_description_add_mode" name="allegro_description_add_mode">
<option value="1" selected="selected">{l s='dodaj na początku opisu' mod='x13allegro'}</option>
<option value="2">{l s='dodaj na końcu opisu' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="allegro_description_add" class="control-label col-lg-3">
{l s='Treść' mod='x13allegro'}
</label>
<div class="col-lg-9">
<textarea id="allegro_description_add" name="allegro_description_add"></textarea>
</div>
</div>
</div>
<div class="clearfix" style="display: none;">
<div class="form-group row">
<label for="allegro_description_replace_from" class="control-label col-lg-3">
{l s='Szukaj w opisie' mod='x13allegro'}
</label>
<div class="col-lg-9 regex-group">
<span class="input-group-addon" style="display: none;">/</span>
<input type="text" id="allegro_description_replace_from" name="allegro_description_replace_from" value="">
<span class="input-group-addon" style="display: none;">/</span>
</div>
</div>
<div class="form-group row">
<label for="allegro_description_replace_to" class="control-label col-lg-3">
{l s='Zamień na' mod='x13allegro'}
</label>
<div class="col-lg-9 regex-group">
<span class="input-group-addon" style="display: none;">/</span>
<input type="text" id="allegro_description_replace_to" name="allegro_description_replace_to" value="">
<span class="input-group-addon" style="display: none;">/</span>
</div>
</div>
<div class="form-group row">
<div class="col-lg-offset-3 col-lg-9">
<label for="allegro_description_regex" class="control-label">
<input type="checkbox" id="allegro_description_regex" name="allegro_description_regex" value="1">
{l s='Użyj wyrażeń regularnych' mod='x13allegro'}
</label>
<div class="help-block">
<b>{l s='Uwaga!!!' mod='x13allegro'}</b><br>
{l s='Nie walidujemy wyrażeń regularnych, używasz tej opcji na własną odpowiedzialność.' mod='x13allegro'}<br>
{l s='Nieprawidłowo użyte wyrażenia regularne mogą spowodować całkowite popsucie opisu oferty.' mod='x13allegro'}
</div>
</div>
</div>
</div>
<style>
.mce-panel {
background-color: transparent;
border: none;
box-shadow: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
}
</style>
<script>
$(document).on('change', '[name="allegro_description_mode"]', function () {
if (parseInt($(this).val()) === 1) {
$('select[name="allegro_description_add_mode"]').parents('.form-group').parent().show();
$('input[name="allegro_description_replace_from"]').parents('.form-group').parent().hide();
}
else {
$('select[name="allegro_description_add_mode"]').parents('.form-group').parent().hide();
$('input[name="allegro_description_replace_from"]').parents('.form-group').parent().show();
}
});
$(document).on('change', '[name="allegro_description_regex"]', function () {
if ($(this).prop('checked')) {
$(this).parents('.form-group').parent().find('.regex-group').addClass('input-group').find('.input-group-addon').show();
} else {
$(this).parents('.form-group').parent().find('.regex-group').removeClass('input-group').find('.input-group-addon').hide();
}
});
$(document).on('focus', 'textarea[name="allegro_description_add"]', function () {
initTinyMce();
});
initTinyMce();
function initTinyMce() {
tinymce.remove();
tinymce.init($.extend({
selector: '#allegro_description_add',
setup: function (editor) {
editor.on('init', function () {
$.fancybox.update();
});
},
init_instance_callback: function (editor) {
editor.on('Change', function (e) {
if (e.lastLevel !== null && typeof e.originalEvent !== "undefined") {
$(document).find('textarea[name="allegro_description_add"]').html(e.level.content);
}
});
}
}, initTinyMceLite));
}
</script>

View File

@@ -0,0 +1,49 @@
<div class="form-group row">
<label for="allegro_external_mode" class="control-label col-lg-3">
{l s='Metoda aktualizacji' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select id="allegro_external_mode" name="allegro_external_mode">
<option value="1" {if $data.externalIdDefault}selected="selected"{/if}>{l s='aktualizacja według danych produktu' mod='x13allegro'}</option>
<option value="2">{l s='ręczna aktualizacja' mod='x13allegro'}</option>
<option value="0" {if !$data.externalIdDefault}selected="selected"{/if}>{l s='usuń sygnaturę' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="form-group row" {if !$data.externalIdDefault}style="display: none;"{/if}>
<label for="allegro_external_auto" class="control-label col-lg-3">
{l s='Sygnatura' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select id="allegro_external_auto" name="allegro_external_auto">
{foreach $data.externalIdList as $externalIdOption}
<option value="{$externalIdOption.id}" {if $externalIdOption.id == $data.externalIdDefault}selected="selected"{/if}>{$externalIdOption.name}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group row" style="display: none;">
<label for="allegro_external_value" class="control-label col-lg-3">
{l s='Sygnatura' mod='x13allegro'}
</label>
<div class="col-lg-9">
<input type="text" id="allegro_external_value" name="allegro_external_value" value="">
</div>
</div>
<script>
$(document).on('change', '[name="allegro_external_mode"]', function () {
if (parseInt($(this).val()) === 1) {
$('select[name="allegro_external_auto"]').parents('.form-group').show();
$('input[name="allegro_external_value"]').parents('.form-group').hide();
}
else if (parseInt($(this).val()) === 2) {
$('select[name="allegro_external_auto"]').parents('.form-group').hide();
$('input[name="allegro_external_value"]').parents('.form-group').show();
}
else {
$('select[name="allegro_external_auto"]').parents('.form-group').hide();
$('input[name="allegro_external_value"]').parents('.form-group').hide();
}
});
</script>

View File

@@ -0,0 +1,12 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Czas wysyłki' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_handling_time">
{foreach $data.handlingTimeOptions as $value => $name}
<option value="{$value}" {if $value == $data.defaultHandlingTimeOption}selected="selected"{/if}>{$name}</option>
{/foreach}
</select>
</div>
</div>

View File

@@ -0,0 +1,12 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Opcja faktury' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_invoice">
{foreach $data.invoiceOptions as $value => $name}
<option value="{$value}" {if $value == $data.defaultInvoiceOption}selected="selected"{/if}>{$name}</option>
{/foreach}
</select>
</div>
</div>

View File

@@ -0,0 +1,43 @@
<div class="form-group row">
<div class="col-lg-12">
<div class="alert alert-info">
{l s='Istnieje kilka możliwości aktualizacji parametrów oferty podczas łączenia jej z Katalogiem Allegro. Prosimy wybrać w jaki sposób moduł ma je przekazać podczas łączenia.' mod='x13allegro'}
</div>
<select name="allegro_productization_parameters">
<option value="skip">{l s='Zostaw własne parametry' mod='x13allegro'}</option>
<option value="fill">{l s='Dopełnij własne parametry, parametrami z Katalogu Allegro' mod='x13allegro'}</option>
<option value="reset">{l s='Użyj parametrów z Katalogu Allegro' mod='x13allegro'}</option>
</select>
</div>
</div>
<h4>{l s='Dodatkowe opcje' mod='x13allegro'}</h4>
<div class="alert alert-warning">
<b>Uwaga:</b> jeżeli chcesz użyć opisu albo zdjęć dostarczonych przez Allegro, wypełnione wcześniej zdjęcia i opis zostaną bezpowrotnie usunięte z oferty.
</div>
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Zdjęcia' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_productization_images">
<option value="0">{l s='Nie aktualizuj zdjęć wg Katalogu Allegro' mod='x13allegro'}</option>
<option value="1">{l s='Użyj zdjęć z Katalogu Allegro (jeśli istnieją)' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Opis' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_productization_description">
<option value="0">{l s='Nie aktualizuj opisu wg Katalogu Allegro' mod='x13allegro'}</option>
<option value="1">{l s='Użyj opisu z Katalogu Allegro (jeśli istnieje)' mod='x13allegro'}</option>
</select>
</div>
</div>
<hr>

View File

@@ -0,0 +1,68 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Metoda aktualizacji' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_promotion_packages_mode">
<option value="base_change" selected="selected">{l s='przypisz podstawową opcje promowania' mod='x13allegro'}</option>
<option value="extra_change">{l s='przypisz dodatkowe opcje promowania' mod='x13allegro'}</option>
<option value="base_remove">{l s='usuń podstawową opcje promowania' mod='x13allegro'}</option>
<option value="extra_remove">{l s='usuń dodatkowe opcje promowania' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Podstawowe opcje promowania' mod='x13allegro'}
</label>
<div class="col-lg-9">
{if isset($data.promotionPackages->basePackages) && !empty($data.promotionPackages->basePackages)}
<input type="hidden" name="allegro_base_promotion_package_name" value="{$data.promotionPackages->basePackages[0]->name}">
<select name="allegro_base_promotion_package">
{foreach $data.promotionPackages->basePackages as $package}
<option value="{$package->id}">{$package->name}</option>
{/foreach}
</select>
{/if}
</div>
</div>
<div class="form-group row" style="display: none;">
<label class="control-label col-lg-3">
{l s='Dodatkowe opcje promowania' mod='x13allegro'}
</label>
<div class="col-lg-9">
{if isset($data.promotionPackages->extraPackages) && !empty($data.promotionPackages->extraPackages)}
<input type="hidden" name="allegro_extra_promotion_package_name" value="{$data.promotionPackages->extraPackages[0]->name}">
<select name="allegro_extra_promotion_package">
{foreach $data.promotionPackages->extraPackages as $package}
<option value="{$package->id}">{$package->name}</option>
{/foreach}
</select>
{/if}
</div>
</div>
<script>
$(document).on('change', '[name="allegro_promotion_packages_mode"]', function () {
if ($(this).val() === 'base_change') {
$('select[name="allegro_extra_promotion_package"]').parents('.form-group').hide();
$('select[name="allegro_base_promotion_package"]').parents('.form-group').show();
}
else if ($(this).val() === 'extra_change') {
$('select[name="allegro_base_promotion_package"]').parents('.form-group').hide();
$('select[name="allegro_extra_promotion_package"]').parents('.form-group').show();
}
else {
$('select[name="allegro_base_promotion_package"]').parents('.form-group').hide();
$('select[name="allegro_extra_promotion_package"]').parents('.form-group').hide();
}
});
$(document).on('change', '[name="allegro_base_promotion_package"]', function () {
$('input[name="allegro_base_promotion_package_name"]').val($(this).find('option:selected').text());
});
$(document).on('change', '[name="allegro_extra_promotion_package"]', function () {
$('input[name="allegro_extra_promotion_package_name"]').val($(this).find('option:selected').text());
});
</script>

View File

@@ -0,0 +1,27 @@
{if empty($data.responsiblePersons)}
<div class="alert alert-info">
{l s='Brak skonfigurowanych osób odpowiedzialnych za zgodność produktu' mod='x13allegro'}
</div>
{else}
<div class="form-group row">
<label for="allegro_responsible_person" class="control-label col-lg-3">
{l s='Osoba odpowiedzialna za zgodność produktu' mod='x13allegro'} ({l s='opcjonalnie' mod='x13allegro'})
</label>
<div class="col-lg-9">
<input type="hidden" name="allegro_responsible_person_name" value="{$data.responsiblePersons[0]->name}">
<select id="allegro_responsible_person" name="allegro_responsible_person">
{foreach $data.responsiblePersons as $responsiblePerson}
<option value="{$responsiblePerson->id}" {if $responsiblePerson->id == $data.defaultResponsiblePerson}selected="selected"{/if}>{$responsiblePerson->name}</option>
{/foreach}
</select>
</div>
</div>
{/if}
<script>
$(document).on('change', '[name="allegro_responsible_person"]', function () {
$('input[name="allegro_responsible_person_name"]').val($(this).find('option:selected').text());
});
$('[name="allegro_responsible_person"]').trigger('change');
</script>

View File

@@ -0,0 +1,33 @@
<div class="form-group row">
<label for="allegro_preorder" class="control-label col-lg-3">
{l s='Przedsprzedaż' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select id="allegro_preorder" name="allegro_preorder">
<option value="0" selected="selected">{l s='Nie' mod='x13allegro'}</option>
<option value="1">{l s='Tak' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="form-group row" style="display: none;">
<label for="allegro_preorder_date" class="control-label col-lg-3">
{l s='Wysyłka od' mod='x13allegro'}
</label>
<div class="col-lg-9">
<input type="text" id="allegro_preorder_date" name="allegro_preorder_date" class="datepicker fixed-width-md" value="{$smarty.now|date_format:'%d.%m.%Y'}" disabled="disabled">
</div>
</div>
<script>
$(document).ready(function() {
$('.datepicker').datepicker();
$('select[name="allegro_preorder"]').on('change', function() {
if (parseInt($(this).val()) == 1) {
$('input[name="allegro_preorder_date"]').prop('disabled', false).parents('.form-group').show();
} else {
$('input[name="allegro_preorder_date"]').prop('disabled', true).parents('.form-group').hide();
}
});
});
</script>

View File

@@ -0,0 +1,40 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Cennik dostawy' mod='x13allegro'}
</label>
<div class="col-lg-9">
{if !empty($data.shippingRates)}
<input type="hidden" name="allegro_shipping_rate_name" value="">
<select name="allegro_shipping_rate">
{foreach $data.shippingRates as $shippingRate}
<option value="{$shippingRate.id}" {if $shippingRate.id == $data.shippingRateSelectedId}selected="selected"{/if}>{$shippingRate.name}</option>
{/foreach}
</select>
<br>
{include file='../../marketplace-list.tpl' marketplaces=$data.marketplaces availableMarketplaces=[]}
{else}
{l s='Brak cenników dostawy' mod='x13allegro'}
{/if}
</div>
</div>
<script>
var shippingRateMarketplaces = {$data.shippingRateMarketplaces|json_encode};
$(document).on('change', '[name="allegro_shipping_rate"]', function () {
var $selector = $(this);
$('input[name="allegro_shipping_rate_name"]').val($selector.find('option:selected').text());
$('.delivery-marketplace').each(function (index, element) {
if (shippingRateMarketplaces[$selector.val()].includes($(element).data('marketplace-id'))) {
$(element).show();
} else {
$(element).hide();
}
});
});
$('[name="allegro_shipping_rate"]').trigger('change');
</script>

View File

@@ -0,0 +1,42 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Metoda aktualizacji' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_size_table_mode">
<option value="1" selected="selected">{l s='przypisz tabele rozmiarów' mod='x13allegro'}</option>
<option value="0">{l s='usuń tabele rozmiarów' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Tabela rozmiarów' mod='x13allegro'}
</label>
<div class="col-lg-9">
{if !empty($data.sizeTables)}
<input type="hidden" name="allegro_size_table_name" value="{$data.sizeTables[0]->name}">
<select name="allegro_size_table">
{foreach $data.sizeTables as $sizeTable}
<option value="{$sizeTable->id}">{$sizeTable->name}</option>
{/foreach}
</select>
{else}
{l s='Brak skonfigurowanych tabel rozmiarów' mod='x13allegro'}
{/if}
</div>
</div>
<script>
$(document).on('change', '[name="allegro_size_table_mode"]', function () {
if (parseInt($(this).val()) === 1) {
$('select[name="allegro_size_table"]').parents('.form-group').show();
} else {
$('select[name="allegro_size_table"]').parents('.form-group').hide();
}
});
$(document).on('change', '[name="allegro_size_table"]', function () {
$('input[name="allegro_size_table_name"]').val($(this).find('option:selected').text());
});
</script>

View File

@@ -0,0 +1,27 @@
<div class="form-group row">
<div class="col-lg-12">
<label class="control-label col-lg-3">
{l s='Szablon oferty' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_auction_template">
{foreach $data.templateList as $template}
<option value="{$template.id}" {if $template.default}selected="selected"{/if}>{$template.name}</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="form-group row">
<div class="col-lg-12">
<label class="control-label col-lg-3">
{l s='Zdjęcia do szablonu' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_auction_template_images">
<option value="all" {if $data.selectImages == 'all'}selected="selected"{/if}>{l s='wszystkie' mod='x13allegro'}</option>
<option value="first" {if $data.selectImages == 'first'}selected="selected"{/if}>{l s='tylko pierwsze' mod='x13allegro'}</option>
</select>
</div>
</div>
</div>

View File

@@ -0,0 +1,137 @@
<div class="form-group row">
<label for="allegro_title_mode" class="control-label col-lg-3">
{l s='Metoda aktualizacji' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select id="allegro_title_mode" name="allegro_title_mode">
<option value="1" selected="selected">{l s='ustaw nowy tytuł' mod='x13allegro'}</option>
<option value="2">{l s='dodaj frazę do tytułu' mod='x13allegro'}</option>
<option value="3">{l s='zmień w tytule' mod='x13allegro'}</option>
<option value="4">{l s='skopiuj nazwę przypisanego produktu Allegro do tytułu' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="clearfix">
<div class="form-group row">
<label for="allegro_title_pattern" class="control-label col-lg-3">
{l s='Format nowego tytułu' mod='x13allegro'}
</label>
<div class="col-lg-9">
<input type="text" id="allegro_title_pattern" name="allegro_title_pattern" value="{$data.titlePatternDefault}">
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="alert alert-info">
<p>{l s='W powyższej opcji aktualizacji można korzystać z poniższych znaczników:' mod='x13allegro'}</p>
<a href="#" class="allegro_show_title_tags">{l s='Pokaż dostępne znaczniki' mod='x13allegro'}</a>
<div class="help-block" style="font-style: italic; display:none;">
<small>
<span class="x13allegro_black">{l s='{product_id}' mod='x13allegro'}</span> - ID produktu<br>
<span class="x13allegro_black">{l s='{product_name}' mod='x13allegro'}</span> - Nazwa produktu<br>
<span class="x13allegro_black">{l s='{product_name_attribute}' mod='x13allegro'}</span> - Nazwa atrybutu<br>
<span class="x13allegro_black">{l s='{product_short_desc}' mod='x13allegro'}</span> - Krótki opis<br>
<span class="x13allegro_black">{l s='{product_reference}' mod='x13allegro'}</span> - Kod referencyjny (indeks) produktu<br>
<span class="x13allegro_black">{l s='{product_ean13}' mod='x13allegro'}</span> - Kod EAN13<br>
<span class="x13allegro_black">{l s='{product_weight}' mod='x13allegro'}</span> - Waga produktu<br>
<span class="x13allegro_black">{l s='{product_price}' mod='x13allegro'}</span> - Cena produktu<br>
<span class="x13allegro_black">{l s='{manufacturer_name}' mod='x13allegro'}</span> - Nazwa producent<br>
<span class="x13allegro_black">{l s='{attribute_group_X}' mod='x13allegro'}</span> - Nazwa i wartość grupy atrybutów X (grupa atrybutów musi być przypisana do kombinacji produktu)<br>
<span class="x13allegro_black">{l s='{attribute_group_value_X}' mod='x13allegro'}</span> - Wartość grupy atrybutów X (grupa atrybutów musi być przypisana do kombinacji produktu)<br>
<span class="x13allegro_black">{l s='{feature_X}' mod='x13allegro'}</span> - Nazwa i wartość cechy X (cecha musi być przypisana do produktu)<br>
<span class="x13allegro_black">{l s='{feature_value_X}' mod='x13allegro'}</span> - Wartość cechy X (cecha musi być przypisana do produktu)
</small>
</div>
</div>
</div>
<div class="col-lg-12">
<div class="alert alert-warning">
{l s='Format tytułu oferty zostanie użyty do aktualizacji wszystkich wybranych ofert, oprócz tych z indywidualnym tytułem.' mod='x13allegro'}
</div>
</div>
</div>
</div>
<div class="clearfix" style="display: none;">
<div class="form-group row">
<label for="allegro_title_add_mode" class="control-label col-lg-3">
{l s='Dodaj frazę' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select id="allegro_title_add_mode" name="allegro_title_add_mode">
<option value="1" selected="selected">{l s='dodaj przed tytułem' mod='x13allegro'}</option>
<option value="2">{l s='dodaj po tytule' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="allegro_title_add" class="control-label col-lg-3">
{l s='Fraza' mod='x13allegro'}
</label>
<div class="col-lg-9">
<input type="text" id="allegro_title_add" name="allegro_title_add" value="">
</div>
</div>
</div>
<div class="clearfix" style="display: none;">
<div class="form-group row">
<label for="allegro_title_replace_from" class="control-label col-lg-3">
{l s='Zamień frazę z tytułu' mod='x13allegro'}
</label>
<div class="col-lg-9">
<input type="text" id="allegro_title_replace_from" name="allegro_title_replace_from" value="">
</div>
</div>
<div class="form-group row">
<label for="allegro_title_replace_to" class="control-label col-lg-3">
{l s='na' mod='x13allegro'}
</label>
<div class="col-lg-9">
<input type="text" id="allegro_title_replace_to" name="allegro_title_replace_to" value="">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="alert alert-warning">
<p>{l s='Tytuł zostanie zaktualizowany we wszystkich zaznaczonych ofertach, w których nie było sprzedaży lub licytacji.' mod='x13allegro'}</p>
<p>{l s='Jeśli nowo wygenerowany tytuł będzie dłuższy niż %s znaków, zostanie on automatycznie skrócony.' mod='x13allegro' sprintf=$data.titleMaxSize}</p>
</div>
</div>
</div>
<script>
$(document).on('change', '[name="allegro_title_mode"]', function () {
var value = parseInt($(this).val());
if (value === 1) {
$('input[name="allegro_title_pattern"]').parents('.form-group').parent().show();
$('select[name="allegro_title_add_mode"]').parents('.form-group').parent().hide();
$('input[name="allegro_title_replace_from"]').parents('.form-group').parent().hide();
}
else if (value === 2) {
$('input[name="allegro_title_pattern"]').parents('.form-group').parent().hide();
$('select[name="allegro_title_add_mode"]').parents('.form-group').parent().show();
$('input[name="allegro_title_replace_from"]').parents('.form-group').parent().hide();
}
else if (value === 3) {
$('input[name="allegro_title_pattern"]').parents('.form-group').parent().hide();
$('select[name="allegro_title_add_mode"]').parents('.form-group').parent().hide();
$('input[name="allegro_title_replace_from"]').parents('.form-group').parent().show();
}
else {
$('input[name="allegro_title_pattern"]').parents('.form-group').parent().hide();
$('select[name="allegro_title_add_mode"]').parents('.form-group').parent().hide();
$('input[name="allegro_title_replace_from"]').parents('.form-group').parent().hide();
}
});
$(document).on('click', '.allegro_show_title_tags', function(e) {
e.preventDefault();
$(this).hide().next().show();
});
</script>

View File

@@ -0,0 +1,12 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Jednostka' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_unit">
{foreach $data.unitOptions as $value => $name}
<option value="{$value}">{$name}</option>
{/foreach}
</select>
</div>
</div>

View File

@@ -0,0 +1,81 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Metoda aktualizacji' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_auction_tax_method">
<option value="allegro_auction_tax_autoupdate">{l s='Zaktualizuj według ustawień produktu (Polska)' mod='x13allegro'}</option>
<option value="allegro_auction_tax_update_pl">{l s='Wybierz nową stawkę VAT (Polska)' mod='x13allegro'}</option>
<option value="allegro_auction_tax_update_cz">{l s='Wybierz nową stawkę VAT (Czechy)' mod='x13allegro'}</option>
<option value="allegro_auction_tax_update_sk">{l s='Wybierz nową stawkę VAT (Słowacja)' mod='x13allegro'}</option>
<option value="allegro_auction_tax_delete_pl">{l s='Usuń stawkę VAT (Polska)' mod='x13allegro'}</option>
<option value="allegro_auction_tax_delete_cz">{l s='Usuń stawkę VAT (Czechy)' mod='x13allegro'}</option>
<option value="allegro_auction_tax_delete_sk">{l s='Usuń stawkę VAT (Słowacja)' mod='x13allegro'}</option>
</select>
</div>
</div>
<div id="allegro_auction_tax_update_pl" class="form-group row" style="display: none;">
<label class="control-label col-lg-3">
{l s='Nowa stawka VAT (Polska)' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_auction_tax_pl">
{foreach $data.taxPL as $tax}
<option value="{$tax.id}">{$tax.name}</option>
{/foreach}
</select>
</div>
</div>
<div id="allegro_auction_tax_update_cz" class="form-group row" style="display: none;">
<label class="control-label col-lg-3">
{l s='Nowa stawka VAT (Czechy)' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_auction_tax_cz">
{foreach $data.taxCZ as $tax}
<option value="{$tax.id}">{$tax.name}</option>
{/foreach}
</select>
</div>
</div>
<div id="allegro_auction_tax_update_sk" class="form-group row" style="display: none;">
<label class="control-label col-lg-3">
{l s='Nowa stawka VAT (Słowacja)' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_auction_tax_sk">
{foreach $data.taxSK as $tax}
<option value="{$tax.id}">{$tax.name}</option>
{/foreach}
</select>
</div>
</div>
<script>
$(document).on('change', '[name="allegro_auction_tax_method"]', function () {
var value = $(this).val();
if (value == 'allegro_auction_tax_update_pl') {
$('#allegro_auction_tax_update_cz').hide();
$('#allegro_auction_tax_update_sk').hide();
$('#allegro_auction_tax_update_pl').show();
}
else if (value == 'allegro_auction_tax_update_cz') {
$('#allegro_auction_tax_update_pl').hide();
$('#allegro_auction_tax_update_sk').hide();
$('#allegro_auction_tax_update_cz').show();
}
else if (value == 'allegro_auction_tax_update_sk') {
$('#allegro_auction_tax_update_pl').hide();
$('#allegro_auction_tax_update_cz').hide();
$('#allegro_auction_tax_update_sk').show();
}
else {
$('#allegro_auction_tax_update_pl').hide();
$('#allegro_auction_tax_update_cz').hide();
$('#allegro_auction_tax_update_sk').hide();
}
});
</script>

View File

@@ -0,0 +1,42 @@
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Metoda aktualizacji' mod='x13allegro'}
</label>
<div class="col-lg-9">
<select name="allegro_wholesale_price_mode">
<option value="1" selected="selected">{l s='przypisz cennik hurtowy' mod='x13allegro'}</option>
<option value="0">{l s='usuń cennik hurtowy' mod='x13allegro'}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="control-label col-lg-3">
{l s='Cennik hurtowy' mod='x13allegro'}
</label>
<div class="col-lg-9">
{if !empty($data.wholesalePriceList)}
<input type="hidden" name="allegro_wholesale_price_name" value="{$data.wholesalePriceList[0]->benefits[0]->specification->name}">
<select name="allegro_wholesale_price">
{foreach $data.wholesalePriceList as $wholesalePrice}
<option value="{$wholesalePrice->id}">{$wholesalePrice->benefits[0]->specification->name}</option>
{/foreach}
</select>
{else}
{l s='Brak skonfigurowanych cenników hurtowych' mod='x13allegro'}
{/if}
</div>
</div>
<script>
$(document).on('change', '[name="allegro_wholesale_price_mode"]', function () {
if (parseInt($(this).val()) === 1) {
$('select[name="allegro_wholesale_price"]').parents('.form-group').show();
} else {
$('select[name="allegro_wholesale_price"]').parents('.form-group').hide();
}
});
$(document).on('change', '[name="allegro_wholesale_price"]', function () {
$('input[name="allegro_wholesale_price_name"]').val($(this).find('option:selected').text());
});
</script>