first commit

This commit is contained in:
2025-03-12 17:06:23 +01:00
commit 2241f7131f
13185 changed files with 1692479 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<ul class="admin_actions" style="float: left">
<?php if (!$allegro_auction->isNew()):?>
<?php if($sf_request->getParameter('list') == 'stAllegroPlugin'):?>
<?php echo st_get_admin_action('list', __('Lista', null, 'stAdminGeneratorPlugin'), 'stAllegroBackend/list', array('name' => 'list'));?>
<?php else:?>
<?php echo st_get_admin_action('list', __('Lista', null, 'stAdminGeneratorPlugin'), 'stProduct/allegroCustom?product_id='.$forward_parameters['product_id'], array('name' => 'list'));?>
<?php endif;?>
<?php endif;?>
</ul>
<ul class="admin_actions" style="float: right">
<?php if (!$allegro_auction->getAuctionId()):?>
<?php echo st_get_admin_action('save', __('Zapisz', null, 'stAdminGeneratorPlugin'), null, array('name' => 'save'));?>
<?php echo st_get_admin_action('validate_auction', __('Zapisz i waliduj', null, 'stAllegroBackend'), null, array('name' => 'validate_auction'));?>
<?php echo st_get_admin_action('auction', __('Zapisz i wystaw', null, 'stAllegroBackend'), null, array('name' => 'create_auction'));?>
<?php endif;?>
<?php if ($allegro_auction->getEnded() && 1==2):?>
<?php echo st_get_admin_action('refresh', __('Wystaw ponownie', null, 'stAllegroBackend'), null, array('name' => 'resale'));?>
<?php endif;?>
<?php if (!$allegro_auction->isNew()):?>
<?php echo st_get_admin_action('duplicate', __('Utwórz kopie', null, 'stAllegroBackend'), 'stAllegroBackend/duplicate?id='.$allegro_auction->getId(), array('name' => 'duplicate'));?>
<?php endif;?>
</ul>
<div class="clr"></div>
<?php if ($allegro_auction->getAuctionId()):?>
<script type="text/javascript" language="javascript">
jQuery(function($) {
$(document).ready(function() {
$('#st-allegro-edit-form :input').prop('disabled', true);
$('#st-allegro-edit-category-overlay-trigger, .token-input-delete-token-backend').hide();
$('.st-allegro-edit-options-overlay-trigger').hide();
$('.admin_actions :input').prop('disabled', false);
});
});
</script>
<?php endif;?>

View File

