// bug fix on new AdminOrders + optimization
[~] FO : usage of $customizedDatas var in order-detail.tpl is now deprecated use $product.customizedDatas git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9589 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
{if ($order->hasBeenDelivered())}<td align="center" class="productQuantity">{$product['customizationQuantityReturned']}</td>{/if}
|
||||
<td align="center" class="productQuantity"> - </td>
|
||||
<td align="center">
|
||||
{if ($order->getTaxCalculationMethod() == PS_TAX_EXC)}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{displayPrice price=Tools::ps_round($product['product_price'] * $product['customizationQuantityTotal'], 2) currency=$currency->id}
|
||||
{else}
|
||||
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $product['customizationQuantityTotal'], 2) currency=$currency->id}
|
||||
@@ -73,7 +73,7 @@
|
||||
{if ($order->hasBeenDelivered())}<td align="center">{$customization['quantity_returned']}</td>{/if}
|
||||
<td align="center">-</td>
|
||||
<td align="center">
|
||||
{if ($order->getTaxCalculationMethod() == PS_TAX_EXC)}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{displayPrice price=Tools::ps_round($product['product_price'] * $customization['quantity'], 2) currency=$currency->id}
|
||||
{else}
|
||||
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $customization['quantity'], 2) currency=$currency->id}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*}
|
||||
|
||||
{* Assign product price *}
|
||||
{if ($order->getTaxCalculationMethod() == PS_TAX_EXC)}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{assign var=product_price value=($product['product_price'] + $product['ecotax'])}
|
||||
{else}
|
||||
{assign var=product_price value=$product['product_price_wt']}
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
{foreach from=$sources item=source}
|
||||
<li>
|
||||
{dateFormat date=$source['date_add'] full=true}<br />
|
||||
<b>{l s='From:'}</b> <a href="{$source['http_referer']}">{parse_url($source['http_referer'], PHP_URL_HOST)|regex_replace:'/^www./':''}</a><br />
|
||||
<b>{l s='From:'}</b> <a href="{$source['http_referer']}">{parse_url($source['http_referer'], $smarty.const.PHP_URL_HOST)|regex_replace:'/^www./':''}</a><br />
|
||||
<b>{l s='To:'}</b> {$source['request_uri']}<br />
|
||||
{if $source['keywords']}<b>{l s='Keywords:'}</b> {$source['keywords']}<br />{/if}<br />
|
||||
</li>
|
||||
@@ -159,7 +159,7 @@
|
||||
<fieldset style="width: 400px">
|
||||
{if (($currentState->invoice OR $order->invoice_number) AND count($products))}
|
||||
<legend><a href="pdf.php?id_order={$order->id}&pdf"><img src="../img/admin/charged_ok.gif" /> {l s='Invoice'}</a></legend>
|
||||
<a href="pdf.php?id_order={$order->id}&pdf">{l s='Invoice #'}<b>{$PS_INVOICE_PREFIX}{"%06d"|sprintf:$order->invoice_number}</b></a>
|
||||
<a href="pdf.php?id_order={$order->id}&pdf">{l s='Invoice #'}<b>{Configuration::get('PS_INVOICE_PREFIX', $id_lang)}{"%06d"|sprintf:$order->invoice_number}</b></a>
|
||||
<br />{l s='Created on:'} {dateFormat date=$order->invoice_date full=true}
|
||||
{else}
|
||||
<legend><img src="../img/admin/charged_ko.gif" /> {l s='Invoice'}</legend>
|
||||
@@ -170,11 +170,11 @@
|
||||
|
||||
<fieldset style="width:400px">
|
||||
<legend><img src="../img/admin/delivery.gif" /> {l s='Shipping information'}</legend>
|
||||
{l s='Total weight:'} <b>{$order->getTotalWeight()|string_format:"%.3f"} {$PS_WEIGHT_UNIT}</b><br />
|
||||
{l s='Carrier:'} <b>{if $carrier->name == '0'}{$PS_SHOP_NAME}{else}{$carrier->name}{/if}</b><br />
|
||||
{l s='Total weight:'} <b>{$order->getTotalWeight()|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}</b><br />
|
||||
{l s='Carrier:'} <b>{if $carrier->name == '0'}{Configuration::get('PS_SHOP_NAME')}{else}{$carrier->name}{/if}</b><br />
|
||||
|
||||
{if ($currentState->delivery || $order->delivery_number)}
|
||||
<br /><a href="pdf.php?id_delivery={$order->delivery_number}">{l s='Delivery slip #'}<b>{$PS_DELIVERY_PREFIX}{"%06d"|sprintf:$order->delivery_number}</b></a><br />
|
||||
<br /><a href="pdf.php?id_delivery={$order->delivery_number}">{l s='Delivery slip #'}<b>{Configuration::get('PS_DELIVERY_PREFIX', $id_lang)}{"%06d"|sprintf:$order->delivery_number}</b></a><br />
|
||||
{/if}
|
||||
|
||||
{if $order->shipping_number}
|
||||
@@ -327,7 +327,7 @@
|
||||
|
||||
<div style="float:left; width:280px; margin-top:15px;">
|
||||
<sup>*</sup> {l s='According to the group of this customer, prices are printed:'}
|
||||
{if ($order->getTaxCalculationMethod() == PS_TAX_EXC)}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{l s='tax excluded.'}
|
||||
{else}
|
||||
{l s='tax included.'}
|
||||
|
||||
@@ -512,10 +512,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'currentIndex' => self::$currentIndex,
|
||||
'carrierModuleCall' => $carrier_module_call,
|
||||
'iso_code_lang' => $this->context->language->iso_code,
|
||||
'PS_INVOICE_PREFIX' => Configuration::get('PS_INVOICE_PREFIX', $this->context->language->id),
|
||||
'PS_WEIGHT_UNIT' => Configuration::get('PS_WEIGHT_UNIT'),
|
||||
'PS_SHOP_NAME' => Configuration::get('PS_SHOP_NAME'),
|
||||
'PS_DELIVERY_PREFIX' => Configuration::get('PS_DELIVERY_PREFIX', $this->context->language->id)
|
||||
'id_lang' => $this->context->language->id
|
||||
));
|
||||
|
||||
// Assign Hook
|
||||
|
||||
@@ -147,6 +147,7 @@ class OrderDetailControllerCore extends FrontController
|
||||
$this->context->smarty->assign('total_old', (float)($order->total_paid - $order->total_discounts));
|
||||
$products = $order->getProducts();
|
||||
|
||||
/* DEPRECATED: customizedDatas @since 1.5 */
|
||||
$customizedDatas = Product::getAllCustomizedDatas((int)($order->id_cart));
|
||||
Product::addCustomizationPrice($products, $customizedDatas);
|
||||
|
||||
@@ -175,11 +176,14 @@ class OrderDetailControllerCore extends FrontController
|
||||
'is_guest' => false,
|
||||
'messages' => CustomerMessage::getMessagesByOrderId((int)($order->id), false),
|
||||
'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE,
|
||||
'CUSTOMIZE_TEXTFIELD' => _CUSTOMIZE_TEXTFIELD_,
|
||||
'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD,
|
||||
'isRecyclable' => Configuration::get('PS_RECYCLABLE_PACK'),
|
||||
'use_tax' => Configuration::get('PS_TAX'),
|
||||
'group_use_tax' => (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC),
|
||||
'customizedDatas' => $customizedDatas));
|
||||
/* DEPRECATED: customizedDatas @since 1.5 */
|
||||
'customizedDatas' => $customizedDatas
|
||||
/* DEPRECATED: customizedDatas @since 1.5 */
|
||||
));
|
||||
if ($carrier->url && $order->shipping_number)
|
||||
$this->context->smarty->assign('followup', str_replace('@', $order->shipping_number, $carrier->url));
|
||||
$this->context->smarty->assign('HOOK_ORDERDETAILDISPLAYED', Module::hookExec('orderDetailDisplayed', array('order' => $order)));
|
||||
|
||||
@@ -94,10 +94,10 @@
|
||||
{elseif $field_item eq "address2" && $address_invoice->address2}<li class="address_address2">{$address_invoice->address2|escape:'htmlall':'UTF-8'}</li>
|
||||
{elseif $field_item eq "phone_mobile" && $address_invoice->phone_mobile}<li class="address_phone_mobile">{$address_invoice->phone_mobile|escape:'htmlall':'UTF-8'}</li>
|
||||
{else}
|
||||
{assign var=address_words value=" "|explode:$field_item}
|
||||
{assign var=address_words value=" "|explode:$field_item}
|
||||
<li>{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}<span class="address_{$word_item}">{$invoiceAddressFormatedValues[$word_item]|escape:'htmlall':'UTF-8'}</span>{/foreach}</li>
|
||||
{/if}
|
||||
|
||||
|
||||
{/foreach}
|
||||
</ul>
|
||||
<ul class="address alternate_item {if $order->isVirtual()}full_width{/if}">
|
||||
@@ -107,7 +107,7 @@
|
||||
{elseif $field_item eq "address2" && $address_delivery->address2}<li class="address_address2">{$address_delivery->address2|escape:'htmlall':'UTF-8'}</li>
|
||||
{elseif $field_item eq "phone_mobile" && $address_delivery->phone_mobile}<li class="address_phone_mobile">{$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}</li>
|
||||
{else}
|
||||
{assign var=address_words value=" "|explode:$field_item}
|
||||
{assign var=address_words value=" "|explode:$field_item}
|
||||
<li>{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}<span class="address_{$word_item}">{$deliveryAddressFormatedValues[$word_item]|escape:'htmlall':'UTF-8'}</span>{/foreach}</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
@@ -169,13 +169,13 @@
|
||||
{if !isset($product.deleted)}
|
||||
{assign var='productId' value=$product.product_id}
|
||||
{assign var='productAttributeId' value=$product.product_attribute_id}
|
||||
{if isset($customizedDatas.$productId.$productAttributeId)}
|
||||
{if isset($product.customizedDatas)}
|
||||
{assign var='productQuantity' value=$product.product_quantity-$product.customizationQuantityTotal}
|
||||
{else}
|
||||
{assign var='productQuantity' value=$product.product_quantity}
|
||||
{/if}
|
||||
<!-- Customized products -->
|
||||
{if isset($customizedDatas.$productId.$productAttributeId)}
|
||||
{if isset($product.customizedDatas)}
|
||||
<tr class="item">
|
||||
{if $return_allowed}<td class="order_cb"></td>{/if}
|
||||
<td><label for="cb_{$product.id_order_detail|intval}">{if $product.product_reference}{$product.product_reference|escape:'htmlall':'UTF-8'}{else}--{/if}</label></td>
|
||||
@@ -210,7 +210,7 @@
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
{foreach from=$customizedDatas.$productId.$productAttributeId item='customization' key='customizationId'}
|
||||
{foreach from=$product.customizedDatas item='customization' key='customizationId'}
|
||||
<tr class="alternate_item">
|
||||
{if $return_allowed}<td class="order_cb"><input type="checkbox" id="cb_{$product.id_order_detail|intval}" name="customization_ids[{$product.id_order_detail|intval}][]" value="{$customizationId|intval}" /></td>{/if}
|
||||
<td colspan="2">
|
||||
|
||||
Reference in New Issue
Block a user