elainelow Posted April 3, 2018 Share Posted April 3, 2018 Not too sure where to classify this so here we go! Currently using: PrestaShop 1.7.2.2 In my website, all carriers have been marked to have Free Shipping with no handling charge because customers will only need to pay the shipping fee to the courier when they have received their goods. However, when customers view details of their transactions in their order history in their account, they will see Shipping & Handling: Free Therefore, in order-detail.tpl, I have attempted to change {$line.shipping_cost} to {l s= "<text>"}, but it has not worked. I have also changed the translation for 'Free' from the admin panel to <text>, but it has not worked either. Any idea why? Link to comment Share on other sites More sharing options...
yigitmcgrady Posted November 3, 2018 Share Posted November 3, 2018 Hi, i have a same issue, you solved this problem? Link to comment Share on other sites More sharing options...
xwvth Posted March 28, 2019 Share Posted March 28, 2019 \src\Adapter\Order\OrderPresenter.php change $cart = new Cart($order->id_cart); if (!$cart->isVirtualCart()) { $shippingCost = $includeTaxes ? $order->total_shipping_tax_incl : $order->total_shipping_tax_excl; $subtotals['shipping'] = array( 'type' => 'shipping', 'label' => $this->translator->trans('Shipping and handling', array(), 'Shop.Theme.Checkout'), 'amount' => $shippingCost, 'value' => $shippingCost != 0 ? $this->priceFormatter->format($shippingCost, Currency::getCurrencyInstance((int)$order->id_currency)) : $this->translator->trans('Free', array(), 'Shop.Theme.Checkout'), ); } to $cart = new Cart($order->id_cart); if (!$cart->isVirtualCart()) Link to comment Share on other sites More sharing options...
pegasus6464 Posted March 2, 2020 Share Posted March 2, 2020 i have a question, can i change this tpl and insert the words "TO CALCULATE" in the email order confirmation ? SHIPPING AND HANDLING: "TO CALCULATE" THANKS! Link to comment Share on other sites More sharing options...
Szymon88 Posted June 8, 2021 Share Posted June 8, 2021 On 3/28/2019 at 2:34 PM, xwvth said: \src\Adapter\Order\OrderPresenter.php change $cart = new Cart($order->id_cart); if (!$cart->isVirtualCart()) { $shippingCost = $includeTaxes ? $order->total_shipping_tax_incl : $order->total_shipping_tax_excl; $subtotals['shipping'] = array( 'type' => 'shipping', 'label' => $this->translator->trans('Shipping and handling', array(), 'Shop.Theme.Checkout'), 'amount' => $shippingCost, 'value' => $shippingCost != 0 ? $this->priceFormatter->format($shippingCost, Currency::getCurrencyInstance((int)$order->id_currency)) : $this->translator->trans('Free', array(), 'Shop.Theme.Checkout'), ); } to $cart = new Cart($order->id_cart); if (!$cart->isVirtualCart()) In latest version of Prestashop you can find this code in file: /src/Adapter/Presenter/OrderOrderSubtotalLazyArray.php Link to comment Share on other sites More sharing options...
shikotak Posted January 4, 2023 Share Posted January 4, 2023 Hi, My Prestashop version is 1.7.8.6 and I couldn't find this code in suggested route. Can anyone help me to find the correct file and change the code? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted January 5, 2023 Share Posted January 5, 2023 Kindly replace the below code in "themes\{Your-theme}\templates\customer\_partials\order-detail-no-return.tpl" and "themes\{Your-theme}\templates\customer\_partials\order-detail-return" <td>{$line.value}</td> with {if $line.type eq "shipping"} <td>{Your Text}</td> {else} <td>{$line.value}</td> {/if} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now