@@ -0,0 +1,421 @@
<?php $helper = new stAllegroEditHelper($allegro_auction, $forward_parameters);?>
<?php use_helper('stPrice', 'stProductImage', 'stAllegro');?>
<?php use_javascript('stPrice.js');?>
<?php use_javascript('stAllegroPlugin/stAllegroEdit.js?v2');?>
<?php use_stylesheet('backend/stAllegroPlugin.css?v2');?>
<?php init_tooltip('.st-allegro-tooltip');?>
<?php $hasOptions = ($allegro_auction->getProduct()->getOptHasOptions() > 1);?>
<?php $stAllegro = stAllegro::getInstance($allegro_auction->getEnvironment());?>
<?php echo form_tag('stProduct/allegroSave?product_id='.$forward_parameters['product_id'], array( 'id' => 'st-allegro-edit-form', 'name' => 'st-allegro-edit-form', 'class' => 'admin_form', 'multipart' => true));?>
<?php echo input_hidden_tag('id', $allegro_auction->getId(), array('id' => 'st-allegro-edit-id'));?>
<?php echo input_hidden_tag('allegro_auction[environment]', $allegro_auction->getEnvironment());?>
<?php echo input_hidden_tag('allegro_aucion[product_id]', $allegro_auction->getProductId()); ?>
<?php echo input_hidden_tag('environment', $allegro_auction->getEnvironment());?>
<?php echo ($sf_params->get('product_id')) ? input_hidden_tag('product_id', $sf_params->get('product_id')) : '';?>
<?php if ($sf_flash->has('allegro-validate-message')):?>
<?php $message = $sf_flash->get('allegro-validate-message');?>
<div id="st-allegro-notice" class="save-ok">
<h2><?php echo __('Pozytywny wynik walidacji - komunikat z serwisu aukcyjnego:', null, 'stAllegroBackend');?></h2>
<dl>
<?php foreach ($message as $key => $value):?>
<?php if ($key == 'itemPrice'):?>
<dt><?php echo __('Przewidywany koszt wystawienia:', null, 'stAllegroBackend');?></dt>
<dd><?php echo $value;?></dd>
<?php endif;?>
<?php endforeach;?>
</dl>
</div>
<?php endif;?>
<?php if ($sf_flash->has('allegro-error')):?>
<div class="form-errors">
<h2><?php echo __('Popraw dane w formularzu.', null, 'stAllegroBackend');?></h2>
<dl>
<dd><?php echo $sf_flash->get('allegro-error');?></dd>
</dl>
</div>
<?php endif;?>
<?php if ($sf_flash->has('allegro-validate-error')):?>
<div class="form-errors">
<h2><?php echo __('Negatywny wynik walidacji - komunikat błędu z serwisu aukcyjnego:', null, 'stAllegroBackend');?></h2>
<dl>
<dd><?php echo $sf_flash->get('allegro-validate-error');?></dd>
</dl>
</div>
<?php endif;?>
<?php if ($sf_flash->has('allegro-create-error')):?>
<div class="form-errors">
<h2><?php echo __('Błąd poczas wystawiania aukcji - komunikat błędu z serwisu aukcyjnego:', null, 'stAllegroBackend');?></h2>
<dl>
<dd><?php echo $sf_flash->get('allegro-create-error');?></dd>
</dl>
</div>
<?php endif;?>
<fieldset>
<h2><?php echo __('Informacje podstawowe', null, 'stAllegroBackend');?></h2>
<div class="content">
<?php if ($allegro_auction->getEnvironment() == 'Sandbox'):?>
<div class="row">
<label></label>
<div class="field">
<?php echo __('Aukcja wystawiana jest w trybie testowym.', null, 'stAllegroBackend');?><br />
</div>
</div>
<?php endif;?>
<div class="row row_name">
<label for="allegro_auction_name">
<b><?php echo __('Nazwa', null, 'stAllegroBackend');?></b>
</label>
<div class="field<?php if ($sf_request->hasError('allegro_auction{name}')):?> form-error<?php endif;?>">
<?php if ($sf_request->hasError('allegro_auction{name}')):?>
<?php echo form_error('allegro_auction{name}', array('class' => 'form-error-msg'));?>
<?php endif;?>
<?php echo object_input_tag($allegro_auction, 'getName', array('size' => 80, 'control_name' => 'allegro_auction[name]', 'maxlength' => 200));?>
<div class="clr"></div>
</div>
</div>
<?php if ($allegro_auction->getProduct()->getOptHasOptions() > 1):?>
<div id="st-allegro-edit-options-row" class="row">
<label>
<b><?php echo __('Opcje produktu', null, 'stAllegroBackend');?></b>
</label>
<div class="field">
<?php echo input_hidden_tag('allegro_auction[product_options]', $allegro_auction->getProductOptions(), array('id' => 'st-allegro-edit-hidden-product-options'));?>
<div id="st-allegro-edit-options-selected"></div>
<a id="st-allegro-edit-options-overlay-trigger-main" class="st-allegro-edit-options-overlay-trigger" href="#" rel="#st-allegro-edit-options-overlay" data-stock-for="0">
<?php echo __('Wybierz opcje produktu', null, 'stAllegroBackend');?>
</a>
<div class="clr"></div>
</div>
</div>
<div id="st-allegro-edit-options-overlay" class="popup_window">
<div id="st-allegro-edit-options-overlay-close" class="close">
<img src="/images/frontend/theme/default2/buttons/close.png" alt="" />
</div>
<h2>
<?php echo __('Wybierz opcje produktu', null, 'stAllegroBackend');?>
</h2>
<div class="content">
<div class="preloader_160x24"></div>
</div>
<div id="st-allegro-edit-options-overlay-submit">
<button class="submit" type="button">
<?php echo __('Wybierz', null, 'stAllegroBackend');?>
</button>
</div>
</div>
<?php endif;?>
<div class="row">
<label>
<b><?php echo __('Kategoria', null, 'stAllegroBackend');?></b>
</label>
<div class="field<?php if ($sf_request->hasError('allegro_auction{allegro_category_id}')):?> form-error<?php endif;?>">
<?php if ($sf_request->hasError('allegro_auction{allegro_category_id}')):?>
<?php echo form_error('allegro_auction{allegro_category_id}', array('class' => 'form-error-msg'));?>
<?php endif;?>
<?php echo st_get_partial('stAllegroBackend/edit_select_category', array('type' => 'edit', 'allegro_auction' => $allegro_auction, 'forward_parameters' => $forward_parameters, 'related_object' => $related_object)); ?>
<div class="clr"></div>
</div>
</div>
<div class="allegro-category-container"<?php if (!$allegro_auction->getAllegroCategory()): ?> style="display: none"<?php endif ?>>
<div class="row">
<label>
<b><?php echo __('Typ', null, 'stAllegroBackend');?></b>
</label>
<div class="field">
<ul class="st-allegro-edit-radio-list">
<li>
<?php echo radiobutton_tag('allegro_auction[auction_type]', 0, ($allegro_auction->getAuctionType() == 0) ? true : false, array('id' => 'st-allegro-edit-auction-type-auction'));?>
<label for="st-allegro-edit-auction-type-auction">
<?php echo __('Tylko Kup Teraz! (bez licytacji) lub licytacja', null, 'stAllegroBackend');?>
</label>
</li>
<li>
<?php echo radiobutton_tag('allegro_auction[auction_type]', 1, ($allegro_auction->getAuctionType() == 1) ? true : false, array('id' => 'st-allegro-edit-auction-type-shop'));?>
<label for="st-allegro-edit-auction-type-shop">
<?php echo __('Sklep (bez licytacji)', null, 'stAllegroBackend');?>
</label>
</li>
</ul>
<div class="clr"></div>
</div>
</div>
<div class="row">
<label>
<b><?php echo __('Cena', null, 'stAllegroBackend');?></b>
</label>
<div class="field">
<table class="st_record_list" cellspacing="0">
<thead>
<tr>
<th><b><?php echo __('"Kup teraz !"', null, 'stAllegroBackend');?></b></th>
<th><b><?php echo __('Wywoławcza', null, 'stAllegroBackend');?></b></th>
<th><b><?php echo __('Minimalna', null, 'stAllegroBackend');?></b></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo input_tag('allegro_auction[price_buy_now]', st_price_format($allegro_auction->getPriceBuyNow()), array('size' => 8, 'class' => 'st-allegro-edit-price', 'id' => 'st-allegro-edit-price-buy-now'));?></td>
<td><?php echo input_tag('allegro_auction[price_start]', st_price_format($allegro_auction->getPriceStart()), array('size' => 8, 'class' => 'st-allegro-edit-price', 'id' => 'st-allegro-edit-price-start'));?></td>
<td><?php echo input_tag('allegro_auction[price_min]', st_price_format($allegro_auction->getPriceMin()), array('size' => 8, 'class' => 'st-allegro-edit-price', 'id' => 'st-allegro-edit-price-min'));?></td>
</tr>
</tbody>
</table>
<div class="clr"></div>
</div>
</div>
<?php echo st_allegro_edit_row('Liczba', $helper->getStock(), true);?>
<?php echo st_allegro_edit_row('Zdejmuj z magazynu podczas wystawiania', checkbox_tag('allegro_auction[depository_on_sale]', 1, $allegro_auction->getDepositoryOnSale()));?>
<?php echo st_allegro_edit_row('Czas trwania', $helper->getDuration());?>
<?php //echo st_allegro_edit_row('Automatyczne wznowienie oferty w sklepie', $helper->getResumption());?>
</div>
</div>
</fieldset>
<div class="allegro-category-container" <?php if (!$allegro_auction->getAllegroCategory()): ?> style="display: none"<?php endif ?>>
<fieldset>
<h2><?php echo __('Płatność i dostawa', null, 'stAllegroBackend');?></h2>
<div class="content">
<?php echo st_allegro_edit_row('Formy płatności', $helper->getPayOptions(), array('row' => 'allegro-pay-options'));?>
<?php echo st_allegro_edit_row('Dodatkowe informacje o przesyłce i płatności', textarea_tag('allegro_auction[other_text]', $allegro_auction->getOtherText(), array('id' => 'st-allegro-edit-other-text')));?>
<?php echo st_allegro_edit_row('Wysyłka w ciągu', $helper->getShippingTime());?>
<?php echo st_allegro_edit_row('Koszty wysyłki pokrywa', select_tag('allegro_auction[who_pay]', options_for_select(array(1 => __('kupujący', null, 'stAllegroBackend'), 0 => __('sprzedający', null, 'stAllegroBackend')), $allegro_auction->getWhoPay())));?>
<?php if(($allegroDelivery = $helper->getAllegroDelivery()) !== null):?>
<div class="row">
<label for="st-allegro-edit-allegro-delivery">
<?php echo __('Cennik dostawy', null, 'stAllegroBackend');?>
</label>
<div class="field">
<?php echo $allegroDelivery;?>
<div class="clr"></div>
</div>
</div>
<?php endif;?>
<div class="row">
<label>
<?php echo __('Opcje dostawy', null, 'stAllegroBackend');?>
</label>
<div class="field">
<div id="st-allegro-edit-deliveries">
<?php if($allegro_auction->isNew() && $sf_request->getMethod() !== sfRequest::POST):?>
<img id="st-allegro-edit-deliveries-loading" src="/images/frontend/theme/default2/loading.gif" alt=""/>
<?php else:?>
<?php echo st_get_component('stAllegroDeliveryBackend', 'deliveries', array('namespace' => 'allegro_auction', 'environment' => $allegro_auction->getEnvironment(), 'auction' => $allegro_auction->getId(), 'id' => -1, 'show' => true));?>
<?php endif;?>
</div>
<div class="clr"></div>
</div>
</div>
</div>
</fieldset>
<fieldset id="st-allegro-fieldset-images">
<h2><?php echo __('Zdjęcia', null, 'stAllegroBackend');?></h2>
<div class="content">
<div class="row">
<?php echo __('Wybierz zdjęcia, które będą załączone do aukcji i zaznacz domyślne zdjęcie.', null, 'stAllegroBackend');?><br />
<?php echo __('Jeśli chcesz wyświetlić zdjęcie w treści opisu, wprowadź jego nazwę w postaci np. {PHOTO:1} lub {PHOTO:2} itd. w miejscu, gdzie ma się ono pojawić.', null, 'stAllegroBackend');?>
</div>
<div class="row">
<div class="field">
<?php echo input_hidden_tag('allegro_auction[images]', '');?>
<div id="st-allegro-edit-images">
<?php foreach ($helper->getImages() as $k => $image): $number = $allegro_auction->hasNewDescriptionFormat() ? $image->getId() : $k + 1; $allegroAsset = $helper->getImageInformation($image); ?>
<div class="st-allegro-edit-image-box">
<div class="st-allegro-edit-image" data-selected="<?php echo intval($allegroAsset['selected']) ?>" data-number="<?php echo $number ?>">
<?php echo st_product_image_tag($image, 'full');?>
</div>
<div class="st-allegro-edit-image-desc">
<?php echo checkbox_tag('allegro_auction[images][selected]['.$image->getId().']', 1, $allegroAsset['selected'], array('title' => __('Eksport zdjęcia', null, 'stAllegroBackend')));?>
<?php echo radiobutton_tag('allegro_auction[images][default]', $image->getId(), $allegroAsset['default'], array('title' => __('Domyślne zdjęcie', null, 'stAllegroBackend')));?>
<?php if (!$allegro_auction->hasNewDescriptionFormat()): ?>
<label for="allegro_auction_default_image_<?php echo $image->getId();?>"><b>{PHOTO:<?php echo $number; ?>}</b></label>
<?php endif ?>
<div class="clr"></div>
</div>
</div>
<?php endforeach;?>
</div>
<div class="clr"></div>
</div>
</div>
</div>
</fieldset>
<fieldset id="st-allegro-fieldset-description">
<h2><?php echo __('Opis', null, 'stAllegroBackend');?></h2>
<div class="content">
<?php echo st_allegro_edit_row('Skrócony opis', textarea_tag('allegro_auction[short_text]', $allegro_auction->getShortText(), array('tinymce_options' => 'height:300,width:\'100%\','.($allegro_auction->getAuctionId() ? 'readonly:true' : 'theme:\'simple\''), 'rich' => true)));?>
<?php echo st_get_component('stAllegroBackend', 'description', array('auction' => $allegro_auction)) ?>
</div>
</fieldset>
<fieldset>
<h2><?php echo __('Dodatkowe opcje i atrybuty', null, 'stAllegroBackend');?></h2>
<div class="content">
<?php if (!$allegro_auction->hasNewDescriptionFormat()): ?>
<?php echo st_allegro_edit_row('Szablon', $helper->getTemplate());?>
<?php endif ?>
<div class="row allegro-options">
<label>
<?php echo __('Dodatkowe opcje', null, 'stAllegroBackend');?>
<a href="#" class="help" title="<?php echo __('Niektóre opcje mogą być dodatkowo płatne. Więcej w cenniku Allegro.', null, 'stAllegroBackend');?>"></a>
</label>
<div class="field">
<div class="field-container"><?php echo $helper->getOptions();?></div>
<div class="clr"></div>
</div>
</div>
<?php echo st_allegro_edit_row('EAN', input_tag('allegro_auction[ean]', $allegro_auction->getEan()));?>
<div id="st-allegro-edit-attributes">
<?php if (is_object($allegro_auction->getAllegroCategory())):?>
<?php echo st_get_component('stAllegroBackend', 'getAttributes', array('environment' => $allegro_auction->getEnvironment(), 'category' => $allegro_auction->getAllegroCategory()->getCatId(), 'auction' => $allegro_auction, 'product' => $allegro_auction->getProduct()));?>
<?php endif;?>
</div>
</div>
</fieldset>
<div id="edit_actions">
<?php st_include_partial('allegro_edit_actions', array('allegro_auction' => $allegro_auction, 'forward_parameters' => $forward_parameters));?>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function($) {
$(document).ready(function() {
$('#edit_actions').stickyBox();
$('.st-allegro-edit-price').change(function() {
$(this).val(stPrice.fixNumberFormat($(this).val()));
});
$('.st-allegro-edit-price').keypress(function(event) {
if (event.which == 13) {
$(this).val(stPrice.fixNumberFormat($(this).val()));
event.preventDefault();
}
});
$('.st-allegro-edit-quantity').change(function() {
$(this).val(stPrice.fixNumberFormat($(this).val(), 0));
});
$('.st-allegro-edit-quantity').keypress(function(event) {
if (event.which == 13) {
$(this).val(stPrice.fixNumberFormat($(this).val(), 0));
event.preventDefault();
}
});
stAllegroEdit.reloadTypeView();
$('input[name="allegro_auction[auction_type]"]').change(function () {
stAllegroEdit.reloadTypeView();
});
<?php if($allegro_auction->isNew() && $sf_request->getMethod() !== sfRequest::POST):?>
if ($('#st-allegro-edit-allegro-delivery').val() != -1)
stAllegroEdit.reloadDelivery();
<?php endif;?>
$('#st-allegro-edit-allegro-delivery').change(function() {
stAllegroEdit.reloadDelivery();
});
stAllegroEdit.setVariantsActivity();
$('.st-allegro-tooltip').removeData('tooltip'); $('.st-allegro-tooltip').tooltip();
<?php if($hasOptions):?>
if ($('#st-allegro-edit-options-selected').text().length == 0 && $('#st-allegro-edit-hidden-product-options').val().length != 0) {
stAllegroEdit.addLoading($('#st-allegro-edit-options-overlay-trigger-main'));
stAllegroEdit.processMainProductOptions('<?php echo st_url_for('stAllegroBackend/ajaxProductStock');?>?id=<?php echo $allegro_auction->getProductId();?>&selected=' + $('#st-allegro-edit-hidden-product-options').val(), ["<?php echo __('Zmień wybrane opcje', null, 'stAllegroBackend');?>"]);
}
$('.st-allegro-edit-options-overlay-trigger').live('click', function() {
console.log('niby dizała');
$('#st-allegro-edit-options-overlay').data('stock-for', $(this).data('stock-for'));
$('#st-allegro-edit-options-overlay').overlay({
speed: 'fast',
close: $('#st-allegro-edit-options-overlay > .close img'),
load: true,
mask: {
color: '#444',
loadSpeed: 'fast',
opacity: 0.5,
},
closeOnClick: false,
closeOnEsc: false,
onBeforeLoad: function() {
var content = this.getOverlay().children('.content');
$.get('<?php echo st_url_for('stAllegroBackend/ajaxProductOptions');?>?id=<?php echo $allegro_auction->getProductId();?>', function(html) {
content.html(html);
});
},
onClose: function() {
$('#st-allegro-edit-options-overlay').data('overlay', '');
}
});
});
$('.st-allegro-variant-checkbox:checked').each(function() {
var id = $(this).data('fid') + '-' + $(this).val();
stAllegroEdit.processProductOptions(id, '<?php echo st_url_for('stAllegroBackend/ajaxProductStock');?>?id=<?php echo $allegro_auction->getProductId();?>&selected=' + $('#st-allegro-variant-options-' + id).val());
});
$('#st-allegro-edit-options-overlay .submit').live('click', function() {
var api = $('#st-allegro-edit-options-overlay').data('overlay');
var options = $('#st-allegro-edit-options-overlay #product_options_selected').val();
$('#st-allegro-edit-hidden-product-options').val(options);
var stockFor = $('#st-allegro-edit-options-overlay').data('stock-for');
if (stockFor == 0)
stAllegroEdit.processMainProductOptions('<?php echo st_url_for('stAllegroBackend/ajaxProductStock');?>?id=<?php echo $allegro_auction->getProductId();?>&selected=' + options, ["<?php echo __('Zmień wybrane opcje', null, 'stAllegroBackend');?>"]);
else {
stAllegroEdit.processProductOptions(stockFor, '<?php echo st_url_for('stAllegroBackend/ajaxProductStock');?>?id=<?php echo $allegro_auction->getProductId();?>&selected=' + options);
$('#st-allegro-variant-options-' + stockFor).val(options);
// $.get('<?php echo st_url_for('stAllegroBackend/ajaxProductStock');?>?id=<?php echo $allegro_auction->getProductId();?>&selected=' + options, function(json) {
// var data = $.parseJSON(json);
// $('#st-allegro-variant-options-img-' + stockFor).attr('src', '/images/backend/icons/list.png');
// newTitle = 'Wybrane opcje: ';
// $.each(data.selected, function (key, value) {
// newTitle += '<b>' + key + ':</b> ' + value + ', ';
// });
// newTitle += '<br/>Kliknij aby zmienić opcje.';
// $('#st-allegro-variant-options-img-' + stockFor).attr('title', newTitle);
// $('#st-allegro-variant-options-img-' + stockFor).data('title', newTitle);
// $('#st-allegro-variant-options-img-' + stockFor).removeAttr("title");
// $('#st-allegro-variant-options-' + stockFor).val(options);
// });
}
api.close();
$('#st-allegro-edit-options-overlay').data('overlay', '');
});
<?php endif;?>
});
});
</script>

