first commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
<strong><?php echo st_order_price_format(stPayment::getUnpayedAmountByOrder($order), $order->getOrderCurrency()); ?></strong>
|
||||
26
apps/backend/modules/stOrder/templates/_assigned_id.php
Normal file
26
apps/backend/modules/stOrder/templates/_assigned_id.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
use_helper('sfGuardUser');
|
||||
|
||||
echo sf_guard_user_admin_select_tag('order[assigned_id]', $order->getAssignedId(), array('include_custom' => __('Brak')));
|
||||
?>
|
||||
<p class="mt-1<?php echo $order->getAssignedId() == $sf_user->getGuardUser()->getId() ? ' d-none' : '' ?>" id="order_assin_me">
|
||||
<?php echo st_get_admin_button('default', __("Przypisz mnie"), '#', array('data-id' => $sf_user->getGuardUser()->getId(), 'size' => 'small')); ?>
|
||||
</p>
|
||||
|
||||
<script>
|
||||
jQuery(function($) {
|
||||
var assignMe = $('#order_assin_me');
|
||||
var select = $('#order_assigned_id').change(function() {
|
||||
if (select.val() != assignMe.find('a').data('id')) {
|
||||
assignMe.show();
|
||||
} else {
|
||||
assignMe.hide();
|
||||
}
|
||||
});
|
||||
|
||||
assignMe.on('click', 'a', function() {
|
||||
var link = $(this);
|
||||
select.val(link.data('id')).change().trigger("chosen:updated");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php if ($order_status->isCouponCodeEnabled()): ?>
|
||||
<?php echo st_admin_checkbox_tag('order_status[attach_coupon_code]', true, $order_status->getAttachCouponCode(), array('disabled' => !$order_status->getHasMailNotification() || $order_status->getType() != OrderStatusPeer::ST_COMPLETE))?>
|
||||
<script type="text/javascript">
|
||||
var attach_coupon_code = $('order_status_attach_coupon_code');
|
||||
|
||||
var has_email_notification = $('order_status_has_mail_notification');
|
||||
|
||||
var order_status_type = $('order_status_order_status_type');
|
||||
|
||||
attach_coupon_code.observe('click', function() {
|
||||
|
||||
$$('.coupon_code_field').each(function(i) {
|
||||
if (i.id != attach_coupon_code.id)
|
||||
{
|
||||
i.disabled = !attach_coupon_code.checked;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
has_email_notification.observe('click', function() {
|
||||
|
||||
attach_coupon_code.disabled = !has_email_notification.checked;
|
||||
|
||||
$$('.coupon_code_field').each(function(i) {
|
||||
i.disabled = !has_email_notification.checked || !attach_coupon_code.checked;
|
||||
});
|
||||
});
|
||||
|
||||
order_status_type.observe('change', function() {
|
||||
|
||||
var value = this.options[this.selectedIndex].value;
|
||||
|
||||
attach_coupon_code.disabled = !has_email_notification.checked || value != '<?php echo OrderStatusPeer::ST_COMPLETE ?>';
|
||||
|
||||
$$('.coupon_code_field').each(function(i) {
|
||||
i.disabled = !has_email_notification.checked || !attach_coupon_code.checked || value != '<?php echo OrderStatusPeer::ST_COMPLETE ?>';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php else: ?>
|
||||
<?php echo __('Kody rabatowe są wyłączone') ?> <?php echo st_external_link_to(__('Włącz kody rabatowe'), 'stDiscountBackend/config') ?>
|
||||
<?php endif; ?>
|
||||
3
apps/backend/modules/stOrder/templates/_auction_id.php
Normal file
3
apps/backend/modules/stOrder/templates/_auction_id.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php foreach (AllegroAuctionPeer::getAuctionsByOrder($order) as $auction):?>
|
||||
<?php echo st_external_link_to($auction->getAuctionId(), $auction->getAuctionLink(), array('target'=>'_new'));?><br />
|
||||
<?php endforeach;?>
|
||||
1
apps/backend/modules/stOrder/templates/_color.php
Normal file
1
apps/backend/modules/stOrder/templates/_color.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php echo st_colorpicker_input_tag('order_status[color]', $order_status->getColor() ? $order_status->getColor() : 'ffffff') ?>
|
||||
@@ -0,0 +1 @@
|
||||
<?php echo input_tag('coupon_code[discount]', $order_status->getCouponCodeDiscount(), array('size' => 3, 'disabled' => !$order_status->getAttachCouponCode(), 'class' => 'coupon_code_field')) ?> %
|
||||
@@ -0,0 +1 @@
|
||||
<?php echo input_tag('coupon_code[valid_for]', $order_status->getCouponCodeValidFor(), array('size' => 3, 'disabled' => !$order_status->getAttachCouponCode(), 'class' => 'coupon_code_field')) ?> <?php echo __('dni') ?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php if ($order->getDiscountCouponCode()): ?>
|
||||
<?php echo st_external_link_to($order->getDiscountCouponCode()->getCode(), 'stDiscountBackend/couponCodeEdit?id='.$order->getDiscountCouponCode()->getId()) ?> (<?php echo $order->getDiscountCouponCode()->getDiscount() ?>%)
|
||||
<?php else: ?>
|
||||
<?php echo __('Brak') ?>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php echo sf_guard_user_admin_select_tag(
|
||||
'filters[assigned_id]',
|
||||
isset($filters['assigned_id']) ? $filters['assigned_id'] : null,
|
||||
array('include_custom' => [
|
||||
'' => '---',
|
||||
'none' => 'Brak',
|
||||
])
|
||||
) ?>
|
||||
@@ -0,0 +1 @@
|
||||
<?php echo input_tag('filters[filter_client]', isset($filters['filter_client']) ? $filters['filter_client'] : '', 'size=15') ?>
|
||||
15
apps/backend/modules/stOrder/templates/_filter_delivery.php
Normal file
15
apps/backend/modules/stOrder/templates/_filter_delivery.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$options = array("" => "---");
|
||||
|
||||
$c = new Criteria();
|
||||
$c->addAscendingOrderByColumn(DeliveryI18nPeer::NAME);
|
||||
|
||||
foreach (DeliveryPeer::doSelectWithI18n($c) as $delivery)
|
||||
{
|
||||
$options[$delivery->getId()] = $delivery->getName();
|
||||
}
|
||||
|
||||
echo select_tag(
|
||||
'filters[filter_delivery]',
|
||||
options_for_select($options, isset($filters['filter_delivery']) ? $filters['filter_delivery'] : null)
|
||||
);
|
||||
@@ -0,0 +1 @@
|
||||
<?php echo input_tag('filters[discount_coupon_code]', isset($filters['discount_coupon_code']) ? $filters['discount_coupon_code'] : null) ?>
|
||||
@@ -0,0 +1 @@
|
||||
<?php echo input_tag('filters[gift_card_code]', isset($filters['gift_card_code']) ? $filters['gift_card_code'] : null) ?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php echo select_tag('filters[is_confirmed]',
|
||||
options_for_select(array(1 => __('tak', array(), 'stAdminGeneratorPlugin'), 0 => __('nie', array(), 'stAdminGeneratorPlugin')), isset($filters['is_confirmed']) ? $filters['is_confirmed'] : null, array (
|
||||
'include_custom' => __("---", null, 'stAdminGeneratorPlugin'),
|
||||
)), array (
|
||||
)) ?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php echo select_tag('filters[is_payed]',
|
||||
options_for_select(array(1 => __('tak', array(), 'stAdminGeneratorPlugin'), 0 => __('nie', array(), 'stAdminGeneratorPlugin')), isset($filters['is_payed']) ? $filters['is_payed'] : null, array (
|
||||
'include_custom' => __("---", null, 'stAdminGeneratorPlugin'),
|
||||
)), array (
|
||||
)) ?>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
sfLoader::loadHelpers('stProduct', 'stProduct');
|
||||
|
||||
$id = null;
|
||||
$token = null;
|
||||
|
||||
if (isset($filters['order_product']) && $filters['order_product'])
|
||||
{
|
||||
if (is_numeric($filters['order_product']))
|
||||
{
|
||||
$token = array("id" => $filters['order_product']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$tokens = stJQueryToolsHelper::parseTokensFromRequest($filters['order_product']);
|
||||
|
||||
$token = $tokens ? $tokens[0] : null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($token && !isset($token['new']))
|
||||
{
|
||||
$c = new Criteria();
|
||||
$c->add(ProductPeer::ID, $token['id']);
|
||||
|
||||
$defaults = ProductPeer::doSelectTokens($c);
|
||||
}
|
||||
elseif ($token)
|
||||
{
|
||||
$defaults = array($token);
|
||||
}
|
||||
else
|
||||
{
|
||||
$defaults = array();
|
||||
}
|
||||
|
||||
$results_formatter = _token_input_product_results_formatter();
|
||||
|
||||
$token_formatter = _token_input_product_token_formatter();
|
||||
|
||||
echo st_tokenizer_input_tag('filters[order_product]', st_url_for('@stProduct?action=ajaxProductsToken'), $defaults, array('tokenizer' => array(
|
||||
'preventDuplicates' => true,
|
||||
'resultsFormatter' => $results_formatter,
|
||||
'tokenFormatter' => $token_formatter,
|
||||
'hintText' => __('Wpisz kod/nazwę szukanego produktu', null, 'stProduct'),
|
||||
'additionalDataFields' => array('code'),
|
||||
'tokenLimit' => 1,
|
||||
'sortable' => false,
|
||||
'createNew' => true,
|
||||
'addNewText' => __('Szukaj w historii zamówień'),
|
||||
'addNewIcon' => '/images/backend/beta/icons/20x20/search.png',
|
||||
)));
|
||||
?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php echo st_order_status_filter_select_tag(
|
||||
'filters[filter_order_status]',
|
||||
isset($filters['filter_order_status']) ? $filters['filter_order_status'] : null,
|
||||
array('style' => 'max-width: 140px')
|
||||
) ?>
|
||||
14
apps/backend/modules/stOrder/templates/_filter_payment.php
Normal file
14
apps/backend/modules/stOrder/templates/_filter_payment.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
$options = array("" => "---", "gift_card" => __('Bon zakupowy'));
|
||||
|
||||
foreach (PaymentTypePeer::doSelectCached() as $payment)
|
||||
{
|
||||
$options[$payment->getId()] = $payment->getName();
|
||||
}
|
||||
|
||||
asort($options, SORT_NATURAL | SORT_FLAG_CASE);
|
||||
|
||||
echo select_tag(
|
||||
'filters[filter_payment]',
|
||||
options_for_select($options, isset($filters['filter_payment']) ? $filters['filter_payment'] : null)
|
||||
);
|
||||
16
apps/backend/modules/stOrder/templates/_invoice.php
Normal file
16
apps/backend/modules/stOrder/templates/_invoice.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* @var Order $order
|
||||
*/
|
||||
if (!$order->getInvoice())
|
||||
{
|
||||
echo __('Brak');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo st_get_admin_button('preview', __("Pokaż"),"stInvoiceBackend/confirmEdit?id=".$order->getInvoice()->getId()."&type=".$type."&mode=show", array('size' => 'small'));
|
||||
echo st_get_admin_button('download', __("Pobierz"),"stInvoicePdf/show?id=".$order->getInvoice()->getId()."&download=true&culture=".$order->getClientCulture(), array('size' => 'small'));
|
||||
echo st_get_admin_button('refresh', __("Aktualizuj"), 'stInvoiceBackend/update?id='.$order->getId().'&invoice_id='.$order->getInvoice()->getId(), array('size' => 'small'));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<?php echo $order->getInvoice() ? st_get_admin_button('add', __("wystaw"), "stInvoiceBackend/makeConfirmInvoice?id=".$order->getInvoice()->getId()."&type=".$order->getInvoice()->getType(), array('size' => 'small')) : __("Nie"); ?>
|
||||
5
apps/backend/modules/stOrder/templates/_is_default.php
Normal file
5
apps/backend/modules/stOrder/templates/_is_default.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php $is_blocked = ($order_status->getType() != OrderStatusPeer::ST_PENDING || $order_status->getIsDefault()) ?>
|
||||
<?php echo st_admin_checkbox_tag('order_status[is_default]', true, $order_status->getIsDefault(), array('disabled' => $is_blocked)) ?>
|
||||
<?php if ($is_blocked && $order_status->getIsDefault()): ?>
|
||||
<?php echo input_hidden_tag('order_status[is_default]', true) ?>
|
||||
<?php endif; ?>
|
||||
10
apps/backend/modules/stOrder/templates/_is_payed.php
Normal file
10
apps/backend/modules/stOrder/templates/_is_payed.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* @var Order $order
|
||||
*/
|
||||
echo $order->getIsPayed() ? st_admin_get_icon('check-circle') : ' ';
|
||||
|
||||
if ($order->getIsPayed() && !$order->hasValidPayment())
|
||||
{
|
||||
echo st_admin_get_icon('warning', array('title' => __('Status płatności został zmieniony bezpośrednio w bazie danych', null, 'stPayment')));
|
||||
}
|
||||
137
apps/backend/modules/stOrder/templates/_lastOrderWidget.php
Normal file
137
apps/backend/modules/stOrder/templates/_lastOrderWidget.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<?php use_helper('stWidgets');?>
|
||||
<?php echo st_open_widget('Order',__('Zamówienia'));?>
|
||||
|
||||
<div style="float:right;">
|
||||
<?php echo __('Ostatnie', null, 'stBackendMain'); ?>:
|
||||
|
||||
<?php if($date_type == "day"): ?>
|
||||
<b><?php echo link_to_remote(__('24h', null, 'stBackendMain'), array('update'=>'last-order-widget', 'url'=>'stOrder/lastOrderWidget?date_type=day',)) ?></b>
|
||||
<?php else: ?>
|
||||
<?php echo link_to_remote(__('24h', null, 'stBackendMain'), array('update'=>'last-order-widget', 'url'=>'stOrder/lastOrderWidget?date_type=day',)) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($date_type == "week"): ?>
|
||||
<b><?php echo link_to_remote(__('7 dni', null, 'stBackendMain'), array('update'=>'last-order-widget', 'url'=>'stOrder/lastOrderWidget?date_type=week',)) ?></b>
|
||||
<?php else: ?>
|
||||
<?php echo link_to_remote(__('7 dni', null, 'stBackendMain'), array('update'=>'last-order-widget', 'url'=>'stOrder/lastOrderWidget?date_type=week',)) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($date_type == "month"): ?>
|
||||
<b><?php echo link_to_remote(__('miesiąc', null, 'stBackendMain'), array('update'=>'last-order-widget', 'url'=>'stOrder/lastOrderWidget?date_type=month',)) ?></b>
|
||||
<?php else: ?>
|
||||
<?php echo link_to_remote(__('miesiąc', null, 'stBackendMain'), array('update'=>'last-order-widget', 'url'=>'stOrder/lastOrderWidget?date_type=month',)) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($date_type == "lastlog"): ?>
|
||||
<b><?php echo link_to_remote(__('logowanie', null, 'stBackendMain'), array('update'=>'last-order-widget', 'url'=>'stOrder/lastOrderWidget?date_type=lastlog',)) ?></b>
|
||||
<?php else: ?>
|
||||
<?php echo link_to_remote(__('logowanie', null, 'stBackendMain'), array('update'=>'last-order-widget', 'url'=>'stOrder/lastOrderWidget?date_type=lastlog',)) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<b><?php echo st_link_to(__('Wartość'), 'stOrder/'); ?></b> (<?php echo $orderQuantity; ?>)
|
||||
|
||||
<?php if($price == ""): ?>
|
||||
<?php $price = 0; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<b><?php echo st_back_price($price, true, true) ?></b>
|
||||
|
||||
<table class="st_record_list" cellspacing="0" width="100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20px"><?php echo __('nr') ?></th>
|
||||
<th width="60px"><?php echo __('złożone') ?></th>
|
||||
<th width="20px"><?php echo __('pot.') ?></th>
|
||||
<th><?php echo __('klient') ?></th>
|
||||
<th width="80px"><?php echo __('kwota') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php $i = 1; ?>
|
||||
<?php foreach ($orders as $index => $order): ?>
|
||||
|
||||
<?php if($i <= 20): ?>
|
||||
<tr class="<?php
|
||||
$date = explode(" ",$order->getCreatedAt());
|
||||
if($date[0]== date('Y-m-d')){ echo ' st_row-new';}else{
|
||||
echo $index % 2 ? 'st_row-highlight' : 'st_row-no-highlight';
|
||||
};
|
||||
?>">
|
||||
<td><?php echo st_link_to($order->getNumber(), 'stOrder/edit?id='.$order->getId()); ?></td>
|
||||
|
||||
<td>
|
||||
<?php
|
||||
|
||||
|
||||
$createdAt = explode(" ",$order->getCreatedAt());
|
||||
|
||||
$d = $createdAt[0];
|
||||
$t = $createdAt[1];
|
||||
|
||||
$d = explode("-",$d);
|
||||
|
||||
if(date('Y-m-d')==$createdAt[0])
|
||||
{
|
||||
echo $time = $createdAt[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $d[2]."-".$d[1]."-".$d[0];
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td><?php if($order->getIsConfirmed()==1): echo image_tag('/sf/sf_admin/images/tick.png'); else: echo "-"; endif; ?></td>
|
||||
|
||||
<td>
|
||||
<div style="text-align: left">
|
||||
<?php if ($order->getOrderUserDataBillingId()): ?>
|
||||
|
||||
<?php if ($order->getsfGuardUserId()): ?>
|
||||
|
||||
<?php if ($order->getOrderUserDataBilling()->getCompany()): ?>
|
||||
<?php echo st_external_link_to( $order->getOrderUserDataBilling()->getCompany(), 'user/edit?id=' . $order->getsfGuardUserId()) ?>
|
||||
<?php else: ?>
|
||||
<?php if($order->getOrderUserDataBilling()->getName() && $order->getOrderUserDataBilling()->getSurname()): ?>
|
||||
<?php echo st_external_link_to($order->getOrderUserDataBilling()->getName()." ".$order->getOrderUserDataBilling()->getSurname(), 'user/edit?id=' . $order->getsfGuardUserId()) ?>
|
||||
<?php else: ?>
|
||||
<?php echo st_external_link_to(truncate_text($order->getsfGuardUser()->getUsername(), 25), 'user/edit?id=' . $order->getsfGuardUserId()) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo st_back_price($order->getTotalAmount(true), true, true) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endforeach ; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<br/>
|
||||
<?php if ($countOrder!=0): ?>
|
||||
<?php echo __('Zamówienia o statusie "oczekuje"') ?>: <b><?php echo $countOrder; ?></b> <?php echo st_link_to(__('pokaż'), 'order/list?filters[filter_order_status]=2'); ?>
|
||||
<?php else: ?>
|
||||
<br>
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
<?php if ($countInvoice!=0): ?>
|
||||
<?php echo __('Faktury do wystawienia') ?>: <b><?php echo $countInvoice; ?></b> <?php echo st_link_to(__('pokaż'), 'invoice/requestList'); ?>
|
||||
<?php else: ?>
|
||||
<br>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo st_close_widget(); ?>
|
||||
5
apps/backend/modules/stOrder/templates/_list.php
Normal file
5
apps/backend/modules/stOrder/templates/_list.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
include st_admin_get_template_path(__FILE__);
|
||||
|
||||
echo st_get_component('stOrder', 'summary', array('pager' => $pager)) ?>
|
||||
2
apps/backend/modules/stOrder/templates/_list_header.php
Normal file
2
apps/backend/modules/stOrder/templates/_list_header.php
Normal file
@@ -0,0 +1,2 @@
|
||||
<?php echo st_get_component('stSecurityBackend','showUncryptOrderBillingUsers'); ?>
|
||||
<?php echo st_get_component('stSecurityBackend','showUncryptOrderDeliveryUsers'); ?>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
if ($order->getOrderUserDataBillingId())
|
||||
{
|
||||
if ($order->getOptClientName())
|
||||
{
|
||||
echo "<p>".$order->getOptClientName()."</p>";
|
||||
}
|
||||
elseif($order->getsfGuardUser())
|
||||
{
|
||||
echo "<p>".$order->getsfGuardUser()->getUsername()."</p>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($order->getsfGuardUserId())
|
||||
{
|
||||
if ($order->getOptClientEmail())
|
||||
{
|
||||
echo st_external_link_to($order->getOptClientEmail(), 'user/edit?id=' . $order->getsfGuardUserId());
|
||||
}
|
||||
elseif($order->getsfGuardUser())
|
||||
{
|
||||
echo st_external_link_to($order->getsfGuardUser()->getUsername(), 'user/edit?id=' . $order->getsfGuardUserId());
|
||||
}
|
||||
}
|
||||
?>
|
||||
1
apps/backend/modules/stOrder/templates/_min_amount.php
Normal file
1
apps/backend/modules/stOrder/templates/_min_amount.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php echo input_tag('config[min_amount]', $config->get('min_amount', 0), array('size' => 6)); ?> <?php echo stConfig::getInstance($sf_context, 'stCurrencyPlugin')->get('default_currency') ?>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php foreach (AllegroAuctionPeer::getAuctionsByOrder($order) as $auction):?>
|
||||
<?php echo st_external_link_to($auction->getAuctionId(), $auction->getAuctionLink(), array('target' => '_new'));?><br />
|
||||
<?php endforeach;?>
|
||||
11
apps/backend/modules/stOrder/templates/_opt_allegro_nick.php
Normal file
11
apps/backend/modules/stOrder/templates/_opt_allegro_nick.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php echo $order->getOptAllegroNick() ? $order->getOptAllegroNick() : '-';?>
|
||||
|
||||
<?php if (!$order->isAllegroOrder()):?>
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#sf_fieldset_allegro').hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php endif;?>
|
||||
16
apps/backend/modules/stOrder/templates/_orderStatusType.php
Normal file
16
apps/backend/modules/stOrder/templates/_orderStatusType.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php echo select_tag('order_status[order_status_type]', options_for_select($select_options, $order_status->getType()), array('disabled' => $order_status->getIsSystemDefault())) ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('order_status_order_status_type').observe('change', function()
|
||||
{
|
||||
var is_default_field = $('order_status_is_default');
|
||||
|
||||
is_default_field.disabled = this.options[this.selectedIndex].value != '<?php echo OrderStatusPeer::ST_PENDING ?>';
|
||||
|
||||
if (is_default_field.disabled)
|
||||
{
|
||||
is_default_field.checked = false;
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
30
apps/backend/modules/stOrder/templates/_order_ads_list.php
Normal file
30
apps/backend/modules/stOrder/templates/_order_ads_list.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
if($order->getAdsTracker() == NULL){
|
||||
|
||||
$order->setAdsTracker("none");
|
||||
|
||||
$c = new Criteria();
|
||||
$c->add(AdsTrackerOrderPeer::ORDER_ID , $order->getId());
|
||||
$adsTrackerOrder = AdsTrackerOrderPeer::doSelectOne($c);
|
||||
if($adsTrackerOrder){
|
||||
|
||||
if($adsTrackerOrder->getAdsTrackerList()){
|
||||
if(!$adsTrackerOrder->getAdsTrackerList()->getIsSystemDefault()){
|
||||
$order->setAdsTracker(appAdsTracker::getFullAdsName($adsTrackerOrder->getAdsTrackerList()->getId()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$order->save();
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php if($order->getAdsTracker()!="none"): ?>
|
||||
<a class="list_tooltip" title="<?php echo __("Zamówienie z reklamy")?>:<br><?php echo $order->getAdsTracker() ?>">
|
||||
<?php echo st_admin_get_icon('adstracker') ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
194
apps/backend/modules/stOrder/templates/_order_ads_raport.php
Normal file
194
apps/backend/modules/stOrder/templates/_order_ads_raport.php
Normal file
@@ -0,0 +1,194 @@
|
||||
<div style="width: 100%;">
|
||||
<?php
|
||||
$config = stConfig::getInstance(sfContext::getInstance(), 'appAdsTrackerBackend');
|
||||
|
||||
$c = new Criteria();
|
||||
$c->add(AdsTrackerOrderPeer::ORDER_ID , $order->getId());
|
||||
$adsTracker = AdsTrackerOrderPeer::doSelectOne($c);
|
||||
|
||||
if($adsTracker){
|
||||
|
||||
$cookie_array = $adsTracker->getOrderCookieData();
|
||||
$remote_address_array = $adsTracker->getOrderRemoteAddressData();
|
||||
$merge_array = $adsTracker->getOrderMergeData();
|
||||
|
||||
$cookie_array = json_decode($cookie_array,true);
|
||||
$remote_address_array = json_decode($remote_address_array,true);
|
||||
$merge_array = json_decode($merge_array,true);
|
||||
|
||||
|
||||
// echo "<pre>";
|
||||
// print_r($cookie_array);
|
||||
// echo "</pre>";
|
||||
//
|
||||
// echo "<pre>";
|
||||
// print_r($remote_address_array);
|
||||
// echo "</pre>";
|
||||
//
|
||||
// echo "<pre>";
|
||||
// print_r($merge_array);
|
||||
// echo "</pre>";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php echo __('Konwersja z wejścia', '', 'appAdsTrackerBackend') ?>: <b><?php echo appAdsTracker::langFilter($adsTracker->getOrderLastAds()); ?></b>
|
||||
<br>
|
||||
|
||||
<?php if($adsTracker->getOrderAdsConversion()==1): ?>
|
||||
<?php echo __('Pierwsze wejście', '', 'appAdsTrackerBackend') ?>:
|
||||
<b><?php echo date('d-m-y H:i', strtotime($adsTracker->getOrderFirstAdsEntering())); ?></b>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($adsTracker->getOrderAdsConversion()==2): ?>
|
||||
<?php echo __('Ostatnie wejście', '', 'appAdsTrackerBackend') ?>:
|
||||
<b><?php echo date('d-m-y H:i', strtotime($adsTracker->getOrderFirstAdsEntering())); ?></b>
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
|
||||
<?php echo __('Ilość wejść', '', 'appAdsTrackerBackend') ?>:
|
||||
<b><?php echo $adsTracker->getOrderAdsEntering(); ?></b>
|
||||
<br><br>
|
||||
|
||||
<?php if($config->get('is_debug')==1 || $config->get('is_extend')==0): ?>
|
||||
<?php
|
||||
if ($config->get('is_debug')==1) {
|
||||
echo __('Ścieżka wejść Cookie', '', 'appAdsTrackerBackend');
|
||||
}else{
|
||||
echo __('Wejścia', '', 'appAdsTrackerBackend');
|
||||
}
|
||||
?>
|
||||
<table class="st_record_list" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo __('Data', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Platforma', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Kampania', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Reklama', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Wejść', '', 'appAdsTrackerBackend') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php foreach ($cookie_array as $data): ?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo date('d-m-y H:i', strtotime($data['created_at'])); ?></td>
|
||||
<td><?php echo appAdsTracker::langFilter($data['platform']); ?></td>
|
||||
<td><?php echo appAdsTracker::langFilter($data['campaign']); ?></td>
|
||||
<td><?php echo appAdsTracker::langFilter($data['name']); ?></td>
|
||||
<td><?php echo $data['entering']; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($config->get('is_debug')==1 && $config->get('is_extend')==1): ?>
|
||||
|
||||
<?php
|
||||
if ($config->get('is_debug')==1) {
|
||||
echo __('Ścieżka wejść IP', '', 'appAdsTrackerBackend');
|
||||
}else{
|
||||
echo __('Wejścia', '', 'appAdsTrackerBackend');
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<table class="st_record_list" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo __('Data', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Platforma', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Kampania', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Reklama', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Wejść', '', 'appAdsTrackerBackend') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php foreach ($remote_address_array as $data): ?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo date('d-m-y H:i', strtotime($data['created_at'])); ?></td>
|
||||
<td><?php echo appAdsTracker::langFilter($data['platform']); ?></td>
|
||||
<td><?php echo appAdsTracker::langFilter($data['campaign']); ?></td>
|
||||
<td><?php echo appAdsTracker::langFilter($data['name']); ?></td>
|
||||
<td><?php echo $data['entering']; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($config->get('is_extend')==1): ?>
|
||||
|
||||
<?php
|
||||
if ($config->get('is_debug')==1) {
|
||||
echo __('Ścieżka wejść Cookie & IP', '', 'appAdsTrackerBackend');
|
||||
}else{
|
||||
echo __('Wejścia', '', 'appAdsTrackerBackend');
|
||||
}
|
||||
?>
|
||||
<table class="st_record_list" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo __('Data', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Platforma', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Kampania', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Reklama', '', 'appAdsTrackerBackend') ?></th>
|
||||
<th><?php echo __('Wejść', '', 'appAdsTrackerBackend') ?></th>
|
||||
<?php if($config->get('is_debug')==1): ?>
|
||||
<th><?php echo __('Pozyskano', '', 'appAdsTrackerBackend') ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
$entering = 0;
|
||||
foreach ($merge_array as $data): ?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo date('d-m-Y H:i', strtotime($data['created_at'])); ?></td>
|
||||
<td><?php echo appAdsTracker::langFilter($data['platform']); ?></td>
|
||||
<td><?php echo appAdsTracker::langFilter($data['campaign']); ?></td>
|
||||
<td><?php echo appAdsTracker::langFilter($data['name']); ?></td>
|
||||
<td><?php echo $data['entering']; ?></td>
|
||||
<?php if($config->get('is_debug')==1): ?>
|
||||
<td>
|
||||
<?php
|
||||
if($data['type'] == "remote_address"){
|
||||
echo __('Adres IP');
|
||||
}else{
|
||||
echo $data['type'];
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
|
||||
<?php endforeach;
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
||||
}else{
|
||||
echo __('Brak danych', '', 'appAdsTrackerBackend');
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php if ($order->hasDiscount()): $discount = $order->getTotalProductDiscountAmount(true, true) ?>
|
||||
-<?php echo st_order_price_format($discount, $order->getOrderCurrency()) ?>
|
||||
<?php if ($order->getDiscount()): ?>
|
||||
(<a target="_blank" href="<?php echo st_url_for('@stDiscountPlugin?action=edit&id='.$order->getDiscountId()) ?>"><?php echo $order->getDiscount()->getName() ?></a>)
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<?php __('Brak') ?>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
if ($order->getImportName()):
|
||||
|
||||
$product_imports = unserialize($order->getImportName());
|
||||
|
||||
$imports_name = "";
|
||||
|
||||
foreach ($product_imports as $product_import){
|
||||
|
||||
$configuration = stTaskSchedulerImportConfiguration::getByHashId($product_import);
|
||||
|
||||
$imports_name .= $configuration->getLabel()." ";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<a class="list_tooltip" title="<?php echo __("Zamówienie zawiera produkty z importu") ?>:<br> <b><?php echo $imports_name ?></b>">
|
||||
<?php echo st_admin_get_icon('/images/backend/applications/stImportExportPlugin.svg') ?>
|
||||
</a>
|
||||
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php if ($value->getGiftCard()) : ?>
|
||||
<?php echo st_external_link_to(__('Bon zakupowy: %code%', array('%code%' => $value->getGiftCard()->getCode())), 'stGiftCardBackend/edit?id=' . $value->getGiftCard()->getId()) ?>
|
||||
<?php else : ?>
|
||||
<?php echo $value->getPaymentTypeName() ?>
|
||||
<?php if ($value->getAllegroPaymentType()) : ?>
|
||||
<?php echo st_allegro_payment_type($value->getAllegroPaymentType()) ?>
|
||||
<?php endif ?>
|
||||
<?php if ($value->getTransactionId()) : ?>
|
||||
<p style="color: #848484"><?php echo __('Numer transakcji', null, 'stPayment') ?>: <?php echo $value->getTransactionId() ?></p>
|
||||
<?php endif ?>
|
||||
<?php endif; ?>
|
||||
444
apps/backend/modules/stOrder/templates/_order_products.php
Normal file
444
apps/backend/modules/stOrder/templates/_order_products.php
Normal file
@@ -0,0 +1,444 @@
|
||||
<?php
|
||||
/**
|
||||
* @var Order $order
|
||||
*/
|
||||
use_helper('stCurrency', 'stOrder', 'stPrice', 'stJQueryTools', 'stProductImage', 'stDiscount');
|
||||
sfLoader::loadHelpers('stProduct', 'stProduct');
|
||||
?>
|
||||
<div class="st-responsive">
|
||||
<?php if (!$sf_user->getAttribute('edit_mode', false, 'soteshop/stOrder')) : ?>
|
||||
<table id="st_order-product-list" class="st_record_list" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="padding: 3px 2px"> </th>
|
||||
<th><?php echo __('Kod') ?></th>
|
||||
<th class="text-left"><?php echo __('Nazwa') ?></th>
|
||||
<th><?php echo __('Recenzja') ?></th>
|
||||
<th class="text-right"><?php echo __('Netto') ?></th>
|
||||
<th class="text-right"><?php echo __('Vat') ?></th>
|
||||
<th class="text-right"><?php echo __('Brutto') ?></th>
|
||||
<th class="text-right"><?php echo __('Rabat') ?></th>
|
||||
<th class="text-right"><?php echo __('Brutto') ?>(-%)</th>
|
||||
<th class="text-right"><?php echo __('Ilość') ?></th>
|
||||
<th class="text-right"><?php echo __('Suma') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="11" style="text-align: right"><?php echo __('Łącznie') ?>:</th>
|
||||
<th style="text-align: right"><?php echo st_order_product_total_amount($order, true, false) ?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php foreach ($order->getOrderProductsJoinProduct() as $key => $order_product) : ?>
|
||||
<tr>
|
||||
<td><?php echo $key + 1; ?>
|
||||
|
||||
|
||||
</td>
|
||||
<td style="padding: 3px 2px" class="img"><?php echo st_product_image_tag($order_product->getImage(), 'icon', array('style' => 'max-height: 42px; max-width: 42px')) ?></td>
|
||||
<td class="text-left"><?php echo $order_product->getCode() ?>
|
||||
|
||||
<?php
|
||||
if ($order_product->getImportName()):
|
||||
$configuration = stTaskSchedulerImportConfiguration::getByHashId($order_product->getImportName());
|
||||
?>
|
||||
<a class="list_tooltip" title="<?php echo __("Produkty z importu") ?>: <b><?php echo $configuration->getLabel(); ?></b>">
|
||||
<?php echo st_admin_get_icon('/images/backend/applications/stImportExportPlugin.svg') ?>
|
||||
</a>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</td>
|
||||
<td class="text-left st_record_list-item-name">
|
||||
<?php if ($order_product->productValidate()) : ?>
|
||||
<?php echo st_external_link_to($order_product->getName(), 'stProduct/edit?id=' . $order_product->getProductId()) ?>
|
||||
<?php else : ?>
|
||||
<?php echo $order_product->getName() ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($order_product->hasPriceModifiers() || $order_product->hasOldOptions()) : ?>
|
||||
<?php echo st_order_render_product_options_backend($order_product) ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($order_product->getIsSet()) : ?>
|
||||
<?php st_order_display_product_set($order_product) ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($order_product->getOnlineCode()) : ?>
|
||||
<?php $codes = unserialize($order_product->getOnlineCode()); ?>
|
||||
<?php if (!empty($codes)) : ?>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<?php echo (count($codes) == 1) ? __('Kod') : __('Kody'); ?>:
|
||||
</div>
|
||||
<div style="float: left; padding-left: 5px;">
|
||||
<ul>
|
||||
<?php foreach ($codes as $code) : ?>
|
||||
<li><?php echo $code; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="clear:both;">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($order->isAllegroOrder()) : ?>
|
||||
<p><?php echo __('Oferta Allegro', null, 'stAllegroBackend') ?>: <a href="<?php echo url_for('@stAllegroPlugin?action=edit&id=' . $order_product->getAllegroAuctionId()) ?>" target="_blank"><?php echo $order_product->getAllegroAuctionId() ?></a></p>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td><?php echo !$order->isAllegroOrder() ? st_get_component("stReview", "reviewStatus", array('order_product' => $order_product)) : ''; ?></td>
|
||||
<td class="text-right text-nowrap"><?php echo st_order_product_price($order_product, false, false) ?></td>
|
||||
<td class="text-right text-nowrap"><?php echo $order_product->getVat() ?> %</td>
|
||||
<td class="text-right text-nowrap"><?php echo st_order_product_price($order_product, true, false) ?></td>
|
||||
<td class="text-right text-nowrap"><?php echo $order_product->getDiscountInPercent() ?> %</td>
|
||||
<td class="text-right text-nowrap"><?php echo st_order_product_price($order_product, true) ?></td>
|
||||
<td class="text-right text-nowrap"><?php echo $order_product->getQuantity() ?> <?php echo st_product_uom($order_product->getProduct()) ?></td>
|
||||
<td class="text-right text-nowrap"><?php echo st_order_product_total_amount($order_product, true) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else : ?>
|
||||
<?php
|
||||
use_javascript('/jQueryTools/jquery/effects.core.js?v5');
|
||||
|
||||
use_javascript('/jQueryTools/stTableRecordManager/js/script.js?v5');
|
||||
|
||||
use_stylesheet('/jQueryTools/stTableRecordManager/css/style.css?v5');
|
||||
|
||||
use_javascript('backend/stOrder.js?v5');
|
||||
|
||||
/**
|
||||
* @var Tax[]
|
||||
*/
|
||||
$taxes = TaxPeer::doSelect(new Criteria());
|
||||
|
||||
$tax_values = array();
|
||||
|
||||
$default_tax = null;
|
||||
|
||||
$has_valid_vat_eu = $order->getOrderUserDataBilling()->getHasValidVatEu();
|
||||
|
||||
foreach ($taxes as $tax)
|
||||
{
|
||||
$tax->setDeliveryCountry($order->getOrderUserDataDelivery()->getCountry());
|
||||
|
||||
$tax_values[] = $tax->getVat();
|
||||
|
||||
$tax_options[$tax->getId()] = $tax->getVat() . '% ('.$tax->getVatName().')';
|
||||
|
||||
if (!$default_tax && (!$has_valid_vat_eu && $tax->getIsDefault() || $has_valid_vat_eu && $tax->getVat() === 0))
|
||||
{
|
||||
$default_tax = $tax->getId();
|
||||
}
|
||||
}
|
||||
|
||||
echo form_error('order{products}', [
|
||||
'class' => 'form-error-msg',
|
||||
]);
|
||||
|
||||
?>
|
||||
<table id="st_order-product-list" class="st_record_list st_record_manager" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="padding: 3px 2px"> </th>
|
||||
<th><?php echo __('Kod') ?></th>
|
||||
<th><?php echo __('Nazwa') ?></th>
|
||||
<th><?php echo __('Netto') ?></th>
|
||||
<th><?php echo __('Vat') ?></th>
|
||||
<th><?php echo __('Brutto') ?></th>
|
||||
<th><?php echo __('Rabat') ?></th>
|
||||
<th><?php echo __('Brutto') ?>(-%)</th>
|
||||
<th><?php echo __('Ilość') ?></th>
|
||||
<th><?php echo __('Suma') ?></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
<tr class="template">
|
||||
<th> </th>
|
||||
|
||||
<th>
|
||||
<?php echo st_autocompleter_input_tag("code", null, array(
|
||||
'autocompleter' => array(
|
||||
'serviceUrl' => url_for('stOrder/ajaxSearchProduct?by=code&order_id=' . $order->getId() . '&vat_eu=' . $has_valid_vat_eu),
|
||||
'deferRequestBy' => 300,
|
||||
'onSelect' => 'stOrderProductPriceManagment.updateProductForm(value, data, el);',
|
||||
'resultFormat' => 'stOrderProductPriceManagment.fnFormatResult',
|
||||
),
|
||||
'class' => 'st-responsive',
|
||||
)) ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php echo st_autocompleter_input_tag("name", null, array('class' => 'name-field st-responsive', 'autocompleter' => array(
|
||||
'serviceUrl' => url_for('stOrder/ajaxSearchProduct?by=name&order_id=' . $order->getId() . '&vat_eu=' . $has_valid_vat_eu),
|
||||
'deferRequestBy' => 300, 'minChars' => 3,
|
||||
'onSelect' => 'stOrderProductPriceManagment.updateProductForm(value, data, el);',
|
||||
'resultFormat' => 'stOrderProductPriceManagment.fnFormatResult',
|
||||
))) ?>
|
||||
</th>
|
||||
<th><?php echo input_tag("price_netto", '0.00', array('class' => 'price-field st-responsive', 'size' => 9)) ?></th>
|
||||
<th><?php echo select_tag('tax', options_for_select($tax_options, $default_tax), array('class' => 'st-responsive')) ?></th>
|
||||
<th><?php echo input_tag("price_brutto", '0.00', array('class' => 'price-field st-responsive', 'size' => 9)) ?></th>
|
||||
<th><?php echo input_tag("discount", 0, array('class' => 'discount-field')) ?> <?php echo st_discount_type_select_tag("discount_type", '%', array('currency' => $order->getOrderCurrency())) ?></th>
|
||||
<th><?php echo input_tag("price_brutto_discount", '0.00', array('class' => 'price-field st-responsive', 'disabled st-responsive' => true, 'size' => 9)) ?></th>
|
||||
<th><?php echo input_tag("quantity", 1, array('class' => 'quantity-field st-responsive', 'size' => 5)) ?></th>
|
||||
<th>
|
||||
<?php echo input_tag("total_amount", '0.00', array('class' => 'price-field total-amount st-responsive ', 'disabled' => true, 'size' => 9)) ?>
|
||||
<?php echo input_hidden_tag('oid', null) ?>
|
||||
<?php //echo input_hidden_tag('hidden_data', null, array('class' => 'hidden_data'))
|
||||
?>
|
||||
</th>
|
||||
<th class="actions">
|
||||
<?php echo link_to(st_admin_get_icon('add-circle', array('size' => 'medium')), "#", array('class' => 'create')) ?>
|
||||
<?php echo link_to(st_admin_get_icon('delete-circle', array('size' => 'medium')), "#", array('class' => 'remove')) ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($order->getOrderProducts() as $index => $order_product) : if ($order_product->isDeleted()) continue; ?>
|
||||
<?php if (form_has_error('order{product}{' . $index . '}{code}')) : ?>
|
||||
<tr class="errors">
|
||||
<td colspan="12"><?php echo form_error('order{product}{' . $index . '}{code}', ['class' => 'form-error-msg']) ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if (form_has_error('order{product}{' . $index . '}{name}')) : ?>
|
||||
<tr class="errors">
|
||||
<td colspan="12"><?php echo form_error('order{product}{' . $index . '}{name}', ['class' => 'form-error-msg']) ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td><?php echo $index + 1; ?></td>
|
||||
<td class="<?php echo form_has_error('order{product}{' . $index . '}{code}') ? 'form-error' : 'none' ?>"><?php echo input_tag("order[product][" . $index . "][code]", $order_product->getCode(), array('class' => 'st-responsive')) ?></td>
|
||||
<td class="<?php echo form_has_error('order{product}{' . $index . '}{name}') ? 'form-error' : 'none' ?>">
|
||||
<?php echo input_tag("order[product][" . $index . "][name]", $order_product->getName(), array('class' => 'name-field st-responsive ')) ?>
|
||||
<?php if ($order_product->hasPriceModifiers() || $order_product->hasOldOptions()) : ?>
|
||||
<?php echo st_order_render_product_options_backend($order_product) ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo input_tag("order[product][" . $index . "][price_netto]", $order_product->getPriceNetto(true, false), array('class' => 'price-field st-responsive', 'size' => 9)) ?></td>
|
||||
<td><?php echo select_tag("order[product][" . $index . "][tax]", options_for_select($tax_options, $order_product->getTaxId())); ?></td>
|
||||
<td><?php echo input_tag("order[product][" . $index . "][price_brutto]", stPrice::round($order_product->getPriceBrutto(true, false)), array('class' => 'price-field st-responsive', 'size' => 9)) ?></td>
|
||||
<td><?php echo input_tag("order[product][" . $index . "][discount]", $order_product->getDiscountType() == 'P' ? stPrice::round($order_product->getDiscountValue()) : stPrice::round($order_product->getDiscountInPercent(), 1), array('class' => 'discount-field')) ?> <?php echo st_discount_type_select_tag("order[product][" . $index . "][discount_type]", $order_product->getDiscountType(), array('currency' => $order->getOrderCurrency())) ?></td>
|
||||
<td><?php echo input_tag("order[product][" . $index . "][price_brutto_discount]", $order_product->getPriceBrutto(true), array('class' => 'price-field st-responsive', 'disabled' => true, 'size' => 9)) ?></td>
|
||||
<td><?php echo input_tag("order[product][" . $index . "][quantity]", $order_product->getQuantity(), array('class' => 'quantity-field st-responsive', 'size' => 5)) ?></td>
|
||||
<td>
|
||||
<?php echo input_tag("order[product][" . $index . "][total_amount]", $order_product->getTotalAmount(true, true), array('class' => 'price-field total-amount st-responsive', 'disabled' => true, 'size' => 9)) ?>
|
||||
<?php
|
||||
echo input_hidden_tag('order[product][' . $index . '][oid]', $order_product->getId());
|
||||
/*
|
||||
$hidden_data = array('id' => $order_product->getProductId(), 'io' => $order_product->getImage());
|
||||
|
||||
if ($order_product->hasPriceModifiers() || $order_product->hasOldOptions())
|
||||
{
|
||||
$hidden_data['pm'] = $order_product->getPriceModifiers();
|
||||
}
|
||||
|
||||
echo input_hidden_tag('order[product]['.$index.'][hidden_data]', json_encode($hidden_data), array('class' => 'hidden_data'));
|
||||
*/
|
||||
?>
|
||||
</td>
|
||||
<td class="actions">
|
||||
<?php echo link_to(st_admin_get_icon('delete-circle', array('size' => 'medium')), "#", array('class' => 'remove')) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="st_order-autocomplete-template">
|
||||
<div class="st_order-autocomplete-item">
|
||||
<div class="image"><img src="" alt="" /></div>
|
||||
<div class="content">
|
||||
<h2></h2>
|
||||
<ul>
|
||||
<li><b><?php echo __('Cena:') ?></b> <?php echo $order->getOrderCurrency()->getFrontSymbol() ?><span class="price_netto"></span> <?php echo $order->getOrderCurrency()->getBackSymbol() ?> / <?php echo $order->getOrderCurrency()->getFrontSymbol() ?><span class="price_brutto"></span> <?php echo $order->getOrderCurrency()->getBackSymbol() ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
stOrderProductPriceManagment.setParams({
|
||||
taxValues: <?php echo json_encode($tax_values) ?>
|
||||
});
|
||||
jQuery(function($) {
|
||||
|
||||
function updatePayment() {
|
||||
var locale = "<?php echo str_replace("_", "-", $sf_user->getCulture()); ?>";
|
||||
var numberFormat = new Intl.NumberFormat(locale, {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2
|
||||
});
|
||||
var priceFormat = "<?php echo $order->getOrderCurrency()->getFrontSymbol() . '%price% ' . $order->getOrderCurrency()->getBackSymbol() ?>";
|
||||
var payment = $('#st_record_manager-payment tbody tr .price-field').not('[data-gift-card=1]');
|
||||
|
||||
var paid = 0;
|
||||
var manager = $('#st_record_manager-payment');
|
||||
|
||||
manager.find('tbody tr .price-field').each(function() {
|
||||
var current = $(this);
|
||||
|
||||
if (current.closest('tr').find('.payment-status').prop('checked')) {
|
||||
paid += Number(current.val());
|
||||
}
|
||||
});
|
||||
|
||||
var total = 0;
|
||||
|
||||
$('#st_order-product-list tbody .total-amount').each(function() {
|
||||
total += Number($(this).val());
|
||||
});
|
||||
|
||||
var totalAmount = total;
|
||||
|
||||
total += Number($('#order_delivery_cost').val());
|
||||
|
||||
var totalAmountWithOrder = total;
|
||||
|
||||
var discountOption = $('#order_summary_discount option:selected');
|
||||
|
||||
if (discountOption.data('discount-type')) {
|
||||
if (discountOption.data('discount-type') == '%') {
|
||||
var toPay = total - totalAmount * (discountOption.data('discount-value') / 100);
|
||||
} else {
|
||||
var toPay = total - discountOption.data('discount-value');
|
||||
}
|
||||
} else {
|
||||
var toPay = total;
|
||||
}
|
||||
|
||||
if (toPay < 0) {
|
||||
toPay = 0;
|
||||
}
|
||||
|
||||
var leftToPay = toPay - paid;
|
||||
|
||||
if (leftToPay < 0) {
|
||||
leftToPay = 0;
|
||||
}
|
||||
|
||||
$('#order-total-amount-container').html(priceFormat.replace('%price%', numberFormat.format(totalAmountWithOrder)));
|
||||
|
||||
$('#order-to-pay-amount-container').html(priceFormat.replace('%price%', numberFormat.format(toPay)));
|
||||
|
||||
$('#order-left-to-pay-amount-container').html(priceFormat.replace('%price%', numberFormat.format(leftToPay)));
|
||||
|
||||
$('#order-paid-amount-container').html(priceFormat.replace('%price%', numberFormat.format(paid > toPay ? toPay : paid)));
|
||||
|
||||
$('#st_order-product-list').data('total-amount', total);
|
||||
|
||||
if (!manager.data('update')) {
|
||||
var whatsLeft = total;
|
||||
|
||||
payment.each(function() {
|
||||
whatsLeft -= Number($(this).val());
|
||||
});
|
||||
|
||||
if (whatsLeft >= 0 && !manager.data('update')) {
|
||||
$('#payment_amount').val(whatsLeft.toFixed(2));
|
||||
$('#payment_status').prop('disabled', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('#order_summary_discount').change(updatePayment);
|
||||
|
||||
$('#order_summary_discount').change();
|
||||
|
||||
stOrderPriceModifiers.params.url = '<?php echo st_url_for('stOrder/ajaxPriceModifiers') ?>';
|
||||
|
||||
$('#st_order-product-list').stTableRecordManager({
|
||||
namespace: 'order[product]',
|
||||
confirmMsg: '<?php echo __('Jesteś pewien?', null, 'stAdminGeneratorPlugin') ?>'
|
||||
});
|
||||
|
||||
$('#order_delivery_cost').on('change', updatePayment);
|
||||
|
||||
$('#st_order-product-list').bind('preRemove', function(event, row) {
|
||||
row = row.prev('tr');
|
||||
|
||||
while (row.hasClass('errors')) {
|
||||
var tmp = row.prev('tr');
|
||||
row.remove();
|
||||
row = tmp;
|
||||
}
|
||||
});
|
||||
|
||||
$('#st_order-product-list').bind('postRemove', function(event) {
|
||||
updatePayment();
|
||||
});
|
||||
|
||||
$('#st_order-product-list').bind('postAdd', function(event, row, fields) {
|
||||
$.each(fields, function() {
|
||||
$(this).css('background-color', $(this).attr('prev-background-color'));
|
||||
});
|
||||
|
||||
new stOrderProductPriceManagment(fields, updatePayment);
|
||||
|
||||
$(fields.discount).after(' ');
|
||||
|
||||
stOrderProductPriceManagment.updateTotalAmount(fields);
|
||||
|
||||
updatePayment();
|
||||
});
|
||||
|
||||
$('#admin_edit_form').submit(function() {
|
||||
|
||||
var form = $(this);
|
||||
var data = form.serializeArray();
|
||||
|
||||
var json = {};
|
||||
|
||||
var index = null;
|
||||
|
||||
var current = {};
|
||||
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
|
||||
if (data[i] && data[i].name.indexOf("order[product]") > -1) {
|
||||
|
||||
var matches = data[i].name.match(/order\[product\]\[(\d+)\]\[([^\]]+)\]/);
|
||||
|
||||
if (index === null) {
|
||||
index = matches[1];
|
||||
} else if (index != matches[1]) {
|
||||
json[index] = (current);
|
||||
current = {};
|
||||
index = matches[1];
|
||||
}
|
||||
|
||||
current[matches[2]] = data[i].value;
|
||||
}
|
||||
}
|
||||
|
||||
if (current && index !== null) {
|
||||
json[index] = (current);
|
||||
}
|
||||
|
||||
hidden = $("<input type=\"hidden\" name=\"order[product]\" />");
|
||||
|
||||
hidden.val(JSON.stringify(json));
|
||||
|
||||
form.append(hidden);
|
||||
|
||||
form.append("<input type=\"hidden\" name=\"validation_token\" />");
|
||||
|
||||
$('#st_order-product-list').find('select, input').attr('disabled', true);
|
||||
|
||||
});
|
||||
|
||||
$('#st_order-product-list tr').each(function() {
|
||||
var fields = $(this).find('input, select');
|
||||
if (fields.length) {
|
||||
new stOrderProductPriceManagment({
|
||||
price_netto: fields[2],
|
||||
tax: fields[3],
|
||||
price_brutto: fields[4],
|
||||
discount: fields[5],
|
||||
discount_type: fields[6],
|
||||
price_brutto_discount: fields[7],
|
||||
quantity: fields[8],
|
||||
total_amount: fields[9]
|
||||
}, updatePayment);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php echo textarea_tag('order_status[order_status_description]', $order_status->getDescription(), array(
|
||||
'size' => '80x20',
|
||||
'rich' => true,
|
||||
'tinymce_options' => "theme:'advanced'",
|
||||
'disabled' => !$order_status->getHasMailNotification())) ?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
/**
|
||||
* @var Order $order
|
||||
*/
|
||||
echo st_order_status_select_tag('order[order_status_id]', $order->getOrderStatusId());
|
||||
@@ -0,0 +1 @@
|
||||
<?php echo __(OrderStatusPeer::getNameFromType($order_status->getOrderStatusType())) ?>
|
||||
@@ -0,0 +1 @@
|
||||
<?php st_include_partial('user_data', array('user_data' => $order->getOrderUserDataBilling(), 'type' => 'billing')); ?>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div class="st-order-code-town">
|
||||
<?php echo input_tag($params['name'].'[code]', $value->getCode(), array('class' => 'st-responsive')) ?>
|
||||
<?php echo input_tag($params['name'].'[town]', $value->getTown(), array('class' => 'st-responsive')) ?>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
<?php st_include_partial('user_data', array('user_data' => $order->getOrderUserDataDelivery(), 'type' => 'delivery')); ?>
|
||||
208
apps/backend/modules/stOrder/templates/_payment.php
Normal file
208
apps/backend/modules/stOrder/templates/_payment.php
Normal file
@@ -0,0 +1,208 @@
|
||||
<?php use_helper('stCurrency', 'stAllegro'); ?>
|
||||
|
||||
<div class="st-responsive">
|
||||
<?php echo form_error('order{payments}', [
|
||||
'class' => 'form-error-msg',
|
||||
]) ?>
|
||||
<?php if (!$sf_user->getAttribute('edit_mode', false, 'soteshop/stOrder')) : ?>
|
||||
<?php if (count($payments) > 1): ?>
|
||||
<table class="st_record_list" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%"><?php echo __('Data płatności') ?></th>
|
||||
<th><?php echo __('Typ płatności') ?></th>
|
||||
<th width="1%" class="text-right"><?php echo __('Kwota') ?></th>
|
||||
<th width="1%"><?php echo __('Rozliczona') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($payments as $index => $ohp) : $payment = $ohp->getPayment();
|
||||
$transaction_id = $payment->getTransactionId(); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo $payment->getPayedAt() ? st_format_date($payment->getPayedAt()) : '-' ?>
|
||||
<?php echo input_hidden_tag('order[payment][' . $index . '][payment_id]', $payment->getId()) ?>
|
||||
</td>
|
||||
<?php if ($payment->getGiftCard()) : ?>
|
||||
<td><?php echo st_external_link_to(__('Bon zakupowy: %code%', array('%code%' => $payment->getGiftCard()->getCode())), 'stGiftCardBackend/edit?id=' . $payment->getGiftCard()->getId()) ?></td>
|
||||
<?php else : ?>
|
||||
<td>
|
||||
<?php echo $payment->getPaymentTypeName() ?>
|
||||
<?php if ($payment->getAllegroPaymentType()) : ?>
|
||||
<?php echo st_allegro_payment_type($payment->getAllegroPaymentType()) ?>
|
||||
<?php endif ?>
|
||||
<?php if ($transaction_id) : ?>
|
||||
<p style="color: #848484"><?php echo __('Numer transakcji', null, 'stPayment') ?>: <?php echo $transaction_id ?></p>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td class="text-right text-nowrap"><?php echo st_order_price_format($payment->getAmount(), $order->getOrderCurrency()) ?></td>
|
||||
<td>
|
||||
<?php echo st_admin_checkbox_tag('order[payment][' . $index . '][payment_status]', 1, $payment->getStatus(), array('disabled' => $payment->getGiftCard(), 'style' => 'vertical-align: middle')); ?>
|
||||
<?php if ($payment->getGiftCard()) : ?>
|
||||
<?php echo input_hidden_tag('order[payment][' . $index . '][payment_status]', true); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($payment->getStatus() && !$payment->isValid()) : ?>
|
||||
<?php echo image_tag('/images/backend/icons/warning.png', array('title' => __('Status płatności został zmieniony bezpośrednio w bazie danych', null, 'stPayment'), 'class' => 'list_tooltip', 'style' => 'vertical-align: middle')) ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: $payment = !empty($payments) ? $payments[0]->getPayment() : null ?>
|
||||
<div class="st-responsive">
|
||||
<?php if (null !== $payment): ?>
|
||||
<?php echo input_hidden_tag('order[payment][0][payment_id]', $payment->getId()) ?>
|
||||
<?php echo st_admin_get_form_field(null, __('Typ płatności'), $payment, '_order_payment_type', array('type' => 'custom')) ?>
|
||||
<?php echo st_admin_get_form_field(null, __('Kwota'), st_order_price_format($payment->getAmount(), $order->getOrderCurrency()), 'plain') ?>
|
||||
<?php echo st_admin_get_form_field(null, __('Data płatności'), $payment->getPayedAt() ? st_format_date($payment->getPayedAt()) : '-', 'plain') ?>
|
||||
<?php echo st_admin_get_form_field('order[payment][0][payment_status]', __('Rozliczona'), 1, 'checkbox_tag', array('disabled' => $payment->getGiftCard(), 'checked' => $payment->getStatus())) ?>
|
||||
<?php else: ?>
|
||||
<?php echo st_admin_get_form_field(null, __('Typ płatności'), __('Brak'), 'plain', array('type' => 'custom')) ?>
|
||||
<?php echo st_admin_get_form_field(null, __('Kwota'), st_order_price_format($order->getUnpaidAmount(), $order->getOrderCurrency()), 'plain') ?>
|
||||
<?php echo st_admin_get_form_field(null, __('Data płatności'), '-', 'plain') ?>
|
||||
<?php echo st_admin_get_form_field(null, __('Rozliczona'), __('Nie'), 'plain') ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php else : ?>
|
||||
<table id="st_record_manager-payment" class="st_record_list st_record_manager" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%"><?php echo __('Data płatności') ?></th>
|
||||
<th><?php echo __('Typ płatności') ?></th>
|
||||
<th width="1%"><?php echo __('Kwota') ?></th>
|
||||
<th width="1%"><?php echo __('Rozliczona') ?></th>
|
||||
<th width="1%"> </th>
|
||||
</tr>
|
||||
<tr class="template">
|
||||
<th> <?php echo input_hidden_tag('payment_id', null) ?></th>
|
||||
<th><?php echo select_tag("payment_type", options_for_select($paymentsType), array("class" => 'st-responsive')) ?></th>
|
||||
<th><?php echo input_tag("payment_amount", '0.00', array('class' => 'price-field')) ?></th>
|
||||
<th><?php echo st_admin_checkbox_tag("payment_status", true, false, array('class' => 'payment-status')) ?></th>
|
||||
<th class="actions">
|
||||
<?php echo link_to(st_admin_get_icon('add-circle', array('size' => 'medium')), "#", array('class' => 'create')) ?>
|
||||
<?php echo link_to(st_admin_get_icon('delete-circle', array('size' => 'medium')), "#", array('class' => 'remove')) ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($payments as $index => $ohp) : $payment = $ohp->getPayment() ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo $payment->getPayedAt() ? st_format_date($payment->getPayedAt()) : '-' ?>
|
||||
<?php echo input_hidden_tag('order[payment][' . $index . '][payment_id]', $payment->getId()) ?>
|
||||
</td>
|
||||
<?php if ($payment->getAllegroPaymentType()) : ?>
|
||||
<td>
|
||||
<?php echo input_hidden_tag('order[payment][' . $index . '][payment_type]', $payment->getPaymentTypeId()) ?>
|
||||
<?php echo $payment->getPaymentType() ?> - <?php echo st_allegro_payment_type($payment->getAllegroPaymentType()) ?>
|
||||
</td>
|
||||
<?php elseif ($payment->getGiftCard()) : ?>
|
||||
<td><?php echo st_external_link_to($payment->getGiftCard()->getCode(), 'stGiftCardBackend/edit?id=' . $payment->getGiftCard()->getId()) ?></td>
|
||||
<?php else : ?>
|
||||
<td><?php echo select_tag("order[payment][" . $index . "][payment_type]", options_for_select($paymentsType, $payment->getPaymentTypeId())) ?></td>
|
||||
<?php endif; ?>
|
||||
<td>
|
||||
<?php echo input_tag('order[payment][' . $index . '][payment_amount]', stPrice::round($payment->getAmount()), array('disabled' => $payment->getGiftCard() || $payment->getStatus(), 'class' => 'price-field', 'data-gift-card' => null !== $payment->getGiftCard())) ?>
|
||||
|
||||
<?php echo input_hidden_tag('order[payment][' . $index . '][payment_amount]', stPrice::round($payment->getAmount()), array('disabled' => !$payment->getStatus(), 'id' => 'order_payment_' . $index . '_payment_amount_hidden')) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo st_admin_checkbox_tag('order[payment][' . $index . '][payment_status]', 1, $payment->getStatus(), array('disabled' => $payment->getGiftCard(), 'class' => 'payment-status')); ?>
|
||||
</td>
|
||||
<td class="actions">
|
||||
<?php if (!$payment->getGiftCard()) : ?>
|
||||
<a href="#" class="remove"><?php echo st_admin_get_icon('delete-circle', array('size' => 'medium')) ?></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
function statusUpdate() {
|
||||
|
||||
var status = $(this);
|
||||
var priceField = status.closest('tr').find('.price-field');
|
||||
|
||||
if (priceField.data('gift-card')) {
|
||||
return;
|
||||
}
|
||||
|
||||
priceField.prop('disabled', status.prop('checked'));
|
||||
|
||||
var hiddenId = priceField.attr('id') + '_hidden';
|
||||
|
||||
var hidden = $('#' + hiddenId);
|
||||
|
||||
if (hidden.length) {
|
||||
hidden.prop('disabled', !status.prop('checked'));
|
||||
hidden.val(priceField.val());
|
||||
} else {
|
||||
hidden = $('<input type="hidden" id="' + hiddenId + '" name="' + priceField.attr('name') + '" value="' + priceField.val() + '">');
|
||||
priceField.after(hidden);
|
||||
}
|
||||
|
||||
|
||||
|
||||
totalAmountUpdate();
|
||||
|
||||
|
||||
}
|
||||
|
||||
function paymentAmountUpdate() {
|
||||
var input = $(this);
|
||||
input.val(stPrice.fixNumberFormat(input.val()));
|
||||
var value = Number(input.val());
|
||||
var payment = $('#st_record_manager-payment tbody tr .price-field').not('[data-gift-card=1]');
|
||||
|
||||
var leftToPay = Number($('#st_order-product-list').data('total-amount'));
|
||||
|
||||
payment.each(function() {
|
||||
var current = $(this);
|
||||
if (input.attr('id') !== current.attr('id')) {
|
||||
leftToPay -= Number(current.val());
|
||||
}
|
||||
});
|
||||
|
||||
if (leftToPay < 0) {
|
||||
leftToPay = 0;
|
||||
}
|
||||
|
||||
if (value > leftToPay) {
|
||||
value = leftToPay;
|
||||
}
|
||||
|
||||
input.val(value.toFixed(2));
|
||||
}
|
||||
|
||||
function totalAmountUpdate() {
|
||||
manager = $('#st_record_manager-payment');
|
||||
manager.data('update', true);
|
||||
$('#order_summary_discount').change();
|
||||
manager.data('update', false);
|
||||
}
|
||||
|
||||
$('#st_record_manager-payment').stTableRecordManager({
|
||||
namespace: 'order[payment]',
|
||||
confirmMsg: '<?php echo __('Jesteś pewien?', null, 'stAdminGeneratorPlugin') ?>'
|
||||
});
|
||||
$('#payment_amount').change(paymentAmountUpdate);
|
||||
|
||||
$('#st_record_manager-payment').on('postAdd', function(event, row, fields) {
|
||||
statusUpdate.call(fields.payment_status);
|
||||
totalAmountUpdate();
|
||||
}).on('postRemove', function() {
|
||||
totalAmountUpdate();
|
||||
});
|
||||
|
||||
$('#st_record_manager-payment tbody')
|
||||
.on('change', '.price-field', paymentAmountUpdate)
|
||||
.on('change', '.payment-status', statusUpdate);
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
7
apps/backend/modules/stOrder/templates/_pointsEarn.php
Normal file
7
apps/backend/modules/stOrder/templates/_pointsEarn.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
if($points_earn>0){
|
||||
echo $points_earn." ".$config_points->get('points_shortcut', null, true);
|
||||
}else{
|
||||
echo "-";
|
||||
}
|
||||
?>
|
||||
7
apps/backend/modules/stOrder/templates/_pointsSpend.php
Normal file
7
apps/backend/modules/stOrder/templates/_pointsSpend.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
if($points_value>0){
|
||||
echo $points_value." ".$config_points->get('points_shortcut', null, true);
|
||||
}else{
|
||||
echo "-";
|
||||
}
|
||||
?>
|
||||
10
apps/backend/modules/stOrder/templates/_pointsStatus.php
Normal file
10
apps/backend/modules/stOrder/templates/_pointsStatus.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
if($points_status == 1){
|
||||
echo __("tak");
|
||||
}elseif($points_earn>0){
|
||||
echo __("nie")." ".st_link_to(__("(rozlicz)"),"stPointsBackend/addPointsForOrder?id=".$order_id);
|
||||
}else{
|
||||
echo "-";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php use_helper('stWidgets');?>
|
||||
<?php echo st_open_widget('Order',__('Ostatnio sprzedane produkty'));?>
|
||||
|
||||
<div style="float:right;">
|
||||
|
||||
<?php echo __('Ostatnie', null, 'stBackendMain'); ?>:
|
||||
|
||||
<?php if($date_type == "day"): ?>
|
||||
<b><?php echo link_to_remote(__('24h', null, 'stBackendMain'), array('update'=>'product-last-order-widget', 'url'=>'stOrder/productLastOrderWidget?date_type=day',)) ?></b>
|
||||
<?php else: ?>
|
||||
<?php echo link_to_remote(__('24h', null, 'stBackendMain'), array('update'=>'product-last-order-widget', 'url'=>'stOrder/productLastOrderWidget?date_type=day',)) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($date_type == "week"): ?>
|
||||
<b><?php echo link_to_remote(__('7 dni', null, 'stBackendMain'), array('update'=>'product-last-order-widget', 'url'=>'stOrder/productLastOrderWidget?date_type=week',)) ?></b>
|
||||
<?php else: ?>
|
||||
<?php echo link_to_remote(__('7 dni', null, 'stBackendMain'), array('update'=>'product-last-order-widget', 'url'=>'stOrder/productLastOrderWidget?date_type=week',)) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($date_type == "month"): ?>
|
||||
<b><?php echo link_to_remote(__('miesiąc', null, 'stBackendMain'), array('update'=>'product-last-order-widget', 'url'=>'stOrder/productLastOrderWidget?date_type=month',)) ?></b>
|
||||
<?php else: ?>
|
||||
<?php echo link_to_remote(__('miesiąc', null, 'stBackendMain'), array('update'=>'product-last-order-widget', 'url'=>'stOrder/productLastOrderWidget?date_type=month',)) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($date_type == "lastlog"): ?>
|
||||
<b><?php echo link_to_remote(__('logowanie', null, 'stBackendMain'), array('update'=>'product-last-order-widget', 'url'=>'stOrder/productLastOrderWidget?date_type=lastlog',)) ?></b>
|
||||
<?php else: ?>
|
||||
<?php echo link_to_remote(__('logowanie', null, 'stBackendMain'), array('update'=>'product-last-order-widget', 'url'=>'stOrder/productLastOrderWidget?date_type=lastlog',)) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
<div id="sf_admin_container">
|
||||
|
||||
|
||||
<?php $width = (count($orderProducts) * 100)+100; ?>
|
||||
<div style="height:160px; overflow:auto;">
|
||||
<div style="width:<?php echo $width ?>px">
|
||||
|
||||
<?php $i = 0; ?>
|
||||
<?php foreach ($orderProducts as $product): ?>
|
||||
<?php $i++; ?>
|
||||
|
||||
<?php if($order != $product->getOrderId() && $i!=1): ?>
|
||||
|
||||
<div style="width:10px; height:10px; float:left;"></div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div style="float:left; width:100px; text-align: center;">
|
||||
|
||||
<div onmouseout="document.getElementById('buttons<?php echo $i.$product->getProductId(); ?>').style.visibility = 'hidden'" onMouseOver="document.getElementById('buttons<?php echo $i.$product->getProductId(); ?>').style.visibility = 'visible'">
|
||||
|
||||
<div style="border-radius: 5px 5px 5px 5px; height:90px; width:90px; border:1px solid #ccc; margin:0px auto; background: url(<?php echo st_product_image_path($product->getProduct(), 'thumb'); ?>) no-repeat; background-position:center; ">
|
||||
|
||||
<div style="float:left; margin-left: 3px;">
|
||||
<?php if($product->getQuantity() != 1):?>
|
||||
<b><?php echo __('szt.') ?> <?php echo $product->getQuantity(); ?></b>
|
||||
<?php else: ?>
|
||||
<?php echo __('szt.') ?> <?php echo $product->getQuantity(); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div style="visibility:hidden" id="buttons<?php echo $i.$product->getProductId(); ?>">
|
||||
|
||||
<div style="float:right;">
|
||||
<?php echo st_link_to(image_tag('/images/backend/main/icons/order.png'), 'stOrder/edit?id='.$product->getOrderId()); ?>
|
||||
<?php echo st_link_to(image_tag('/images/backend/main/icons/user.png'), 'stUser/edit?id='.$product->getOrder()->getSfGuardUserId()); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="font-size:10px; line-height: 12px; padding-top: 3px; padding-bottom: 5px; width: 100px; height: 12px; text-align: left; padding-left: 5px;">
|
||||
|
||||
</div>
|
||||
<?php echo st_back_price($product->getPriceBrutto(), true, true) ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $order = $product->getOrderId(); ?>
|
||||
<?php endforeach ; ?>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="clear:both"></div>
|
||||
|
||||
|
||||
<?php echo st_close_widget(); ?>
|
||||
14
apps/backend/modules/stOrder/templates/_proforma.php
Normal file
14
apps/backend/modules/stOrder/templates/_proforma.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @var Order $order
|
||||
*/
|
||||
if ($order->getProforma())
|
||||
{
|
||||
echo st_get_admin_button('preview', __("Pokaż"), "stInvoiceBackend/proformaEdit?id=".$order->getProforma()->getId()."&type=".$order->getProforma()->getType()."&mode=show", array('size' => 'small'));
|
||||
echo st_get_admin_button('download', __("Pobierz"), "stInvoicePdf/show?id=".$order->getProforma()->getId()."&download=true&culture=".$order->getClientCulture(), array('size' => 'small'));
|
||||
echo st_get_admin_button('refresh', __("Aktualizuj"), "stInvoiceBackend/update?id=".$order->getId().'&invoice_id='.$order->getProforma()->getId(), array('size' => 'small'));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo __('Brak');
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
if($order->getReviewOrderProductId() == NULL){
|
||||
|
||||
$config = stConfig::getInstance('stReview');
|
||||
|
||||
if($order->getOrderProducts()) {
|
||||
if ($config -> get("send_type") == 1){
|
||||
$c = new Criteria();
|
||||
$c->setLimit(1);
|
||||
$c->addDescendingOrderByColumn(OrderProductPeer::PRICE);
|
||||
} elseif ($config -> get("send_type") == 2) {
|
||||
$c = new Criteria();
|
||||
$c->setLimit(1);
|
||||
}
|
||||
|
||||
$orderProducts = $order->getOrderProducts($c);
|
||||
$orderProduct = $orderProducts ? $orderProducts[0] : null;
|
||||
|
||||
} else {
|
||||
|
||||
$orderProduct = null;
|
||||
$order_product_id = null;
|
||||
|
||||
}
|
||||
|
||||
if($orderProduct){
|
||||
$order_product_id = $orderProduct->getId();
|
||||
$order->setReviewSend($orderProduct->getSendReview());
|
||||
}
|
||||
|
||||
$order->setReviewOrderProductId($order_product_id);
|
||||
$order->save();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<?php if ($order->getReviewOrderProductId() == NULL) : ?>
|
||||
<?php echo st_admin_get_icon('delete-circle', array('color' => 'default')) ?>
|
||||
<?php else: ?>
|
||||
<a style="text-decoration: none; background: none; padding: 0px; margin: 0px;"
|
||||
href="<?php echo st_url_for('stReview/sendReviewRequest') ?>?order_product_id=<?php echo $order->getReviewOrderProductId() ?>"
|
||||
id="st_review_ajax_<?php echo $order->getReviewOrderProductId() ?>"
|
||||
class="tooltip"
|
||||
title="<?php echo $order->getReviewSend() != "" ? stReview::getSendTime($order->getReviewSend()).'<br>'.$i18n->__('Kliknij aby wysłać ponownie.') : __("Kliknij aby wysłać prośbę o recenzję.") ?>">
|
||||
<?php echo st_admin_get_icon('envelop') ?>
|
||||
<?php echo $order->getReviewSend() != "" ? st_admin_get_icon('check-circle', array('size' => 15, 'style' => 'margin-left: -12px; margin-bottom: -13px')) : st_admin_get_icon('arrow-right', array('size' => 12, 'style' => 'margin-left: -11px; margin-bottom: -14px')) ?>
|
||||
</a>
|
||||
<script>
|
||||
jQuery(function($) {
|
||||
$('#st_review_ajax_<?php echo $order->getReviewOrderProductId() ?>').click(function() {
|
||||
var link = $(this);
|
||||
$.preloader.show();
|
||||
$.post(link.attr('href'), {}, function(response) {
|
||||
link.data('title', response.title);
|
||||
link.html(response.content);
|
||||
$.preloader.hide();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
12
apps/backend/modules/stOrder/templates/_sf_guard_user.php
Normal file
12
apps/backend/modules/stOrder/templates/_sf_guard_user.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @var Order $order
|
||||
*/
|
||||
?>
|
||||
<?php if ($order->getsfGuardUserId()): ?>
|
||||
<span class="align-middle"><?php echo st_external_link_to($order->getsfGuardUser()->getUsername(), 'user/edit?id=' . $order->getsfGuardUserId()) ?></span>
|
||||
<?php else: ?>
|
||||
<span class="align-middle"><?php echo $order->getOptClientEmail() ?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo $order->getOrderLanguage() ? get_language_flag_icon($order->getOrderLanguage()->getShortcut(), array('size' => 18)) : '' ?>
|
||||
22
apps/backend/modules/stOrder/templates/_summary.php
Normal file
22
apps/backend/modules/stOrder/templates/_summary.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php use_helper('stCurrency') ?>
|
||||
|
||||
<div class="bs-d-flex bs-justify-content-end bs-mt-4">
|
||||
<div>
|
||||
<?php st_admin_table_start(array(), array('min_width' => false, 'compact' => true, 'highlight' => false)); ?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-right"><?php echo __('Ilość zamówień') ?>:</td>
|
||||
<td><?php echo $count ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><?php echo __('Średnia wartość brutto') ?>:</td>
|
||||
<td><?php echo st_currency_default_format($averageAmount) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><?php echo __('Suma brutto') ?>:</td>
|
||||
<td><b><?php echo st_currency_default_format($totalAmount) ?></b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php st_admin_table_end() ?>
|
||||
</div>
|
||||
</div>
|
||||
11
apps/backend/modules/stOrder/templates/_total_amount.php
Normal file
11
apps/backend/modules/stOrder/templates/_total_amount.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
use_helper('stOrder');
|
||||
$total_amount = $order->getOptTotalAmount();
|
||||
?>
|
||||
<?php if ($order->getOrderCurrency()->getExchange() != 1): $currency = stCurrency::getDefault() ?>
|
||||
<spam class="list_tooltip" title="<?php echo st_order_price_format($order->getOrderCurrency()->exchange($total_amount, true), $currency) ?>">
|
||||
<?php echo st_order_price_format($total_amount, $order->getOrderCurrency()) ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<?php echo st_order_price_format($total_amount, $order->getOrderCurrency()) ?>
|
||||
<?php endif; ?>
|
||||
109
apps/backend/modules/stOrder/templates/_total_amount_summary.php
Normal file
109
apps/backend/modules/stOrder/templates/_total_amount_summary.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
use_helper('stOrder');
|
||||
?>
|
||||
|
||||
<?php if ($order->getDiscountCouponCode()): ?>
|
||||
<div class="row">
|
||||
<span class="label"><?php echo __('Kod rabatowy') ?>:</span>
|
||||
<div class="field">
|
||||
<?php echo st_external_link_to($order->getDiscountCouponCode()->getCode(), 'stDiscountBackend/couponCodeEdit?id='.$order->getDiscountCouponCode()->getId()) ?> (<?php echo $order->getDiscountCouponCode()->getDiscount() ?>%)
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!$sf_user->getAttribute('edit_mode', false, 'soteshop/stOrder')): ?>
|
||||
<?php if ($order->hasDiscount()): $discount = $order->getTotalProductDiscountAmount(true, true) ?>
|
||||
<div class="row">
|
||||
<span class="label"><?php echo __('Łączna wartość') ?>:</span>
|
||||
<div class="field">
|
||||
<span id="order-total-amount-container"><?php echo st_order_total_amount($order, true, true, false) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<span class="label"><?php echo __('Udzielony rabat') ?>:</span>
|
||||
<div class="field">
|
||||
-<?php echo st_order_price_format($discount, $order->getOrderCurrency()) ?>
|
||||
<?php if ($order->getDiscount()): ?>
|
||||
(<a target="_blank" href="<?php echo st_url_for('@stDiscountPlugin?action=edit&id='.$order->getDiscountId()) ?>"><?php echo $order->getDiscount()->getName() ?></a>)
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php else:
|
||||
$discounts = DiscountPeer::doSelectActiveCached();
|
||||
$options = '<option value="">---</option>';
|
||||
$currency = $order->getOrderCurrency();
|
||||
|
||||
if ($discounts && isset($discounts['O']))
|
||||
{
|
||||
foreach ($discounts['O'] as $discount)
|
||||
{
|
||||
$type = $discount->getPriceType();
|
||||
$from_amount = $currency->exchange($discount->getCondition('from_amount'));
|
||||
|
||||
if ($type == '%')
|
||||
{
|
||||
$discount_value = $discount->getValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
$discount_value = $currency->exchange($discount->getValue());
|
||||
}
|
||||
|
||||
$label = $discount->getName().' ('.__('Rabat %discount% od kwoty: %amount%', array('%discount%' => $type == '%' ? $discount_value.'%' : st_order_price_format($discount_value, $currency),'%amount%' => st_order_price_format($from_amount, $currency))).')';
|
||||
|
||||
if ($discount->getId() == $order->getDiscountId())
|
||||
{
|
||||
$options .= '<option value="'.$discount->getId().'" data-discount-value="'.$discount_value.'" data-discount-type="'.$type.'" selected>'.$label.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$options .= '<option value="'.$discount->getId().'" data-discount-value="'.$discount_value.'" data-discount-type="'.$type.'">'.$label.'</option>';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="row">
|
||||
<span class="label"><?php echo __('Łączna wartość') ?>:</span>
|
||||
<div class="field">
|
||||
<span id="order-total-amount-container"><?php echo st_order_total_amount($order, true, true, false) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="label"><?php echo __('Udzielony rabat') ?>:</span>
|
||||
<div class="field">
|
||||
<?php echo select_tag('order[discount]', $options); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="row">
|
||||
<span class="label"><?php echo __('Razem do zapłaty', null, 'stInvoiceBackend') ?>:</span>
|
||||
<div class="field">
|
||||
<strong id="order-to-pay-amount-container"><?php echo st_order_total_amount($order) ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="label"><?php echo __('Zapłacono', null, 'stInvoiceBackend') ?>:</span>
|
||||
<div class="field" style="color: #54903E; font-weight: bold">
|
||||
<span id="order-paid-amount-container" data-amount="<?php echo $order->getPaidAmount() ?>"><?php echo st_order_price_format($order->getPaidAmount(), $order->getOrderCurrency()); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="display: none">
|
||||
<span class="label"><?php echo __('Do zwrotu', null, 'stInvoiceBackend') ?>:</span>
|
||||
<div class="field" style="color: #C62929; font-weight: bold">
|
||||
<span id="order-refund-amount-container"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="label"><?php echo __('Pozostało do zapłaty', null, 'stInvoiceBackend') ?>:</span>
|
||||
<div class="field" style="color: #C62929; font-weight: bold">
|
||||
<span id="order-left-to-pay-amount-container"><?php echo st_order_price_format($order->getUnpaidAmount(), $order->getOrderCurrency()); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
61
apps/backend/modules/stOrder/templates/_user_data.php
Normal file
61
apps/backend/modules/stOrder/templates/_user_data.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php if(!$sf_user->getAttribute('edit_mode', false, 'soteshop/stOrder')): ?>
|
||||
<?php $culture = sfContext::getInstance()->getUser()->getCulture();?>
|
||||
<address class="st-order-user-data">
|
||||
<?php if($user_data->getCompany()): ?>
|
||||
<p>
|
||||
<?php echo $user_data->getCompany(); ?>
|
||||
</p>
|
||||
<?php endif;?>
|
||||
<p>
|
||||
<span class="st_order-address-name"><?php echo $user_data->getFullName(); ?></span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="st_order-address-street"><?php echo $user_data->getAddress(); ?></span><br>
|
||||
|
||||
<?php if($user_data->getAddressMore()): ?>
|
||||
<span class="st_order-address-street"><?php echo $user_data->getAddressMore(); ?></span><br>
|
||||
<?php endif;?>
|
||||
<?php if($user_data->getRegion()): ?>
|
||||
<span class="st_order-address-street"><?php echo $user_data->getRegion(); ?></span><br>
|
||||
<?php endif;?>
|
||||
<span class="st_order-address-code"><?php echo $user_data->getCode() ?></span>
|
||||
<span class="st_order-address-town"><?php echo $user_data->getTown() ?></span>
|
||||
<span class="st_order-address-country"><?php $user_data->getCountry()->setCulture($culture); echo $user_data->getCountry()->getName() ?></span>
|
||||
<?php if($user_data->getPesel()): ?>
|
||||
<br><span class="st_order-address-street"><?php echo __('PESEL') ?> <?php echo $user_data->getPesel() ?></span>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo $user_data->getPhone() ?>
|
||||
</p>
|
||||
<?php if($user_data->getVatNumber()): ?>
|
||||
<p>
|
||||
<?php if ($user_data->getHasValidVatEu()): ?>
|
||||
<?php echo __('VAT UE') ?>: <?php echo $user_data->getVatNumber() ?>
|
||||
<a class="help" target="_blank" title="<?php echo __('Numer VAT UE został zweryfikowany za pośrednictwem usługi VIES. Kliknij na ikonkę, aby przejść do informacji szczegółowych.') ?>" href="<?php echo stTaxVies::checkVatUrl($user_data->getVatNumber()) ?>" style="background: url(/images/backend/eu.png) no-repeat 0px 2px"></a>
|
||||
<?php else: ?>
|
||||
<?php echo __('NIP') ?>: <?php echo $user_data->getVatNumber() ?>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</address>
|
||||
<?php else: ?>
|
||||
<div class="st-order-user-data">
|
||||
<?php use_helper('Countries') ?>
|
||||
<?php echo st_admin_get_form_field('order[user_data]['.$type.'][company]', __('firma'), $user_data->getCompany(), 'input_tag', array('class' => 'st-responsive')) ?>
|
||||
<?php echo st_admin_get_form_field('order[user_data]['.$type.'][full_name]', __('imię i nazwisko'), $user_data->getFullName(), 'input_tag', array('class' => 'st-responsive')) ?>
|
||||
<?php echo st_admin_get_form_field('order[user_data]['.$type.'][address]', __('adres'), $user_data->getAddress(), 'input_tag', array('class' => 'st-responsive', 'required' => true)) ?>
|
||||
<?php echo st_admin_get_form_field('order[user_data]['.$type.'][address_more]', __('adres cd'), $user_data->getAddressMore(), 'input_tag', array('class' => 'st-responsive')) ?>
|
||||
<?php echo st_admin_get_form_field('order[user_data]['.$type.'][region]', __('województwo'), $user_data->getRegion(), 'input_tag', array('class' => 'st-responsive')) ?>
|
||||
<?php echo st_admin_get_form_field('order[user_data]['.$type.'][code_town]', __('kod, miasto'), $user_data, '_order_user_data_code_town', array('name' => 'order[user_data]['.$type.']', 'required' => true)) ?>
|
||||
<?php echo st_admin_get_form_field('order[user_data]['.$type.'][countries_id]', __('kraj'), $user_data->getCountry()->getId(), 'st_countries_select_tag', array('class' => 'st-responsive', 'required' => true)); ?>
|
||||
<?php if ($user_data instanceof OrderUserDataBilling): ?>
|
||||
<?php echo st_admin_get_form_field('order[user_data]['.$type.'][pesel]', __('pesel'), $user_data->getPesel(), 'input_tag', array('class' => 'st-responsive')) ?>
|
||||
<?php endif ?>
|
||||
<?php echo st_admin_get_form_field('order[user_data]['.$type.'][phone]', __('telefon'), $user_data->getPhone(), 'input_tag', array('class' => 'st-responsive')) ?>
|
||||
<?php if ($user_data instanceof OrderUserDataBilling): ?>
|
||||
<?php echo st_admin_get_form_field('order[user_data]['.$type.'][vat_number]', __('nip'), $user_data->getVatNumber(), 'input_tag', array('class' => 'st-responsive')) ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
9
apps/backend/modules/stOrder/templates/_user_info.php
Normal file
9
apps/backend/modules/stOrder/templates/_user_info.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class="st_order-user-data">
|
||||
<h3><?php echo __('Dane bilingowe') ?></h3>
|
||||
<?php st_include_partial('user_data', array('user_data' => $order->getOrderUserDataBilling(), 'type' => 'billing')); ?>
|
||||
</div>
|
||||
<div class="st_order-user-data">
|
||||
<h3><?php echo __('Dane dostawy') ?></h3>
|
||||
<?php st_include_partial('user_data', array('user_data' => $order->getOrderUserDataDelivery(), 'type' => 'delivery')); ?>
|
||||
</div>
|
||||
<br class="st_clear_all" />
|
||||
404
apps/backend/modules/stOrder/templates/orderStatusHtmlMail.php
Normal file
404
apps/backend/modules/stOrder/templates/orderStatusHtmlMail.php
Normal file
@@ -0,0 +1,404 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" style="margin: 0;padding: 0;font-family: Arial, sans-serif;">
|
||||
<head style="margin: 0;padding: 0;font-family: Arial, sans-serif;">
|
||||
<?php
|
||||
/**
|
||||
* @var Order $order
|
||||
*/
|
||||
?>
|
||||
<meta name="viewport" content="width=device-width" style="margin: 0;padding: 0;font-family: Arial, sans-serif;">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" style="margin: 0;padding: 0;font-family: Arial, sans-serif;">
|
||||
<title style="margin: 0;padding: 0;font-family: Arial, sans-serif;">ZURBemails</title>
|
||||
|
||||
<style style="margin: 0;padding: 0;font-family: Arial, sans-serif;">
|
||||
|
||||
/* -------------------------------------
|
||||
GLOBAL
|
||||
------------------------------------- */
|
||||
* {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
* { font-family: Arial, sans-serif; }
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
.collapse {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
body {
|
||||
-webkit-font-smoothing:antialiased;
|
||||
-webkit-text-size-adjust:none;
|
||||
width: 100%!important;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------
|
||||
ELEMENTS
|
||||
------------------------------------- */
|
||||
a { color: #<?php echo $mail_config->get('link_color'); ?>;}
|
||||
|
||||
.btn {
|
||||
text-decoration:none;
|
||||
color: #FFF;
|
||||
background-color: #666;
|
||||
padding:10px 16px;
|
||||
font-weight:bold;
|
||||
margin-right:10px;
|
||||
text-align:center;
|
||||
cursor:pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
p.callout {
|
||||
padding:15px;
|
||||
background-color:#ECF8FF;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.callout a {
|
||||
font-weight:bold;
|
||||
color: #2BA6CB;
|
||||
}
|
||||
|
||||
table.social {
|
||||
|
||||
background-color: #ebebeb;
|
||||
|
||||
}
|
||||
.social .soc-btn {
|
||||
padding: 3px 7px;
|
||||
font-size:12px;
|
||||
margin-bottom:10px;
|
||||
text-decoration:none;
|
||||
color: #FFF;font-weight:bold;
|
||||
display:block;
|
||||
text-align:center;
|
||||
}
|
||||
a.fb { background-color: #3B5998!important; }
|
||||
a.tw { background-color: #1daced!important; }
|
||||
a.gp { background-color: #DB4A39!important; }
|
||||
a.ms { background-color: #000!important; }
|
||||
|
||||
.sidebar .soc-btn {
|
||||
display:block;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
/* -------------------------------------
|
||||
HEADER
|
||||
------------------------------------- */
|
||||
table.head-wrap { width: 100%;}
|
||||
|
||||
.header.container table td.logo { padding: 15px; }
|
||||
.header.container table td.label { padding: 15px; padding-left:0px;}
|
||||
|
||||
|
||||
/* -------------------------------------
|
||||
BODY
|
||||
------------------------------------- */
|
||||
table.body-wrap { width: 100%;}
|
||||
|
||||
|
||||
/* -------------------------------------
|
||||
FOOTER
|
||||
------------------------------------- */
|
||||
table.footer-wrap { width: 100%; clear:both!important;
|
||||
}
|
||||
.footer-wrap .container td.content p { border-top: 1px solid rgb(215,215,215); padding-top:15px;}
|
||||
.footer-wrap .container td.content p {
|
||||
font-size:10px;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------
|
||||
TYPOGRAPHY
|
||||
------------------------------------- */
|
||||
h1,h2,h3,h4,h5,h6 {
|
||||
font-family: Arial, sans-serif; line-height: 1.1; margin-bottom:15px; color:#000;
|
||||
}
|
||||
h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-size: 60%; color: #6f6f6f; line-height: 0; text-transform: none; }
|
||||
|
||||
h1 { font-weight:200; font-size: 44px;}
|
||||
h2 { font-weight:200; font-size: 37px;}
|
||||
h3 { font-weight:500; font-size: 27px;}
|
||||
h4 { font-weight:500; font-size: 23px;}
|
||||
h5 { font-weight:900; font-size: 17px;}
|
||||
h6 { font-weight:900; font-size: 14px; text-transform: uppercase; color:#444;}
|
||||
|
||||
.collapse { margin:0!important;}
|
||||
|
||||
p, ul {
|
||||
margin-bottom: 10px;
|
||||
font-weight: normal;
|
||||
font-size:12px;
|
||||
line-height:1.6;
|
||||
}
|
||||
p.lead { font-size:17px; }
|
||||
p.last { margin-bottom:0px;}
|
||||
|
||||
ul li {
|
||||
margin-left:5px;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
/* -------------------------------------
|
||||
SIDEBAR
|
||||
------------------------------------- */
|
||||
ul.sidebar {
|
||||
background:#ebebeb;
|
||||
display:block;
|
||||
list-style-type: none;
|
||||
}
|
||||
ul.sidebar li { display: block; margin:0;}
|
||||
ul.sidebar li a {
|
||||
text-decoration:none;
|
||||
color: #666;
|
||||
padding:10px 16px;
|
||||
/* font-weight:bold; */
|
||||
margin-right:10px;
|
||||
/* text-align:center; */
|
||||
cursor:pointer;
|
||||
border-bottom: 1px solid #777777;
|
||||
border-top: 1px solid #FFFFFF;
|
||||
display:block;
|
||||
margin:0;
|
||||
}
|
||||
ul.sidebar li a.last { border-bottom-width:0px;}
|
||||
ul.sidebar li a h1,ul.sidebar li a h2,ul.sidebar li a h3,ul.sidebar li a h4,ul.sidebar li a h5,ul.sidebar li a h6,ul.sidebar li a p { margin-bottom:0!important;}
|
||||
|
||||
|
||||
|
||||
/* ---------------------------------------------------
|
||||
RESPONSIVENESS
|
||||
Nuke it from orbit. It's the only way to be sure.
|
||||
------------------------------------------------------ */
|
||||
|
||||
/* Set a max-width, and make it display as block so it will automatically stretch to that width, but will also shrink down on a phone or something */
|
||||
.container {
|
||||
display:block!important;
|
||||
max-width:600px!important;
|
||||
margin:0 auto!important; /* makes it centered */
|
||||
clear:both!important;
|
||||
}
|
||||
|
||||
/* This should also be a block element, so that it will fill 100% of the .container */
|
||||
.content {
|
||||
padding:15px;
|
||||
max-width:600px;
|
||||
margin:0 auto;
|
||||
display:block;
|
||||
}
|
||||
|
||||
/* Let's make sure tables in the content area are 100% wide */
|
||||
.content table { width: 100%; }
|
||||
|
||||
|
||||
/* Odds and ends */
|
||||
.column {
|
||||
width: 300px;
|
||||
float:left;
|
||||
}
|
||||
.social .column tr td { padding: 15px; }
|
||||
|
||||
.user_data .column tr td { padding-bottom: 15px; }
|
||||
|
||||
.column-wrap {
|
||||
padding:0!important;
|
||||
margin:0 auto;
|
||||
max-width:600px!important;
|
||||
}
|
||||
.column table { width:100%;}
|
||||
|
||||
.social .column {
|
||||
width: 280px;
|
||||
min-width: 279px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.user_data .column {
|
||||
width: 280px;
|
||||
min-width: 279px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
/* Be sure to place a .clear element after each set of columns, just to be safe */
|
||||
.clear { display: block; clear: both; }
|
||||
|
||||
|
||||
/* -------------------------------------------
|
||||
PHONE
|
||||
For clients that support media queries.
|
||||
Nothing fancy.
|
||||
-------------------------------------------- */
|
||||
@media only screen and (max-width: 600px) {
|
||||
|
||||
a[class="btn"] { display:block!important; margin-bottom:10px!important; background-image:none!important; margin-right:0!important;}
|
||||
|
||||
div[class="column"] { width: auto!important; float:none!important;}
|
||||
|
||||
table.social div[class="column"] {
|
||||
width:auto!important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" style="margin: 0;padding: 0;font-family: Arial, sans-serif;font-size: 12px;-webkit-font-smoothing: antialiased;-webkit-text-size-adjust: none;height: 100%;width: 100%!important;">
|
||||
|
||||
<!-- HEADER -->
|
||||
<table class="head-wrap" bgcolor="#<?php echo $mail_config->get('bg_header_color'); ?>" style="margin: 0;padding: 0;font-family: Arial, sans-serif;font-size: 12px;width: 100%;">
|
||||
<tr style="margin: 0;padding: 0;font-family: Arial, sans-serif;font-size: 12px;">
|
||||
<td style="margin: 0;padding: 0;font-family: Arial, sans-serif;font-size: 12px;"></td>
|
||||
<td class="header container" style="margin: 0 auto!important;padding: 0;font-family: Arial, sans-serif;font-size: 12px;display: block!important;max-width: 600px!important;clear: both!important;">
|
||||
|
||||
<div class="content" style="margin: 0 auto;padding: 15px;font-family: Arial, sans-serif;font-size: 12px;max-width: 600px;display: block;">
|
||||
<table bgcolor="#<?php echo $mail_config->get('bg_header_color'); ?>" style="margin: 0;padding: 0;font-family: Arial, sans-serif;font-size: 12px;width: 100%;">
|
||||
<tr style="margin: 0;padding: 0;font-family: Arial, sans-serif;font-size: 12px;">
|
||||
<td style="margin: 0;padding: 0;font-family: Arial, sans-serif;font-size: 12px;"><?php if ($mail_config->get('logo')!=""): ?><img src="http://<?php echo $sf_request->getHost(); ?>/uploads<?php echo $mail_config->get('logo'); ?>?version=1" style="margin: 0;padding: 0;font-family: Arial, sans-serif;font-size: 12px;max-width: 100%; max-height: 50px;"><?php endif; ?></td>
|
||||
<td align="right" style="margin: 0;padding: 0;font-family: Arial, sans-serif;"><h6 class="collapse" style="margin: 0!important;padding: 0;font-family: "helveticaneue-light": ;, ": ;helvetica neue light": ;helvetica neue": ;, helvetica, arial, ": ;lucida grande": ;, sans-serif: ;line-height: 1.1;margin-bottom: 15px;color: #444;font-weight: 900;font-size: 14px;text-transform: uppercase;"><?php echo date('d-m-Y H:i'); ?></h6></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td style="margin: 0;padding: 0;font-family: Arial, sans-serif;"></td>
|
||||
</tr>
|
||||
</table><!-- /HEADER -->
|
||||
|
||||
|
||||
<!-- BODY -->
|
||||
<table class="body-wrap" cellpadding="0" cellspacing="0" style="margin: 0;padding: 0;font-family: Arial, sans-serif;width: 100%;">
|
||||
<tr style="margin: 0;padding: 0;font-family: Arial, sans-serif;">
|
||||
<td style="margin: 0;padding: 0;font-family: Arial, sans-serif;"></td>
|
||||
<td class="container" bgcolor="#FFFFFF" style="margin: 0 auto!important;padding: 0;font-family: Arial, sans-serif;display: block!important;max-width: 600px!important;clear: both!important;">
|
||||
|
||||
<div class="content" style="margin: 0 auto;padding: 15px;font-family: Arial, sans-serif;max-width: 600px;display: block;">
|
||||
<table cellpadding="0" cellspacing="0" style="margin: 0;padding: 0;font-family: Arial, sans-serif;width: 100%;">
|
||||
<tr style="margin: 0;padding: 0;font-family: Arial, sans-serif;">
|
||||
<td style="margin: 0;padding: 0;font-family: Arial, sans-serif;">
|
||||
<p style="font-size: 12px;margin: 0;padding: 0;font-family: Arial, sans-serif;margin-bottom: 10px;font-weight: normal;line-height: 1.6;"><?php echo $head; ?></p>
|
||||
|
||||
<h4 style="margin: 0;padding: 0;font-family: "helveticaneue-light": ;, ": ;helvetica neue light": ;helvetica neue": ;, helvetica, arial, ": ;lucida grande": ;, sans-serif: ;line-height: 1.1;margin-bottom: 15px;color: #000;font-weight: 500;font-size: 23px;"><?php echo __('Zamówienie numer:') ?> <?php echo $order->getNumber(); ?></h4>
|
||||
|
||||
<div style="font-size:12px; color:#576278;">
|
||||
<?php echo __('Data złożenia zamówienia:') ?><span style="color:#404040; padding-left: 5px"><?php echo $order->getCreatedAt(); ?><span>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<p style="font-size: 12px;margin: 0;padding: 0;font-family: Arial, sans-serif;margin-bottom: 10px;font-weight: normal;line-height: 1.6;"><?php echo $head_content; ?></p>
|
||||
|
||||
<div>
|
||||
|
||||
<?php if(!$order->isAllegroOrder() && $order->getOrderDelivery()->getNumber()): ?>
|
||||
<?php foreach ($order->getOrderDelivery()->getNumbers() as $number): ?>
|
||||
<p style="margin-bottom: 15px;">
|
||||
<span style="font-size:12px; color:#576278;">
|
||||
<?php echo __('Numer przesyłki:'); ?> <b><?php echo $number ?></b>
|
||||
|
||||
<?php if($order->getOrderDelivery()->getTrackingUrl($number)): ?>
|
||||
<a href="<?php echo $order->getOrderDelivery()->getTrackingUrl($number) ?>"><?php echo __('Sprawdź status dostawy', null, 'stDeliveryBackend') ?></a>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</p>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (!$order->isAllegroOrder() && $order->getOrderStatus()->getHasInvoiceProforma()==1): ?>
|
||||
<p style="margin-bottom: 15px;">
|
||||
<span style="font-size:12px; color:#576278;"><?php echo st_link_to(__('Pobierz fakturę proforma'), 'stOrder/downloadInvoice?id='.$order->getId().'&hash_code='.$order->getHashCode().'&proforma=1', array('absolute' => true, 'for_app' => 'frontend', 'for_lang' => $order->getClientCulture())) ?></span>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$order->isAllegroOrder() && $order->getOrderStatus()->getHasInvoice()==1 && $send_link == 1): ?>
|
||||
<p style="margin-bottom: 15px;">
|
||||
<span style="font-size:12px; color:#576278;"><?php echo st_link_to(__('Pobierz fakturę'), 'stOrder/downloadInvoice?id='.$order->getId().'&hash_code='.$order->getHashCode().'&proforma=0', array('absolute' => true, 'for_app' => 'frontend')) ?></span>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $color_link = "color:#".$mail_config->get('bg_action_link_color'); ?>
|
||||
<p class="callout" style="text-align: center;margin: 0;padding: 15px;font-family: Arial, sans-serif;font-size: 12px;margin-bottom: 15px;font-weight: normal;line-height: 1.6;background-color: #<?php echo $mail_config->get('bg_action_color'); ?>;">
|
||||
<span style="font-size:12px;"><?php echo st_link_to(__('Przejdź do zamówienia'), !$order->isAllegroOrder() ? 'stOrder/show?id='.$order->getId().'&hash_code='.$order->getHashCode() : stAllegroApi::getOrderUrl($order->getOptAllegroCheckoutFormId()), array('style' => $color_link, 'absolute' => true, 'for_app' => 'frontend', 'for_lang' => $order->getClientCulture())) ?></span>
|
||||
</p><!-- /Callout Panel -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<div style="margin:10px 0px 7px 0px">
|
||||
|
||||
<div style="font-family:Verdana,Arial,Helvetica,sans-serif; line-height:18px; font-size:10px;">
|
||||
<?php echo $order->getOrderStatus()->getDescription(); ?>
|
||||
</div>
|
||||
|
||||
|
||||
<?php if ($coupon_code): ?>
|
||||
<br/>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" width="300" style="margin:0px auto;">
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="#576278" style="color:#fff;" align="center"><b><?php echo __('Kod rabatowy') ?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" align="right" bgcolor="#F0F4F7">
|
||||
<span style="font-family:Verdana,Arial,Helvetica,sans-serif; line-height:18px; font-size:12px;"><?php echo __('Kod') ?>:</span>
|
||||
</td>
|
||||
<td width="150" style="padding-left:5px;" bgcolor="#F0F4F7">
|
||||
<b><?php echo $coupon_code->getCode() ?></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#F0F4F7" align="right" style="font-family:Verdana,Arial,Helvetica,sans-serif; line-height:18px; font-size:12px;"><?php echo __('Rabat') ?>:</td>
|
||||
<td bgcolor="#F0F4F7" style="padding-left:5px;"><b><?php echo $coupon_code->getDiscount(); ?>%</b></td>
|
||||
</tr>
|
||||
<?php if ($coupon_code->getValidTo()): ?>
|
||||
<tr>
|
||||
<td bgcolor="#F0F4F7" align="right" style="font-family:Verdana,Arial,Helvetica,sans-serif; line-height:18px; font-size:12px;"><?php echo __('Ważny do') ?>:</td>
|
||||
<td bgcolor="#F0F4F7" style="padding-left:5px; font-family:Verdana,Arial,Helvetica,sans-serif; line-height:18px; font-size:12px;"><b><?php echo $coupon_code->getValidTo('d-m-Y H:i') ?></b></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div style="font-family:Verdana,Arial,Helvetica,sans-serif; line-height:18px; font-size:12px;">
|
||||
<?php echo $foot_content; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- social & contact -->
|
||||
<table class="social" width="100%" style="margin: 0;padding: 0;font-family: Arial, sans-serif;background-color: #<?php echo $mail_config->get('bg_footer_color'); ?>;width: 100%;">
|
||||
<tr style="margin: 0;padding: 0;font-family: Arial, sans-serif;">
|
||||
<td style="font-size: 12px;margin: 0;padding: 0;font-family: Arial, sans-serif;">
|
||||
<?php echo $foot; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table><!-- /social & contact -->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /content -->
|
||||
|
||||
</td>
|
||||
<td style="margin: 0;padding: 0;font-family: Arial, sans-serif;"></td>
|
||||
</tr>
|
||||
</table><!-- /BODY -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
use_helper('stCurrency');
|
||||
/**
|
||||
* @package stOrder
|
||||
*/
|
||||
?>
|
||||
<?php echo __('Data złożenia zamówienia:') ?> <?php echo $order->getCreatedAt(); ?>
|
||||
|
||||
<?php echo __('Zamówienie numer:') ?> <?php echo $order->getNumber(); ?>
|
||||
|
||||
<?php echo $head_content ?>
|
||||
|
||||
<?php echo $order->getOrderStatus()->getDescription(); ?>
|
||||
|
||||
<?php if (!$order->isAllegroOrder() && $order->getOrderStatus()->getHasInvoiceProforma()==1): ?>
|
||||
<?php echo st_link_to(__('Pobierz fakturę proforma'), 'stOrder/downloadInvoice?id='.$order->getId().'&hash_code='.$order->getHashCode().'&proforma=1', array('absolute' => true, 'for_app' => 'frontend', 'for_lang' => $order->getClientCulture())) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$order->isAllegroOrder() && $order->getOrderStatus()->getHasInvoice()==1 && $send_link == 1): ?>
|
||||
<?php echo st_link_to(__('Pobierz fakturę'), 'stOrder/downloadInvoice?id='.$order->getId().'&hash_code='.$order->getHashCode().'&proforma=0', array('absolute' => true, 'for_app' => 'frontend', 'for_lang' => $order->getClientCulture())) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($coupon_code): ?>
|
||||
<?php echo __('Kod rabatowy') ?>
|
||||
|
||||
<?php echo __('Kod') ?>: <?php echo $coupon_code->getCode() ?>
|
||||
|
||||
<?php echo __('Rabat') ?>: <?php echo $coupon_code->getDiscount().'%' ?>
|
||||
|
||||
<?php echo __('Ważny do') ?>: <?php echo $coupon_code->getValidTo('d-m-Y H:i') ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo __('Przejdź do zamówienia') ?>: <?php echo !$order->isAllegroOrder() ? st_url_for('stOrder/show?id='.$order->getId().'&hash_code='.$order->getHashCode(), true) : stAllegroApi::getOrderUrl($order->getOptAllegroCheckoutFormId()) ?>
|
||||
Reference in New Issue
Block a user