BlackEdition Posted May 19, 2017 Share Posted May 19, 2017 (edited) Hi, I've been playing around with Prestashop for months and I always do new installations, test things, and google issues that I face to educate myself. I've been doing it for so long that now I know how Prestashop works in almost every way except I'm not good at coding. I keep facing problems that stops me from finally finishing up my store and launching officially. 2 days ago I noticed a problem when I process and add a tracking number to a new order. When the customers goes to his order details (in front office) the tracking number appears like this, which doesn't seem normal and should be fixed: It should either display the tracking number itself, or the number with a link code that takes you to the carrier's website. I'm also sure that my carrier settings are configured correctly: I'm using Prestashop 1.7.1.1 with a compatible theme. I thought the issue could be related to the theme itself, so I switched to the default theme but the problem still exists. I processed the order as follows (does it matter what steps to process the order?): 1- First default order status for this payment is "Awaiting bank wire payment". 2- I manually marked the order as "Payment accepted". 3- I marked the order as shipped. 4- I added the tracking number by using a scanner and scanning a barcode. Not sure what is causing this? Is this a bug in PS1.7 or is it something related to my files only? I've been doing new installations forever and I'm too tired to do a fresh installation just to test this one thing. Please help. Edited May 19, 2017 by BlackEdition (see edit history) Link to comment Share on other sites More sharing options...
BlackEdition Posted May 21, 2017 Author Share Posted May 21, 2017 (edited) I did a fresh installation of Prestashop 1.7.1.1 and 1.6.1.7 without themes or modifying anything except configuring my carrier settings (to make sure everything stays at default settings) and the problem still exists with 1.7.1.1 but it doesn't happen on 1.6.1.7: This needs to be fixed. I can't believe no one has talked about this before? in order to have a professional website, you need to have a perfect looking website, and most importantly, a functioning one. Please help me! Im pretty sure fixing this is very easy for an expert. Edited May 21, 2017 by BlackEdition (see edit history) Link to comment Share on other sites More sharing options...
BlackEdition Posted May 22, 2017 Author Share Posted May 22, 2017 I think the problem is somewhere in this file _shipping.tpl (admin/themes/default/template/controllers/orders) {foreach from=$order->getShipping() item=line} <tr> <td>{dateFormat date=$line.date_add full=true}</td> <td> </td> <td>{$line.carrier_name}</td> <td class="weight">{$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}</td> <td class="price_carrier_{$line.id_carrier|intval}" class="center"> <span> {if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC} {displayPrice price=$line.shipping_cost_tax_incl currency=$currency->id} {else} {displayPrice price=$line.shipping_cost_tax_excl currency=$currency->id} {/if} </span> </td> <td> <span class="shipping_number_show">{if $line.url && $line.tracking_number}<a class="_blank" href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{else}{$line.tracking_number}{/if}</span> </td> <td> {if $line.can_edit} <a href="#" class="edit_shipping_link btn btn-default" data-id-order-carrier="{$line.id_order_carrier|intval}" data-id-carrier="{$line.id_carrier|intval}" data-tracking-number="{$line.tracking_number|htmlentities}" > <i class="icon-pencil"></i> {l s='Edit' d='Admin.Actions'} Is the problem here or not? please help me. Link to comment Share on other sites More sharing options...
BlackEdition Posted May 22, 2017 Author Share Posted May 22, 2017 Ok it's not that file because that's related to the back office. This is why I need help. Link to comment Share on other sites More sharing options...
BlackEdition Posted October 3, 2017 Author Share Posted October 3, 2017 Problem still exists in PS1.7.2.2 any help? Link to comment Share on other sites More sharing options...
BlackEdition Posted October 8, 2017 Author Share Posted October 8, 2017 Anyone? Link to comment Share on other sites More sharing options...
BlackEdition Posted October 25, 2017 Author Share Posted October 25, 2017 On 10/9/2017 at 3:55 PM, horiatb said: Actually, the file is themes/classic/templates/customer/order-detail.php The problem is I cannot understand why is the link displayed in plain text, as it doesn't seem to be anything wrong in the file or the html page source. However, I did managed to solve the problem by changing two lines in this file: themes/classic/templates/customer/order-detail.php ---------------------------------------------------- line: 178 replace all line with <td><a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a></td> line: 200 replace all line with <strong>{l s='Tracking number' d='Shop.Theme.Checkout'}</strong> <a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a> Hi, Sorry I forgot about this thread and I just noticed your reply. I did exactly what you said ant it worked perfectly! thank you very much. Is this officially a bug in Prestashop that they don't know about? if not then what's happening? Link to comment Share on other sites More sharing options...
Host Posted November 1, 2017 Share Posted November 1, 2017 Thank you very much horiatb To open the link in a new tab add "target="_blank" : # replace all line with: <td>{$line.tracking}</td> # By <td><a href="{$line.url|replace:'@':$line.tracking_number}"target="_blank">{$line.tracking_number}</a></td> Link to comment Share on other sites More sharing options...
Poldo Posted April 5, 2018 Share Posted April 5, 2018 (edited) Hi! Found this thread trying to solve this issue in PS 1.7.3. You can solve this replacing the line: <td>{$line.tracking|unescape: "html" nofilter}</td> in themes/YOUR_THEME/templates/customerorder-detail.tpl with <td>{$line.tracking nofilter}</td> Version 1.7.3 already returns a link with "_blank" target. I need to add that I had this issue as I'm applying a custom template bough before 1.7.3. Classic template delivered with 1.7.3 already has this modification. Edited April 5, 2018 by Poldo (see edit history) 1 Link to comment Share on other sites More sharing options...
IceAge0121 Posted May 26, 2018 Share Posted May 26, 2018 On 10/9/2017 at 8:55 AM, horiatb said: Actually, the file is themes/classic/templates/customer/order-detail.php The problem is I cannot understand why is the link displayed in plain text, as it doesn't seem to be anything wrong in the file or the html page source. However, I did managed to solve the problem by changing two lines in this file: themes/classic/templates/customer/order-detail.php ---------------------------------------------------- line: 178 replace all line with <td><a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a></td> line: 200 replace all line with <strong>{l s='Tracking number' d='Shop.Theme.Checkout'}</strong> <a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a> Thank you so much! This worked for me. Link to comment Share on other sites More sharing options...
Jameh Posted October 23, 2019 Share Posted October 23, 2019 On 4/5/2018 at 7:12 AM, Poldo said: Hi! Found this thread trying to solve this issue in PS 1.7.3. You can solve this replacing the line: <td>{$line.tracking|unescape: "html" nofilter}</td> in themes/YOUR_THEME/templates/customerorder-detail.tpl with <td>{$line.tracking nofilter}</td> Version 1.7.3 already returns a link with "_blank" target. I need to add that I had this issue as I'm applying a custom template bough before 1.7.3. Classic template delivered with 1.7.3 already has this modification. This one works on my 1.7.6.0 ver . Thanks 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