View File

@@ -0,0 +1,43 @@
<?php
use_helper('stAsset');
use_javascript('/sfAssetsLibraryPlugin/js/helper.js');
?>
<?php echo input_file_tag('product_has_attachment[attachment_edit_file]') ?>
<?php if ($product_has_attachment->getSfAssetId()): $pha = $product_has_attachment; $path = '/product/attachment/'.$pha->getProduct()->getAssetFolder().'/'.$pha->getAssetCulture().'/'.$pha->getFilename() ?>
<p style="padding-top: 10px"><?php echo content_tag('a', $path, array('href' => $path)) ?></p>
<?php endif; ?>
<script type="text/javascript">
jQuery(function($) {
$(document).ready(function() {
var filename = $('#product_has_attachment_attachment_edit_filename');
$('#product_has_attachment_attachment_edit_file').change(function() {
var input = $(this);
var value = input.val();
if (value.indexOf("/") > 0) {
var file = value.split("/");
} else {
var file = value.split("\\");
}
value = file.pop();
console.log(value);
var ext = stAssetsLibraryHelper.extractExtension(value);
filename.val(stAssetsLibraryHelper.fixFilename(value, true));
$('#product_has_attachment_filename_ext').html(ext ? '.'+ext : '');
});
filename.change(function() {
var input = $(this);
var value = input.val();
input.val(stAssetsLibraryHelper.fixFilename(value, true));
if (input.val() == '') {
input.val(input.get(0).defaultValue);
}
});
});
});
</script>

View File

@@ -0,0 +1,13 @@
<?php
if ($product_has_attachment->getSfAssetId())
{
$ext = sfAssetsLibraryTools::getFileExtension($product_has_attachment->getSfAsset()->getFilename());
}
else
{
$ext = sfAssetsLibraryTools::getFileExtension($sf_request->getFileName('product_has_attachment[attachment_edit_file]'));
}
echo input_tag('product_has_attachment[attachment_edit_filename]', $product_has_attachment->getAttachmentEditFilename());
?>
<span id="product_has_attachment_filename_ext"><?php echo $ext ? '.'.$ext : '' ?></span>

View File

@@ -0,0 +1 @@
<?php echo object_select_tag($product_has_attachment->getLanguage(), 'getId', array('related_class' => 'Language', 'text_method' => 'getName', 'control_name' => 'product_has_attachment[attachment_edit_language]', 'disabled' => !$product_has_attachment->isNew())) ?>

View File

@@ -0,0 +1,8 @@
<?php
$id = $product_has_attachment->getLanguageId();
$c = new Criteria();
$c->add(LanguagePeer::ID, $id);
$language = LanguagePeer::doSelectOne($c);
?>
<?php echo get_language_flag_icon($language->getShortcut()) ?>

View File

@@ -0,0 +1,9 @@
<?php
use_helper('stProduct');
?>
<span style="float: left"><?php echo link_to(st_product_get_attachment_icon($product_has_attachment->getAttachment()), 'stProduct/attachmentEdit?product_id='.$product_has_attachment->getProductId().'&id='.$product_has_attachment->getId()) ?></span>
<span style="float: left; padding-left: 5px"><?php echo link_to($product_has_attachment->getFilename(), 'stProduct/attachmentEdit?product_id='.$product_has_attachment->getProductId().'&id='.$product_has_attachment->getId()) ?></span>
<br style="clear: left" />

View File

@@ -0,0 +1,13 @@
<?php
if (strlen($product->getFrontendAvailability()) > 10) {
echo st_truncate_text($product->getFrontendAvailability(), '10', '...');
} else {
echo $product->getFrontendAvailability();
}
?>

View File

@@ -0,0 +1,11 @@
<?php
$c = new Criteria();
$select_options = array('' => '---');
foreach (AvailabilityPeer::doSelectWithI18n($c) as $availability)
{
$select_options[$availability->getId()] = $availability->getAvailabilityName();
}
echo select_tag('filters[avail]', options_for_select($select_options, isset($filters['avail']) ? $filters['avail'] : null));

View File

@@ -0,0 +1,26 @@
<?php
/**
* Szablon dla partial'a _price
*
* @package stProduct
* @author Marcin Butlak <marcin.butlak@sote.pl>
* @copyright SOTE
* @license SOTE
* @version $Id: _price.php 2545 2009-08-11 13:58:21Z pawel $
*/
?>
<table class="st_record_list" cellspacing="0">
<thead>
<tr>
<th><?php echo __('Netto') ?></th>
<th><?php echo __('Brutto') ?></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo input_tag ('product[basic_price_netto]', $product->getCurrency()->getIsSystemCurrency() ? st_price_format($product->getBasicPriceNetto()) : null, array('size' => 7, 'disabled' => !$product->getCurrency()->getIsSystemCurrency())) ?></td>
<td><?php echo input_tag ('product[basic_price_brutto]', st_price_format($product->getCurrency()->getIsSystemCurrency() ? $product->getBasicPriceBrutto() : $product->getCurrencyPrice()), array('size' => 7)) ?></td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,36 @@
<?php
/**
* @var Product $product
*/
echo input_tag($name.'[value]', $product->getBpumDefaultValue(), ['data-format' => 'decimal']) . ' ' . st_product_bpum_select_tag($name.'[unit]', $product->getBpumDefaultId(), ['include_custom' => '---']);
?>
<script>
jQuery(function($) {
$(document).ready(function() {
$('#<?php echo get_id_from_name($name.'[unit]') ?>').change(function() {
let source = $(this);
let target = $('#product_bpum_value_unit');
if (source.val()) {
let targetVal = target.val();
let options = '<option value="">---</option>';
let unitGroup = source.children(':selected').data('unit-group');
source.children('option[data-unit-group="'+unitGroup+'"]').each(function() {
let option = $(this);
options += '<option value="'+option.val()+'">'+option.html()+'</option>';
});
target.html(options);
target.val(targetVal);
$('.row_bpum_value').show();
target.selectBox('update');
} else {
$('.row_bpum_value').hide();
}
}).change();
});
});
</script>

View File

@@ -0,0 +1,5 @@
<?php
/**
* @var Product $product
*/
echo input_tag($name.'[value]', $product->getBpumValue(), ['data-format' => 'decimal']) . ' ' . st_product_bpum_select_tag($name.'[unit]', $product->getBpumId(), ['include_custom' => '---']);

View File

@@ -0,0 +1,36 @@
<?php
/**
* Szablon dla komponentu category
*
* @package stProduct
* @author Marcin Butlak <marcin.butlak@sote.pl>
* @copyright SOTE
* @license SOTE
* @version $Id: _category.php 661 2009-04-16 07:01:00Z michal $
*/
if ($product->isNew())
{
$params = array('product_hash' => $product->hashCode());
}
else
{
$params = array('product_id' => $product->getId());
}
if ($sf_request->hasErrors())
{
$params['assigned-categories'] = implode('-', $sf_request->getParameter('product_has_category', array()));
$params['default-category'] = $sf_request->getParameter('product_default_category');
}
?>
<div id="st_product_has_categories">
<?php foreach ($categories as $category): ?>
<?php if ($category['default']): ?>
<input type="hidden" value="<?php echo $category['id'] ?>" name="product_default_category" id="product_default_category" />
<?php endif; ?>
<input type="hidden" value="<?php echo $category['id'] ?>" name="product_has_category[<?php echo $category['id'] ?>]" id="product_has_category_<?php echo $category['id'] ?>" />
<?php endforeach; ?>
</div>

View File

@@ -0,0 +1,103 @@
<?php
use_stylesheet('backend/stProduct.css?version=5');
use_javascript('/stCategoryTreePlugin/js/jquery-1.3.2.min.js', 'first');
use_javascript('/stCategoryTreePlugin/js/jquery-no-conflict.js', 'first');
if (isset($parent))
{
$children = $parent->getChildren();
$id = $parent->getId();
}
else
{
$id = 'null';
}
?>
<?php if ($include_container): ?>
<div id="stProduct-category-filter" style="display: none">
<?php endif; ?>
<ul id="cf-<?php echo $id ?>">
<?php if (isset($return_value)): ?>
<li class="expandable returnable">
<span id="cf-trigger-<?php echo $return_value['return_id'] ?>" class="trigger">&laquo;</span>
<?php
if (!$return_value['id'])
{
echo st_link_to($return_value['label'], '#', array('onclick' => 'return false;', 'class' => 'trigger link', 'id' => 'cf-link-trigger-'.$return_value['return_id']));
}
else
{
echo st_link_to($return_value['label'], '@stProductCategoryFilter?filters[category]='.$return_value['id']);
}
?>
</li>
<?php endif; ?>
<?php foreach ($children as $child): $has_children = $child->hasChildren(); $is_root = $child->isRoot() ?>
<li<?php if ($has_children): ?> class="expandable"<?php endif; ?>>
<?php if ($has_children): ?>
<span id="cf-trigger-<?php echo $child->getId() ?>" class="trigger">&rsaquo;</span>
<?php endif; ?>
<?php
if ($is_root)
{
echo st_link_to($child->getName(), '#', array('onclick' => 'return false;', 'class' => 'trigger link', 'id' => 'cf-link-trigger-'.$child->getId()));
}
else
{
echo st_link_to($child->getName(), '@stProductCategoryFilter?filters[category]='.$child->getId());
}
?>
</li>
<?php endforeach; ?>
</ul>
<br style="clear: left" />
<?php if ($include_container): ?>
</div>
<?php endif; ?>
<script type="text/javascript">
jQuery(function($) {
var items = $('#cf-<?php echo $id ?> li.expandable .trigger');
$.each(items, function() {
$(this).click(function() {
var o = $(this);
var id = this.id;
id = id.replace('cf-trigger-', '');
id = id.replace('cf-link-trigger-', '');
if (o.hasClass('link'))
{
var obj2 = $('cf-trigger-'+id);
obj2.html('<?php echo image_tag('backend/stProduct/ajax_loader.gif') ?>');
obj2.addClass('selected');
}
else
{
o.html('<?php echo image_tag('backend/stProduct/ajax_loader.gif') ?>');
}
o.addClass('selected');
$.each(items, function () { $(this).unbind('click'); });
$.ajax({
url: '<?php echo st_url_for('stProduct/ajaxFilterCategory'); ?>/id/' + id,
dataType: 'html',
success: function (data)
{
$('#stProduct-category-filter').html(data);
}
});
});
});
});
</script>

