diff --git a/admin-dev/themes/template/orders/_customized_data.tpl b/admin-dev/themes/template/orders/_customized_data.tpl index 139298c9e..d1fc80a64 100755 --- a/admin-dev/themes/template/orders/_customized_data.tpl +++ b/admin-dev/themes/template/orders/_customized_data.tpl @@ -38,7 +38,7 @@ {if ($order->hasBeenDelivered())}{$product['customizationQuantityReturned']}{/if} - - {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())}{$customization['quantity_returned']}{/if} - - {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} diff --git a/admin-dev/themes/template/orders/_product_line.tpl b/admin-dev/themes/template/orders/_product_line.tpl index cd0ee33c9..3d6416da5 100755 --- a/admin-dev/themes/template/orders/_product_line.tpl +++ b/admin-dev/themes/template/orders/_product_line.tpl @@ -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']} diff --git a/admin-dev/themes/template/orders/view.tpl b/admin-dev/themes/template/orders/view.tpl index dc35bf19c..009f745cf 100755 --- a/admin-dev/themes/template/orders/view.tpl +++ b/admin-dev/themes/template/orders/view.tpl @@ -141,7 +141,7 @@ {foreach from=$sources item=source}
  • {dateFormat date=$source['date_add'] full=true}
    - {l s='From:'} {parse_url($source['http_referer'], PHP_URL_HOST)|regex_replace:'/^www./':''}
    + {l s='From:'} {parse_url($source['http_referer'], $smarty.const.PHP_URL_HOST)|regex_replace:'/^www./':''}
    {l s='To:'} {$source['request_uri']}
    {if $source['keywords']}{l s='Keywords:'} {$source['keywords']}
    {/if}
  • @@ -159,7 +159,7 @@
    {if (($currentState->invoice OR $order->invoice_number) AND count($products))} {l s='Invoice'} - {l s='Invoice #'}{$PS_INVOICE_PREFIX}{"%06d"|sprintf:$order->invoice_number} + {l s='Invoice #'}{Configuration::get('PS_INVOICE_PREFIX', $id_lang)}{"%06d"|sprintf:$order->invoice_number}
    {l s='Created on:'} {dateFormat date=$order->invoice_date full=true} {else} {l s='Invoice'} @@ -170,11 +170,11 @@
    {l s='Shipping information'} - {l s='Total weight:'} {$order->getTotalWeight()|string_format:"%.3f"} {$PS_WEIGHT_UNIT}
    - {l s='Carrier:'} {if $carrier->name == '0'}{$PS_SHOP_NAME}{else}{$carrier->name}{/if}
    + {l s='Total weight:'} {$order->getTotalWeight()|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}
    + {l s='Carrier:'} {if $carrier->name == '0'}{Configuration::get('PS_SHOP_NAME')}{else}{$carrier->name}{/if}
    {if ($currentState->delivery || $order->delivery_number)} -
    {l s='Delivery slip #'}{$PS_DELIVERY_PREFIX}{"%06d"|sprintf:$order->delivery_number}
    +
    {l s='Delivery slip #'}{Configuration::get('PS_DELIVERY_PREFIX', $id_lang)}{"%06d"|sprintf:$order->delivery_number}
    {/if} {if $order->shipping_number} @@ -327,7 +327,7 @@
    * {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.'} diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 0fed5cacc..5a3a97282 100755 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -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 diff --git a/controllers/front/OrderDetailController.php b/controllers/front/OrderDetailController.php index e7cb82496..b1572cc21 100644 --- a/controllers/front/OrderDetailController.php +++ b/controllers/front/OrderDetailController.php @@ -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))); diff --git a/themes/prestashop/order-detail.tpl b/themes/prestashop/order-detail.tpl index 10468b1f4..ac8f4e05b 100644 --- a/themes/prestashop/order-detail.tpl +++ b/themes/prestashop/order-detail.tpl @@ -94,10 +94,10 @@ {elseif $field_item eq "address2" && $address_invoice->address2}
  • {$address_invoice->address2|escape:'htmlall':'UTF-8'}
  • {elseif $field_item eq "phone_mobile" && $address_invoice->phone_mobile}
  • {$address_invoice->phone_mobile|escape:'htmlall':'UTF-8'}
  • {else} - {assign var=address_words value=" "|explode:$field_item} + {assign var=address_words value=" "|explode:$field_item}
  • {foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$invoiceAddressFormatedValues[$word_item]|escape:'htmlall':'UTF-8'}{/foreach}
  • {/if} - + {/foreach}
      @@ -107,7 +107,7 @@ {elseif $field_item eq "address2" && $address_delivery->address2}
    • {$address_delivery->address2|escape:'htmlall':'UTF-8'}
    • {elseif $field_item eq "phone_mobile" && $address_delivery->phone_mobile}
    • {$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}
    • {else} - {assign var=address_words value=" "|explode:$field_item} + {assign var=address_words value=" "|explode:$field_item}
    • {foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$deliveryAddressFormatedValues[$word_item]|escape:'htmlall':'UTF-8'}{/foreach}
    • {/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} - {if isset($customizedDatas.$productId.$productAttributeId)} + {if isset($product.customizedDatas)} {if $return_allowed}{/if} @@ -210,7 +210,7 @@ - {foreach from=$customizedDatas.$productId.$productAttributeId item='customization' key='customizationId'} + {foreach from=$product.customizedDatas item='customization' key='customizationId'} {if $return_allowed}{/if}