View File

@@ -0,0 +1,13 @@
<?php
if (strlen($product->getCode()) > 20) {
echo st_truncate_text($product->getCode(), '20', '...');
} else {
echo $product->getCode();
}
?>

View File

@@ -0,0 +1,15 @@
<?php
if ($sf_flash->get('update_product_options_stock_computation'))
{
use_helper('stProgressBar');
$task = new stProductOptionsStockUpdateComputationProgressBarTask($sf_context);
st_admin_section_start();
echo progress_bar($task);
st_admin_section_end();
}
else
{
include st_admin_get_template_path(__FILE__);
}

View File

@@ -0,0 +1 @@
<?php echo asset_image_tag($default_image, $image_type)?>

View File

@@ -0,0 +1,3 @@
<?php echo input_tag('product[delivery_price]', stPrice::round($product->getDeliveryPrice()), array('size' => 8)) ?> <?php echo __(ucfirst($product->getConfiguration()->get('delivery_price_type', 'netto'))) ?>
<?php echo st_price_add_format_behavior('product_delivery_price') ?>

View File

@@ -0,0 +1,7 @@
<?php echo input_tag('filters[list_stock][from]', isset($filters['list_stock']['from']) ? $filters['list_stock']['from'] : null, array (
'size' => 4,
'class' => 'float',
)) . ' - ' . input_tag('filters[list_stock][to]', isset($filters['list_stock']['to']) ? $filters['list_stock']['to'] : null, array (
'size' => 4,
'class' => 'float',
)) ?>

View File

@@ -0,0 +1,10 @@
<?php
// auto-generated by sfPropelAdmin
// date: 2010/06/02 14:24:21
?>
<?php
$c = new Criteria();
$c->add(DiscountHasProductPeer::PRODUCT_ID, $forward_parameters['product_id']);
$assigned = $discount->countDiscountHasProducts($c);
?>
<td><?php echo $assigned || $discount->getAllProducts() ? image_tag(sfConfig::get('sf_admin_web_dir').'/images/tick.png') : '-' ?></td>

View File

@@ -0,0 +1,67 @@
<table class="st_record_list" cellspacing="0">
<thead>
<tr>
<th><?php echo __('Waluta') ?></th>
<th><?php echo st_admin_checkbox_tag('product[has_fixed_currency_exchange]', true, $product->getHasFixedCurrency(), array('disabled' => $product->getCurrency()->getIsSystemCurrency(), 'label' => __('Zablokuj kurs'))) ?></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo select_tag('product[edit_currency]', options_for_select($currency['select_options'], $product->getCurrency()->getId())) ?></td>
<td><?php echo input_tag('product[fixed_currency_exchange]', $product->getHasFixedCurrency() ? $product->getFixedCurrencyExchangeBackend() : $product->getCurrency()->getExchangeBackend() , array('disabled' => !$product->getHasFixedCurrency(), 'size' => 6)) ?></td>
</tr>
</tbody>
</table>
<script type="text/javascript">
jQuery(function($) {
var currency_exchange = <?php echo $currency['exchange_rates'] ?>;
var fixed_currency_exchange = $('#product_fixed_currency_exchange');
var currency_fixed = $('#product_has_fixed_currency_exchange');
var currency = $('#product_edit_currency');
var prev_selected = currency.val();
currency.change(function()
{
var selected = $(this).val();
if (selected == '<?php echo $currency['system_currency_id'] ?>')
{
stPriceTaxManagment.instance.enablePriceFields();
currency_fixed.prop('disabled', true);
fixed_currency_exchange.prop('disabled', true);
stPriceTaxManagment.instance.refreshPriceFields();
}
else
{
stPriceTaxManagment.instance.disablePriceFields();
$.each(stPriceTaxManagment.instance.priceFields, function () {
this.price.value = '';
});
currency_fixed.prop('disabled', false);
fixed_currency_exchange.prop('disabled', !currency_fixed.prop('checked'));
}
fixed_currency_exchange.val(currency_exchange[selected]);
});
currency_fixed.change(function() {
fixed_currency_exchange.prop('disabled', !currency_fixed.prop('checked'));
});
fixed_currency_exchange.change(function() {
$(this).val(stPrice.fixNumberFormat($(this).val(), 4));
});
});
</script>

View File

@@ -0,0 +1,2 @@
<?php
include st_admin_get_template_path(__DIR__ . '/_listMenu.php');

View File

@@ -0,0 +1,36 @@
<?php use_helper('stImageSize', 'stProductPhoto'); ?>
<div style="width: 300px; float: left">
<?php if ($sf_request->hasError('product{image}')): ?>
<?php echo form_error('product{image}', array('class' => 'form-error-msg')) ?>
<?php endif; ?>
<?php $value = object_admin_input_file_tag($product, 'getImage', array (
'control_name' => 'product[image]',
'include_remove' => false,
));
echo $value ? $value : '&nbsp;'
?>
<br />
<?php echo st_product_photo($product->getImage(), 128, 128, "/sfAsset/edit?id=".$product->getAssetMainId()); ?>
</div>
<?php $assets = getAssets($product->getId(), 6) ?>
<?php $index = 0; ?>
<div style="float: left; border: 1px solid #cccccc;">
<?php foreach($assets as $asset): ?>
<?php $index++ ?>
<div style="margin: 5px; float: left; width: 84px; height: 84px;border: 1px dashed #cccccc"><?php echo st_asset_photo_link($asset->getPath(), 84, 84, "/sfAsset/edit?id=".$asset->getId()); ?></div>
<?php if ( ($index % 3) == 0): ?><br class="st_clear_all" /><?php endif; ?>
<?php endforeach; ?>
</div>
<br class="st_clear_all" />
<br />
<?php if ($sf_request->getParameter("id")): ?>
<?php echo st_get_admin_actions_head('style="margin-top: 0px; float: right;"') ?>
<?php echo st_get_admin_action('save', __('Zapisz'), null, array ('name' => 'save',)) ?>
<?php echo st_get_admin_actions_foot() ?>
<?php endif; ?>

View File

@@ -0,0 +1,5 @@
<?php
$options = array("" => "---", 1 => __('tak', null, 'stAdminGeneratorPlugin'), 0 => __('nie', null, 'stAdminGeneratorPlugin'));
echo select_tag('filters[allegro]', options_for_select($options, isset($filters['allegro']) ? $filters['allegro'] : null));
?>

View File

@@ -0,0 +1,5 @@
<?php
echo st_availability_select_tag('filters[availability_id]', isset($filters['availability_id']) ? $filters['availability_id'] : null, [
'include_custom' => '---',
]);

View File

@@ -0,0 +1,5 @@
<?php
$options = array("" => "---", -1 => __('Wyłączone')) + _product_hide_price_options();
echo select_tag('filters[hide_price]', options_for_select($options, isset($filters['hide_price']) ? $filters['hide_price'] : null));
?>

View File

@@ -0,0 +1,5 @@
<?php
echo select_tag('filters[list_image]',
options_for_select(array(1 => __('tak', array(), 'stAdminGeneratorPlugin'), 0 => __('nie', array(), 'stAdminGeneratorPlugin')),
isset($filters['list_image']) ? $filters['list_image'] : null, array ('include_custom' => '---')))
?>

View File

@@ -0,0 +1,9 @@
<?php if (($num_products != $num_products_good) && ($culture == "pl_PL")):?>
<div style="border: 1px solid red; padding: 20px; width: 250px; margin: 0px auto;">
<?php echo st_get_admin_actions_head('style="margin-top: 10px;"') ?>
Przed rozpoczęciem pracy w aplikacji <b>Produkty</b> klknij poniższy przycisk: <br /><br />
<?php echo st_get_admin_action('save', __('Optymalizuj produkty'), 'stProduct/fixProducts', array (
)) ?> <?php echo st_get_admin_actions_foot() ?>
</div>
<br />
<?php endif;?>

View File

@@ -0,0 +1,10 @@
<?php if ($sf_request->hasError('product{group_price_id}')): ?>
<?php echo form_error('product{group_price_id}', array('class' => 'form-error-msg')) ?>
<?php endif; ?>
<?php echo object_select_tag($product, 'getGroupPriceId', array (
'related_class' => 'GroupPrice',
'control_name' => 'product[group_price_id]',
'include_custom' => __("---", null, 'stAdminGeneratorPlugin'),
'include_blank' => false,
)); ?>

View File

@@ -0,0 +1,6 @@
<?php echo input_file_tag("trust[icon_f]", ""); ?><br />
<?php if ($trust->getIconF() != "") : ?>
<img src="/uploads<?php echo $trust->getIconF(); ?>" alt="" style="max-width: 40px; margin-top: 7px;"><br />
<?php echo link_to(__('Usuń ikone'), 'stTrustBackend/deleteProductImage?image=icon_f&product_id='.$trust->getProductId()) ?>
<br class="st_clear_all">
<?php endif; ?>

View File

@@ -0,0 +1,6 @@
<?php echo input_file_tag("trust[icon_s]", ""); ?><br />
<?php if ($trust->getIconS() != "") : ?>
<img src="/uploads<?php echo $trust->getIconS(); ?>" alt="" style="max-width: 40px; margin-top: 7px;"><br />
<?php echo link_to(__('Usuń ikone'), 'stTrustBackend/deleteProductImage?image=icon_s&product_id='.$trust->getProductId()) ?>
<br class="st_clear_all">
<?php endif; ?>

View File

@@ -0,0 +1,6 @@
<?php echo input_file_tag("trust[icon_t]", ""); ?><br />
<?php if ($trust->getIconT() != "") : ?>
<img src="/uploads<?php echo $trust->getIconT(); ?>" alt="" style="max-width: 40px; margin-top: 7px;"><br />
<?php echo link_to(__('Usuń ikone'), 'stTrustBackend/deleteProductImage?image=icon_t&product_id='.$trust->getProductId()) ?>
<br class="st_clear_all">
<?php endif; ?>

View File

@@ -0,0 +1,19 @@
<?php
/**
* Szablon dla partial'a _product_image
*
* @package stProduct
* @author Marcin Olejniczak <marcin.olejniczak@sote.pl>
* @copyright SOTE
* @license SOTE
* @version $Id: _image.php 617 2009-04-09 13:02:31Z michal $
*/
?>
<?php if ($sf_request->hasError('product{image}')): ?>
<?php echo form_error('product{image}', array('class' => 'form-error-msg')) ?>
<?php endif; ?>
<?php $value = object_admin_input_file_tag($product, 'getImage', array (
'control_name' => 'product[image]',
)); echo $value ? $value : '&nbsp;' ?>
<br class="st_clear_all" />
<?php st_include_component('stProduct', 'mainImage');?><br>

View File

@@ -0,0 +1,13 @@
<?php use_helper('stProductPhoto');?>
<?php foreach ($photos as $photo):?>
<div style="float:left; margin:10px">
<?php if ($photo==get_main_image($photos)):?>
<?php echo image_tag('/uploads/products/'.$dir.'/'.$photo, array('width'=>150))?>
<?php else:?>
<?php echo image_tag('/uploads/products/'.$dir.'/'.$photo, array('width'=>50))?>
<?php endif;?>
</div>
<?php endforeach;?>
<br>
<?php echo link_to(__('Przejdź do galerii aby zarządzać zdjęciami produktu'), 'product/galleryEdit?id='.$product->getId())?>

View File

@@ -0,0 +1 @@
<?php echo checkbox_tag('lukas_product[disable]', 1, $lukas_product->getDisable());

View File

@@ -0,0 +1,12 @@
<?php
$c = new Criteria();
$c->add(ProductForSfAssetPeer::PRODUCT_ID , $forward_parameters['product_id']);
$c->add(ProductForSfAssetPeer::SF_ASSET_ID , $sf_asset->getId());
$asset = ProductForSfAssetPeer::doSelectOne($c);
if ( $asset ):
$assigned = $asset->getIsMain();
else:
$assigned = false;
endif;
?>
<?php echo $assigned ? image_tag(sfConfig::get('sf_admin_web_dir').'/images/tick.png') : '-' ?>

View File

@@ -0,0 +1,13 @@
<?php
$languages = LanguagePeer::doSelect(new Criteria());
$reviewLanguages = array();
foreach ($languages as $language) {
$c = new Criteria();
$c->add(LanguageI18nPeer::CULTURE, sfContext::getInstance()->getUser()->getCulture());
$LanguageI18n = $language->getLanguageI18ns($c);
$reviewLanguages[$language->getOriginalLanguage()] = $LanguageI18n[0]->getName();
}
echo select_tag("review[language]", options_for_select($reviewLanguages, $review->getLanguage()));

View File

@@ -0,0 +1,18 @@
<?php
/**
* @var sfWebRequest $sf_request
*/
if ($sf_request->getParameter('category_id') && !$filters)
{
$empty_message = 'Wybrana kategoria nie ma przypisanych produktów';
}
if ($sf_context->getActionName() == 'listLong')
{
include __DIR__ . '/_list_long.php';
}
else
{
include sfConfig::get('sf_module_cache_dir').'/auto'.ucfirst($sf_context->getModuleName()).'/templates/_list.php';
}

View File

@@ -0,0 +1,9 @@
<?php if ($sf_context->getActionName() == 'listLong'): ?>
<style>
.list_select_control,
.admin_actions .action-edit {
display: none;
}
</style>
<?php endif ?>
<?php include sfConfig::get('sf_module_cache_dir').'/auto'.ucfirst($sf_context->getModuleName()).'/templates/_list_actions.php'; ?>

View File

@@ -0,0 +1,28 @@
<div class="header" style="margin-bottom: 15px">
<div class="pager_bar">
<?php
echo select_tag('product_list_type', options_for_select(array(
st_url_for($sf_context->getModuleName().'/setConfiguration?for_action=list&params[list_type]=listLong') => __('Lista pełna', null, 'stBackendMain'),
st_url_for($sf_context->getModuleName().'/setConfiguration?for_action=list&params[list_type]=list') => __('Lista skrócona', null, 'stBackendMain'),
), st_url_for($sf_context->getModuleName().'/setConfiguration?for_action=list&params[list_type]='.$sf_context->getActionName())))
?>
</div><div class="menu categories">
<ul>
<li class="expandable">
<span>
<img src="<?php echo get_app_icon('stCategory') ?>" alt="<?php echo __('Kategorie', null, 'stBackendMain') ?>">
<span><?php echo __('Kategorie', null, 'stBackendMain') ?></span>
</span>
<?php st_include_component('stCategory', 'tree', array('selected' => $sf_request->getParameter('category_id'))) ?>
</li>
</ul>
</div>
<div class="clr"></div>
</div>
<script>
jQuery(function($) {
$('#product_list_type').change(function() {
window.location = $(this).val();
});
});
</script>

View File

@@ -0,0 +1,4 @@
<?php echo st_get_component('stCategory', 'treeBreadcrumbs') ?>
<?php echo st_get_component("stProduct", "fixProducts", array('pager' => $pager)); ?>

View File

@@ -0,0 +1,6 @@
<?php use_helper('stAsset'); ?>
<p style="text-align: left">
<?php if ($product->getOptImage()): ?>
<?php echo link_to(st_asset_image_tag($product->getOptImage(), 'icon'), 'stProduct/edit?id=' . $product->getId()) ?>
<?php endif; ?>
</p>

View File

@@ -0,0 +1,43 @@
<script type="text/javascript">
jQuery(function($) {
function equalHeight(group) {
tallest = 0;
group.each(function() {
$(this).css("height", "auto");
thisHeight = $(this).height();
if (thisHeight > tallest) {
tallest = thisHeight;
}
});
group.height(tallest);
}
$(window).load(function() {
equalHeight($("#product_list_backend .name"));
});
});
</script>
<div id="product_list_backend">
<?php foreach ($pager->getResults() as $product) : ?>
<div class="item box roundies">
<a class="image" href="<?php echo st_url_for('stProduct/edit?id=' . $product->getId()) ?>"><span style="background-image: url('<?php echo st_product_image_path($product, 'large') ?>')"></span></a>
<div class="name"><?php echo link_to($product->getName(), 'stProduct/edit?id=' . $product->getId(), ['class' => 'truncate-text', 'style' => '--truncate-text-lines: 3']) ?></div>
<div class="actions">
<?= st_link_to(st_backend_get_icon('edit', array('title' => __('Edycja'))), '@stProduct?action=edit&id=' . $product->getId()) ?>
<?= st_link_to(st_backend_get_icon('preview', array('title' => __('Podgląd'))), '@stProduct?action=preview&id=' . $product->getId(), array('target' => '_blank')); ?>
<?= st_link_to(st_backend_get_icon('delete-circle', array('title' => __('Usuń'))), '@stProduct?action=delete&id=' . $product->getId(), array(
'post' => true,
'confirm' => __('Potwierdź usuniecie produktu?'),
)) ?>
</div>
<div class="price"><?php echo st_back_price($product->getPriceBrutto(true), true, true); ?></div>
<div style="clear: both;"></div>
</div>
<?php endforeach; ?>
<div style="clear: both;"></div>
</div>
<?php if (!$pager->getNbResults()) : ?>
<?php echo __('Brak rekordów - zmień kryteria wyszukiwania', null, 'stAdminGeneratorPlugin') ?>
<?php endif; ?>

View File

@@ -0,0 +1,32 @@
<?php
/**
* Szablon dla partial'a _list_price
*
* @package stProduct
* @author Marcin Butlak <marcin.butlak@sote.pl>
* @copyright SOTE
* @license SOTE
* @version $Id: _list_price.php 617 2009-04-09 13:02:31Z michal $
*/
?>
<?php use_helper('stCurrency') ?>
<?php use_javascript('stPrice.js') ?>
<?php if ($sf_user->getAttribute('list.mode', null, 'soteshop/stAdminGenerator/stProduct/config') == 'edit'): ?>
<?php echo st_front_symbol() ?> <?php echo input_tag('product['.$product->getId().'][price_brutto]', $sf_request->hasErrors() && $product->getCurrencyExchange() == 1 ? $sf_request->getParameter('product['.$product->getId().'][price_brutto]') : stPrice::round($product->getPriceBrutto()), array('style' => 'width: 70px', 'class' => 'editable', 'disabled' => $product->getCurrencyExchange() != 1)) ?> <?php echo st_back_symbol() ?>
<script type="text/javascript">
var field = $('product_<?php echo $product->getId() ?>_price_brutto');
field.observe('change', function() {
this.value = stPrice.fixNumberFormat(this.value);
});
field.observe('keypress', function(event) {
if (event.keyCode == Event.KEY_RETURN)
{
this.value = stPrice.fixNumberFormat(this.value);
}
});
</script>
<?php else: ?>
<?php echo st_back_price($product->getPriceBrutto(), true,true); ?>
<?php endif; ?>

View File

@@ -0,0 +1,12 @@
<?php use_helper('stProductPhoto','stImageSize');?>
<?php use_stylesheet('/css/backend/stProduct.css'); ?>
<?php if($product):?>
<?php foreach ($photos as $photo):?>
<?php if ($photo==get_main_image($dir)):?>
<div style="width:200px; height:200px;border:1px solid #D6D6D6; padding: 10px;">
<?php echo link_to(st_product_photo('/uploads/products/'.$dir.'/'.$photo, 200, 200), 'product/galleryEdit?id='.$product->getId() )?><br>
</div>
<?php endif;?>
<?php endforeach;?>
<?php echo link_to(__('Przejdź do galerii'), 'product/galleryEdit?id='.$product->getId())?>
<?php endif;?>

View File

@@ -0,0 +1,59 @@
</div>
<?php use_helper('smMyTabs'); ?>
<div class="row">
<label>Nazwa zakładki 1</label>
<div class="field">
<input type="text" name="product[my_tab1]" id="my_tab1" value="<?php echo $product->getMyTab1();?>" size="40">
<div class="clr"></div>
</div>
</div>
<div class="row">
<label>Produkty zakładki 1</label>
<div class="field">
<?php echo object_product_mytabs1($product, array('control_name' => 'product[product_mytabs1]')); ?>
<div class="clr"></div>
</div>
</div>
<div class="row">
<label>Nazwa zakładki 2</label>
<div class="field">
<input type="text" name="product[my_tab2]" id="my_tab2" value="<?php echo $product->getMyTab2();?>" size="40">
<div class="clr"></div>
</div>
</div>
<div class="row">
<label>Produkty zakładki 2</label>
<div class="field">
<?php echo object_product_mytabs2($product, array('control_name' => 'product[product_mytabs2]')); ?>
<div class="clr"></div>
</div>
</div>
<div class="row">
<label>Nazwa zakładki 3</label>
<div class="field">
<input type="text" name="product[my_tab3]" id="my_tab3" value="<?php echo $product->getMyTab3();?>" size="40">
<div class="clr"></div>
</div>
</div>
<div class="row">
<label>Produkty zakładki 3</label>
<div class="field">
<?php echo object_product_mytabs3($product, array('control_name' => 'product[product_mytabs3]')); ?>
<div class="clr"></div>
</div>
</div>
<div class="row">
<label>Nazwa zakładki 4</label>
<div class="field">
<input type="text" name="product[my_tab4]" id="my_tab4" value="<?php echo $product->getMyTab4();?>" size="40">
<div class="clr"></div>
</div>
</div>
<div class="row">
<label>Produkty zakładki 4</label>
<div class="field">
<?php echo object_product_mytabs4($product, array('control_name' => 'product[product_mytabs4]')); ?>
<div class="clr"></div>
</div>
</div>
<div>

View File

@@ -0,0 +1,6 @@
<?php echo input_date_tag('config[new_product_date]', $config->get('new_product_date', null, false), array (
'rich' => true,
'withtime' => true,
'calendar_button_img' => '/sf/sf_admin/images/date.png',
'readonly' => 'readonly',
)); ?>

View File

@@ -0,0 +1,25 @@
<?php
/**
* Szablon dla partial'a _price
*
* @package stProduct
* @author Marcin Butlak <marcin.butlak@sote.pl>
* @copyright SOTE
* @license SOTE
* @version $Id: _old_price.php 2545 2009-08-11 13:58:21Z pawel $
*/
?>
<table class="st_record_list" cellspacing="0">
<thead>
<tr>
<th><?php echo __('Netto') ?></th>
<th><?php echo __('Brutto') ?></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo input_tag ('product[old_price_netto]', $product->getCurrency()->getIsSystemCurrency() ? st_price_format($product->getOldPriceNetto()) : null, array('size' => 8, 'disabled' => !$product->getCurrency()->getIsSystemCurrency())) ?></td>
<td><?php echo input_tag ('product[old_price_brutto]', st_price_format($product->getCurrency()->getIsSystemCurrency() ? $product->getOldPriceBrutto() : $product->getCurrencyOldPrice()), array('size' => 8)) ?></td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,29 @@
<?php echo checkbox_tag('product[points_only]', true, $product->getPointsOnly()); ?>
<script type="text/javascript">
var points_only = $('product_points_only');
setInputs();
points_only.observe('click', function() {
setInputs();
});
function setInputs(){
$('product_price_netto')[points_only.checked ? 'disable' : 'enable']();
$('product_price_brutto')[points_only.checked ? 'disable' : 'enable']();
$('product_old_price_netto')[points_only.checked ? 'disable' : 'enable']();
$('product_old_price_brutto')[points_only.checked ? 'disable' : 'enable']();
$('product_vat')[points_only.checked ? 'disable' : 'enable']();
$('product_edit_currency')[points_only.checked ? 'disable' : 'enable']();
$('product_wholesale_a_netto')[points_only.checked ? 'disable' : 'enable']();
$('product_wholesale_b_netto')[points_only.checked ? 'disable' : 'enable']();
$('product_wholesale_c_netto')[points_only.checked ? 'disable' : 'enable']();
$('product_wholesale_a_brutto')[points_only.checked ? 'disable' : 'enable']();
$('product_wholesale_b_brutto')[points_only.checked ? 'disable' : 'enable']();
$('product_wholesale_c_brutto')[points_only.checked ? 'disable' : 'enable']();
}
</script>

View File

@@ -0,0 +1,26 @@
<?php
/**
* Szablon dla partial'a _price
*
* @package stProduct
* @author Marcin Butlak <marcin.butlak@sote.pl>
* @copyright SOTE
* @license SOTE
* @version $Id: _price.php 2545 2009-08-11 13:58:21Z pawel $
*/
?>
<table class="st_record_list" cellspacing="0">
<thead>
<tr>
<th><b><?php echo __('Netto') ?></b></th>
<th><b><?php echo __('Brutto') ?></b></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo input_tag ('product[price_netto]', $product->getCurrency()->getIsSystemCurrency() ? st_price_format($product->getPriceNetto()) : null, array('size' => 7, 'disabled' => !$product->getCurrency()->getIsSystemCurrency())) ?></td>
<td><?php echo input_tag ('product[price_brutto]', st_price_format($product->getCurrency()->getIsSystemCurrency() ? $product->getPriceBrutto() : $product->getCurrencyPrice()), array('size' => 7)) ?></td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,7 @@
<?php if (array_key_exists($config->get('product_view'),$template_files)): ?>
<?php $select_option=$config->get('product_view');?>
<?php else:?>
<?php $select_option='default';?>
<?php endif;?>
<?php echo select_tag('config[product_view]', options_for_select($template_files,$select_option));?>

View File

@@ -0,0 +1 @@
<?php st_include_component('stAvailabilityProductBackend', 'productAvailability');

View File

@@ -0,0 +1 @@
<?php echo ProductPeer::retrieveByPK($forward_parameters['product_id']); ?>

View File

@@ -0,0 +1,15 @@
<?php $product = $product_has_positioning->getProduct();?>
<?php echo input_tag('product_has_positioning[product_url]', $product->getFriendlyUrl(), array('size' => '40')) ?>
<?php list($culture) = explode('_', $product->getCulture()); ?>
<p>
<?php echo st_link_to(null, 'stProduct/frontendShow?url=' . $product->getFriendlyUrl(), array(
'absolute' => true,
'for_app' => 'frontend',
'for_lang' => $culture,
'no_script_name' => true,
'class' => 'st_admin_external_link',
'target' => '_blank')) ?>
</p>

View File

@@ -0,0 +1 @@
<?php st_include_component('stDelivery','product');?>

View File

@@ -0,0 +1,156 @@
<?php
// auto-generated by sfPropelAdmin
// date: 2021/06/18 15:13:36
?>
<div style="margin-bottom: 10px; padding: 5px 10px; background-color: #f9f9f9;">
<?php st_include_component("stReview", "linkToAddReview", array('product_id' => $forward_parameters['product_id'])); ?>
</div>
<table cellspacing="0" cellpadding="0" class="st_record_list record_list">
<thead>
<tr>
<?php if ($review_action_select_options): ?>
<th width="1%">
<?php echo st_admin_checkbox_tag('review[select_control_head]', true, false, array('class' => 'selector_control')) ?>
</th>
<?php endif; ?>
<th width="1%">&nbsp;</th>
<?php st_include_partial('review_list_th_tabular', array('forward_parameters' => $forward_parameters, 'pager' => $pager)) ?>
<th width="1%">&nbsp;</th>
</tr>
</thead>
<tbody>
<?php $i = 1; $k=1; foreach ($pager->getResults() as $review): $odd = fmod(++$i, 2); ?>
<tr class="<?php if ($odd): ?>highlight<?php endif ?>">
<?php if ($review_action_select_options): ?>
<td>
<?php echo st_admin_checkbox_tag('review[selected][' . $review->getId() . ']', $review->getId(), false, array('class' => 'selector')) ?>
</td>
<?php endif; ?>
<td>
<ul class="st_object_actions">
<li>
<a href="<?php echo url_for('stProduct/reviewEdit?id='.intval($review->getId()).'&product_id='.$forward_parameters['product_id']) ?>" data-admin-confirm="" data-admin-action="edit">
<?php echo st_admin_get_icon('edit', array('title' => __('edit', null, 'stProduct'))) ?>
</a>
</li>
</ul>
</td>
<?php st_include_partial('review_list_td_tabular', array('review' => $review, 'forward_parameters' => $forward_parameters)) ?>
<?php st_include_partial('review_list_td_actions', array('review' => $review, 'forward_parameters' => $forward_parameters)) ?>
</tr>
<?php endforeach; ?>
<?php if (!$pager->getNbResults()): ?>
<tr><td colspan="9">
<?php echo __('Brak rekordów - zmień kryteria wyszukiwania', null, 'stAdminGeneratorPlugin') ?>
</td></tr>
<?php endif; ?>
</tbody>
</table>
<script type="text/javascript">
jQuery(function($) {
var highlighted = false;
var selectors = null;
function submitChanges() {
$('#record_list_form')
.attr('action', "<?php echo st_url_for('stProduct/reviewUpdateList') ?>")
.submit();
}
function submitSelectFormChanges(select, ajax) {
var form = select.closest('form');
if (ajax) {
$(document).trigger('preloader', 'show');
$.post(select.val(), form.serialize(), function(response) {
$(document).trigger('preloader', ['update', response]);
});
} else {
form.attr('action', select.val());
form.submit();
}
}
$('#update-list-form').click(function() {
submitChanges();
return false;
});
$('#filter_list_form .is_empty_field input[type=checkbox]').change(function() {
var input = $(this);
var inputs = input.closest('.field').find('input, select').not('[type=checkbox]');
inputs.prop('disabled', input.prop('checked'));
}).change();
$('.record_list').each(function() {
var recordList = $(this);
<?php if ($sf_user->getParameter('mode', null, 'soteshop/stAdminGenerator/stProduct/reviewList/config') == 'edit'): ?>
recordList.find('input.editable').keypress(function(e) {
if (e.which == 13) {
submitChanges();
return false;
}
});
<?php endif ?>
selectors = recordList.find('input.selector').change(function() {
var input = $(this);
if (input.prop('checked')) {
if (highlighted) {
highlighted = false;
$('body td.highlight').removeClass('highlight');
}
input.closest('tr').addClass('selected');
} else {
input.closest('tr').removeClass('selected');
}
});
recordList.find('input.selector_control').change(function() {
selectors.prop('checked', $(this).prop('checked')).change();
});
});
$('.list_select_control select').change(function() {
var select = $(this);
if (select.val()) {
if (selectors.is(':checked')) {
var option = select.find(':selected');
var category = option.data('category');
var ajax = option.data('ajax');
var confirm_msg = '<?php echo __("Jesteś pewien, że chcesz wykonać operację", null, "stAdminGeneratorPlugin")." \"%action%\" ".__("na wybranych rekordach?", null, "stAdminGeneratorPlugin") ?>';
var confirm = option.data('confirm');
if (confirm !== 0) {
var message = category ? category+': '+option.text() : option.text();
var confirmed = window.confirm(confirm_msg.replace('%action%', confirm ? confirm : message));
if (confirmed)
{
submitSelectFormChanges(select, ajax);
}
}
else {
submitSelectFormChanges(select, ajax);
}
select.val("");
} else {
highlighted = true;
selectors.closest('td').addClass('highlight');
select.val("");
window.alert('<?php echo __("Musisz wybrać przynajmniej jeden rekord", null, "stAdminGeneratorPlugin") ?>');
}
}
});
});
</script>

View File

@@ -0,0 +1,15 @@
<?php if ($sf_request->hasError('config{show_product_recomandation}')):?>
<?php echo form_error('config{show_product_recomandation}', array('class' => 'form-error-msg'));?>
<?php endif;?>
<?php echo checkbox_tag('config[show_product_recomandation]', 1, $config->get('show_product_recomandation', true, false));?>
<?php if (stRegisterSync::getPackageVersion('stRecommendPlugin') === null):?>
<script type="text/javascript">
jQuery(function($) {
$(document).ready(function() {
$("#config_show_product_recomandation").parent().parent().css("display", "none");
});
});
</script>
<?php endif;?>

View File

@@ -0,0 +1,6 @@
<?php echo input_file_tag("review[user_picture]", ""); ?><br/>
<?php if ($review->getUserPicture()!=""): ?>
<img src="/uploads<?php echo $review->getUserPicture(); ?>" alt="" style="width: 60px; height: 60px; margin-top: 10px; margin-bottom: 10px; border-radius: 50%;" ><br/>
<?php echo link_to(__('Usuń zdjęcie'),'stProduct/deleteImage?id='.$review->getId())?>
<br class="st_clear_all">
<?php endif; ?>

View File

@@ -0,0 +1,30 @@
<?php
// auto-generated by sfPropelAdmin
// date: 2015/10/23 10:25:34
?>
<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date', 'VisualEffect', 'stAdminGenerator') ?>
<?php st_include_partial('stProduct/header', array('related_object' => $related_object, 'title' => __('Wystaw produkty na aukcji',
array(), 'stProduct'), 'culture' => null, 'route' => 'stProduct/allegroCustom')) ?>
<?php
?>
<?php st_include_component('stProduct', 'editMenu', array('forward_parameters' => $forward_parameters, 'related_object' => $related_object)) ?>
<div id="sf_admin_header">
<?php echo stSocketView::openComponents('stProduct.allegroCustom.Header'); ?>
</div>
<div id="sf_admin_content" style="padding: 10px 0;">
<?php st_include_partial('stProduct/custom_messages', array('forward_parameters' => $forward_parameters)) ?>
<?php echo stSocketView::openComponents('stProduct.allegroCustom.Content'); ?>
</div>
<div id="sf_admin_footer">
<?php echo stSocketView::openComponents('stProduct.allegroCustom.Footer'); ?>
</div>
<?php st_include_partial('stProduct/footer', array('related_object' => null, 'forward_parameters' => $forward_parameters)) ?>

View File

@@ -0,0 +1,32 @@
<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'VisualEffect', 'stAdminGenerator', 'stDate') ?>
<?php
use_stylesheet('backend/stProductEdit.css');
?>
<?php
sfLoader::loadHelpers('stProduct', 'stProduct');
sfLoader::loadHelpers('stDeliveryBackend', 'stDeliveryBackend');
?>
<?php st_include_partial('stProduct/header', array('related_object' => $product, 'title' => __('Duplikowanie produktu'), 'route' => 'stProduct/edit?id=' . $product->getId(), 'forward_parameters' => $forward_parameters)) ?>
<?php st_include_partial('stProduct/edit_menu', array('related_object' => $product, 'forward_parameters' => $forward_parameters)) ?>
<?php echo form_tag(stAdminGeneratorHelper::applyParametersToUrl('stProduct/duplicate?product_id=' . $product->getId(), $forward_parameters), array(
'id' => 'admin_edit_form',
'name' => 'admin_edit_form',
'class' => 'admin_form',
'multipart' => true,
)) ?>
<?php st_admin_section_start() ?>
<?php echo object_input_hidden_tag($product, 'getId') ?>
<?php echo st_admin_get_form_field('product[code]', __("Kod nowego produktu"), $new_code) ?>
<?php echo st_admin_get_form_field('product[name]', __("Nazwa nowego produktu"), $product->getOptName(), null, array('size' => 78)) ?>
<?php st_admin_section_end() ?>
<div id="edit_actions">
<?php echo st_get_admin_actions(array(
array('label' => __("Duplikuj"), 'type' => 'save', 'params' => array('icon' => 'duplicate', 'name' => 'save'))
)) ?>
</div>
</form>

View File

@@ -0,0 +1,7 @@
<?php use_helper('stProgressBar'); ?>
<?php if ($checked): ?>
<?php echo progress_bar('stFixCode', 'stFixCode', 'fixCode', stFixCode::countProducts()); ?>
<?php else :?>
<?php echo __("Operacja ta zmieni wszystkie niedozwolone kody na poprawne.")?>
<?php echo link_to(__("Wykonaj."),'stProduct/fixCode?checked=true')?>
<?php endif; ?>

View File

@@ -0,0 +1,14 @@
<?php use_helper('I18N', 'Text', 'stAdminGenerator', 'Object', 'Validation', 'ObjectAdmin', 'stDate', 'stProgressBar') ?>
<?php echo st_get_admin_head('stProduct', __('Lista produktów',
array()), __('Zarządzanie produktami w sklepie.',
array()), array (
0 => 'stCategory',
1 => 'stProducer',
2 => 'stProductGroup',
3 => 'stReview',
)) ?>
<div style="text-align: center; margin: 0px auto; width: 200px;">
<?php echo progress_bar('stFixProducts', 'stFixProducts', 'fixProducts', stFixProducts::countProducts()); ?>
</div>
<?php echo st_get_admin_foot() ?>

View File

@@ -0,0 +1,35 @@
<?php use_helper('stProduct', 'stAdminGenerator') ?>
<div class="close"></div>
<h2><?php echo __('Edycja opisu zdjęcia') ?></h2>
<div class="content">
<form class="admin_form" action="<?php echo st_url_for('stProduct/imageGalleryEdit?culture='.$asset->getCulture()) ?>?image_id=<?php echo $asset->getId() ?>">
<div style="text-align: center">
<?php echo st_product_image_tag($asset, 'icon') ?>
</div>
<?php echo textarea_tag('plupload_edit[description]', $asset->getDescription(), array('style' => 'width: 100%; height: 150px')) ?>
<?php echo st_get_admin_actions(array(
array('type' => 'save', 'label' => __('Zapisz', null, 'stBackend')),
)); ?>
</form>
</div>
<script type="text/javascript">
jQuery(function($) {
$('#plupload_edit_overlay form').submit(function() {
var overlay = $('#plupload_edit_overlay');
overlay.addClass('preloader_160x24');
$.post(this.action, $(this).serializeArray(), function() {
overlay.removeClass('preloader_160x24');
overlay.data('overlay').close();
});
return false;
});
});
</script>

View File

@@ -0,0 +1,2 @@
<?php
include sfConfig::get('sf_module_cache_dir').'/auto'.ucfirst($sf_context->getModuleName()).'/templates/listSuccess.php';

View File

@@ -0,0 +1,48 @@
<?php use_helper('I18N', 'stAdminGenerator', 'stBackend');?>
<?php st_include_partial('stProduct/header', array('related_object' => $product, 'title' => __('Dodatkowe opcje'), 'route' => null, 'forward_parameters' => $forward_parameters));?>
<?php st_include_partial('stProduct/edit_menu', array('related_object' => $product, 'forward_parameters' => $forward_parameters));?>
<div id="sf_admin_content">
<?php if (stSoteshopVersion::getVersion() == stSoteshopVersion::ST_SOTESHOP_VERSION_POLISH):?>
<div class="application_shortcuts">
<ul>
<li>
<div class="icon" style="float: left;">
<a style="background-image: url(<?php echo get_app_icon('/images/backend/main/icons/stAllegroPlugin.png');?>); background-size: 35px 35px;" href="<?php echo url_for('@stAllegroPlugin?action=list&product_id='.$product->getId());?>"></a>
</div>
<div class="name">
<?php echo link_to(__('Allegro'), '@stAllegroPlugin?action=list&product_id='.$product->getId());?>
</div>
</li>
<li>
<div class="icon" style="float: left;">
<a style="background-image: url(<?php echo get_app_icon('/images/backend/main/icons/stLukasPlugin.png');?>); background-size: 35px 35px;" href="<?php echo url_for('stProduct/lukasEdit?product_id='.$product->getId());?>"></a>
</div>
<div class="name">
<?php echo link_to(__('Credit Agricole Raty'), 'stProduct/lukasEdit?product_id='.$product->getId());?>
</div>
</li>
<li>
<div class="icon" style="float: left;">
<a style="background-image: url(<?php echo get_app_icon('/images/backend/main/icons/stGoogleShoppingPlugin.png');?>); background-size: 35px 35px;" href="<?php echo url_for('@stGoogleShoppingPlugin?action=edit&product_id='.$product->getId().'&view=product');?>"></a>
</div>
<div class="name">
<?php echo link_to(__('Google Shopping'), '@stGoogleShoppingPlugin?action=edit&product_id='.$product->getId().'&view=product');?>
</div>
</li>
<li>
<div class="icon" style="float: left;">
<a style="background-image: url(<?php echo get_app_icon('/images/backend/main/icons/stCompatibilityPlugin.png');?>); background-size: 35px 35px;" href="<?php echo url_for('@stCompatibilityPlugin?action=productConfig&product_id='.$product->getId());?>"></a>
</div>
<div class="name">
<?php echo link_to(__('Moduł zgodności', null, 'stCompatibilityBackend'), '@stCompatibilityPlugin?action=productConfig&product_id='.$product->getId());?>
</div>
</li>
</ul>
<div class="clr"></div>
</div>
<?php else:?>
<?php echo __('Brak dodatkowych opcji.');?>
<?php endif;?>
</div>
<?php st_include_partial('stProduct/footer');?>

View File

@@ -0,0 +1,25 @@
<?php
// auto-generated by sfPropelAdmin
// date: 2012/05/24 13:41:13
?>
<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'VisualEffect', 'stAdminGenerator', 'stDate') ?>
<?php
?>
<?php st_include_partial('stProduct/header', array('related_object' => $related_object, 'title' => $online_files->isNew() ? __('Dodaj nowy',
array(), 'stAdminGeneratorPlugin') : __('',
array(), 'stAdminGeneratorPlugin'), 'route' => 'stProduct/onlineAudioEdit?id='.$online_files->getId().'&product_id='.$forward_parameters['product_id'])) ?>
<?php st_include_partial('stProduct/edit_menu', array('forward_parameters' => $forward_parameters, 'related_object' => $related_object));?>
<div id="sf_admin_content">
<?php st_include_component('stProduct/online_audio_edit_messages', array('online_files' => $online_files, 'labels' => $labels, 'forward_parameters' => $forward_parameters)) ?>
<?php st_include_partial('stProduct/online_audio_edit_form', array('online_files' => $online_files, 'labels' => $labels, 'forward_parameters' => $forward_parameters)) ?>
<?php echo st_get_component('appOnlineCodesBackend','showFileList',array('related_object'=>$related_object, 'media_type'=>'ST_AUDIO')); ?></br>
</div>
<?php st_include_partial('stProduct/footer', array('related_object' => $related_object, 'forward_parameters' => $forward_parameters)) ?>

View File

@@ -0,0 +1,59 @@
<?php use_helper('I18N', 'Text', 'stAdminGenerator', 'Object', 'Validation', 'ObjectAdmin', 'stDate') ?>
<?php $related_object = ProductPeer::retrieveByPk($sf_params->get('product_id')) ?>
<?php st_include_partial('stProduct/header', array('related_object' => $related_object, 'title' => __('Pliki i kody online', array(), 'appOnlineCodesBackend'), 'route' => 'stProduct/onlineCodesList')) ?>
<?php st_include_partial('stProduct/edit_menu', array('forward_parameters' => $forward_parameters, 'related_object' => $related_object));?>
<div id="sf_admin_content">
<div class="application_shortcuts" style="height: 50px; border: 1px solid #ccc; padding: 10px;">
<ul>
<li>
<div class="icon" style="float: left;">
<a style="background-image: url(<?php echo get_app_icon('/images/backend/beta/icons/48x48/appOnlineCodesPlugin_audio.png');?>); background-size: 35px 35px;" href="<?php echo url_for('stProduct/onlineAudioCreate?product_id='.$related_object->getId());?>"></a>
</div>
<div class="name">
<?php echo link_to(__('Audio', array(), 'appOnlineCodesBackend'), 'stProduct/onlineAudioCreate?product_id='.$related_object->getId());?>
</div>
</li>
<li>
<div class="icon" style="float: left;">
<a style="background-image: url(<?php echo get_app_icon('/images/backend/beta/icons/48x48/appOnlineCodesPlugin_images.png');?>); background-size: 35px 35px;" href="<?php echo url_for('stProduct/onlineImagesCreate?product_id='.$related_object->getId());?>"></a>
</div>
<div class="name">
<?php echo link_to(__('Zdjęcia', array(), 'appOnlineCodesBackend'), 'stProduct/onlineImagesCreate?product_id='.$related_object->getId());?>
</div>
</li>
<li>
<div class="icon" style="float: left;">
<a style="background-image: url(<?php echo get_app_icon('/images/backend/beta/icons/48x48/appOnlineCodesPlugin_docs.png');?>); background-size: 35px 35px;" href="<?php echo url_for('stProduct/onlineDocsCreate?product_id='.$related_object->getId());?>"></a>
</div>
<div class="name">
<?php echo link_to(__('Dokumenty', array(), 'appOnlineCodesBackend'), 'stProduct/onlineDocsCreate?product_id='.$related_object->getId());?>
</div>
</li>
<li>
<div class="icon" style="float: left;">
<a style="background-image: url(<?php echo get_app_icon('/images/backend/beta/icons/48x48/appOnlineCodesPlugin_codes.png');?>); background-size: 35px 35px;" href="<?php echo url_for('stProduct/onlineCodesCreate?product_id='.$related_object->getId());?>"></a>
</div>
<div class="name">
<?php echo link_to(__('Kody', array(), 'appOnlineCodesBackend'), 'stProduct/onlineCodesCreate?product_id='.$related_object->getId());?>
</div>
</li>
</ul>
</div>
<div style="clear: both;">
<br />
<div>
<?php echo st_get_component('appOnlineCodesBackend','showFileList',array('related_object'=>$related_object )); ?></br>
<?php echo st_get_component('appOnlineCodesBackend','showCodeList',array('related_object'=>$related_object )); ?>
</div>
<div class="clr"></div>
</div>
<?php st_include_partial('stProduct/footer', array('related_object' => $related_object)) ?>
<script type="text/javascript">
jQuery(function($) {
$('#list_actions').stickyBox();
});
</script>

View File

@@ -0,0 +1,24 @@
<?php
// auto-generated by sfPropelAdmin
// date: 2012/05/24 13:41:13
?>
<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'VisualEffect', 'stAdminGenerator', 'stDate') ?>
<?php
?>
<?php st_include_partial('stProduct/header', array('related_object' => $related_object, 'title' => $online_codes->isNew() ? __('Dodaj nowy',
array(), 'stAdminGeneratorPlugin') : __('',
array(), 'stAdminGeneratorPlugin'), 'route' => 'stProduct/onlineCodesEdit?id='.$online_codes->getId().'&product_id='.$forward_parameters['product_id'])) ?>
<?php st_include_partial('stProduct/edit_menu', array('forward_parameters' => $forward_parameters, 'related_object' => $related_object));?>
<div id="sf_admin_content">
<?php st_include_component('stProduct/online_codes_edit_messages', array('online_codes' => $online_codes, 'labels' => $labels, 'forward_parameters' => $forward_parameters)) ?>
<?php st_include_partial('stProduct/online_codes_edit_form', array('online_codes' => $online_codes, 'labels' => $labels, 'forward_parameters' => $forward_parameters)) ?>
<?php echo st_get_component('appOnlineCodesBackend','showCodeList',array('related_object'=>$related_object )); ?>
</div>
<?php st_include_partial('stProduct/footer', array('related_object' => $related_object, 'forward_parameters' => $forward_parameters)) ?>

View File

@@ -0,0 +1,25 @@
<?php
// auto-generated by sfPropelAdmin
// date: 2012/05/24 13:41:13
?>
<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'VisualEffect', 'stAdminGenerator', 'stDate') ?>
<?php
?>
<?php st_include_partial('stProduct/header', array('related_object' => $related_object, 'title' => $online_files->isNew() ? __('Dodaj nowy',
array(), 'stAdminGeneratorPlugin') : __('',
array(), 'stAdminGeneratorPlugin'), 'route' => 'stProduct/onlineDocsEdit?id='.$online_files->getId().'&product_id='.$forward_parameters['product_id'])) ?>
<?php st_include_partial('stProduct/edit_menu', array('forward_parameters' => $forward_parameters, 'related_object' => $related_object));?>
<div id="sf_admin_content">
<?php st_include_component('stProduct/online_docs_edit_messages', array('labels' => $labels, 'forward_parameters' => $forward_parameters)) ?>
<?php st_include_partial('stProduct/online_docs_edit_form', array('online_files' => $online_files, 'labels' => $labels, 'forward_parameters' => $forward_parameters, 'related_object'=>$related_object)) ?>
<?php echo st_get_component('appOnlineCodesBackend','showFileList',array('related_object'=>$related_object, 'media_type'=>'ST_DOCS')); ?></br>
</div>
<?php st_include_partial('stProduct/footer', array('related_object' => $related_object, 'forward_parameters' => $forward_parameters)) ?>

View File

@@ -0,0 +1,25 @@
<?php
// auto-generated by sfPropelAdmin
// date: 2012/05/24 13:41:13
?>
<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'VisualEffect', 'stAdminGenerator', 'stDate') ?>
<?php
?>
<?php st_include_partial('stProduct/header', array('related_object' => $related_object, 'title' => $online_files->isNew() ? __('Dodaj nowy',
array(), 'stAdminGeneratorPlugin') : __('',
array(), 'stAdminGeneratorPlugin'), 'route' => 'stProduct/onlineImagesEdit?id='.$online_files->getId().'&product_id='.$forward_parameters['product_id'])) ?>
<?php st_include_partial('stProduct/edit_menu', array('forward_parameters' => $forward_parameters, 'related_object' => $related_object));?>
<div id="sf_admin_content">
<?php st_include_component('stProduct/online_images_edit_messages', array('online_files' => $online_files, 'labels' => $labels, 'forward_parameters' => $forward_parameters)) ?>
<?php st_include_partial('stProduct/online_images_edit_form', array('online_files' => $online_files, 'labels' => $labels, 'forward_parameters' => $forward_parameters)) ?>
<?php echo st_get_component('appOnlineCodesBackend','showFileList',array('related_object'=>$related_object, 'media_type'=>'ST_IMAGES' )); ?></br>
</div>
<?php st_include_partial('stProduct/footer', array('related_object' => $related_object, 'forward_parameters' => $forward_parameters)) ?>

View File

@@ -0,0 +1,55 @@
<?php include sfConfig::get('sf_module_cache_dir') . '/autoStProduct/templates/presentationConfigSuccess.php' ?>
<?php if ($config->get('global_price_netto')){ ?>
<script type="text/javascript">
jQuery(function($) {
document.getElementById("config_price_view").disabled = true;
document.getElementById("config_price_view").value = "only_net";
var config_price_view = document.createElement("input");
config_price_view.setAttribute("type", "hidden");
config_price_view.setAttribute("name", "config[price_view]");
config_price_view.setAttribute("value", "only_net");
document.getElementById("config_actions").appendChild(config_price_view);
document.getElementById("config_price_view_long").disabled = true;
document.getElementById("config_price_view_long").value = "only_net";
var config_price_view_long = document.createElement("input");
config_price_view_long.setAttribute("type", "hidden");
config_price_view_long.setAttribute("name", "config[price_view_long]");
config_price_view_long.setAttribute("value", "only_net");
document.getElementById("config_actions").appendChild(config_price_view_long);
document.getElementById("config_price_view_group").disabled = true;
document.getElementById("config_price_view_group").value = "only_net";
var config_price_view_group = document.createElement("input");
config_price_view_group.setAttribute("type", "hidden");
config_price_view_group.setAttribute("name", "config[price_view_group]");
config_price_view_group.setAttribute("value", "only_net");
document.getElementById("config_actions").appendChild(config_price_view_group);
<?php if (stTheme::getInstance(sfContext::getInstance())->getVersion() < 7){ ?>
document.getElementById("config_price_view_short").disabled = true;
document.getElementById("config_price_view_short").value = "only_net";
var config_price_view_short = document.createElement("input");
config_price_view_short.setAttribute("type", "hidden");
config_price_view_short.setAttribute("name", "config[price_view_short]");
config_price_view_short.setAttribute("value", "only_net");
document.getElementById("config_actions").appendChild(config_price_view_short);
document.getElementById("config_price_view_other").disabled = true;
document.getElementById("config_price_view_other").value = "only_net";
var config_price_view_other = document.createElement("input");
config_price_view_other.setAttribute("type", "hidden");
config_price_view_other.setAttribute("name", "config[price_view_other]");
config_price_view_other.setAttribute("value", "only_net");
document.getElementById("config_actions").appendChild(config_price_view_other);
<?php } ?>
});
</script>
<?php } ?>