Pierre-Antoine Posted January 6, 2016 Share Posted January 6, 2016 Hi, I am using Prestashop 1.6.0.14 In the back office, I can access through Orders > Orders menu to all the orders that have been done on my website by my clients. By choosing one, I access all the details of one specific order, especially a table with all the products included in this order, like shown in this picture. In this table, I have the products images, the products names, prices, ordered and available quantities. And I would like to include in this table a column with the products status ("New", "Refurbished" or "Others"). Does anyone have an idea about how to do this, please ? Thank you in advance for your help ! Link to comment Share on other sites More sharing options...
vekia Posted January 6, 2016 Share Posted January 6, 2016 hello you're looking for something like this: ? Link to comment Share on other sites More sharing options...
Pierre-Antoine Posted January 6, 2016 Author Share Posted January 6, 2016 hi Vekia, Thank you for your answer ! That is exactly what I am looking for Link to comment Share on other sites More sharing options...
Pierre-Antoine Posted January 6, 2016 Author Share Posted January 6, 2016 Is that a normal feature in newer version of PrestaShop ? Link to comment Share on other sites More sharing options...
vekia Posted January 7, 2016 Share Posted January 7, 2016 No i just applied modifications to my demo shop to check if it will work. please note that this will display ACTUAL "condition" of the product it's because prestashop doesnt store information about product condition in order details Link to comment Share on other sites More sharing options...
Pierre-Antoine Posted January 7, 2016 Author Share Posted January 7, 2016 What do you mean by actual condition ? How have you done that, please ? Link to comment Share on other sites More sharing options...
vekia Posted January 13, 2016 Share Posted January 13, 2016 What do you mean by actual condition ? How have you done that, please ? hello sorry for late reply i had a lot of commercial works to handle but im finally back :-) okay, as i mentioned, this feature shows ACTUAL condition of product - exactly the same value as you have here: this means that if you change this option here, you will see changed value also on order details page. Link to comment Share on other sites More sharing options...
Pierre-Antoine Posted January 13, 2016 Author Share Posted January 13, 2016 That is a good thing for me Thank you for everything you have done, it matches exactly what I am looking for ! Is it possible to get some clues about which files to modify and how, please ? Link to comment Share on other sites More sharing options...
vekia Posted January 13, 2016 Share Posted January 13, 2016 to _product_line.tpl i added new column in table with products list <td> {assign var=condition value=Db::getInstance()->getRow("SELECT `condition` FROM ps_product WHERE id_product={$product['product_id']}")} {$condition.condition} </td> to view.tpl i added new column heading <th><span class="title_box ">{l s='Condition'}</span></th> Link to comment Share on other sites More sharing options...
Pierre-Antoine Posted January 14, 2016 Author Share Posted January 14, 2016 Great, I have made the modification, it works perfectly ! Thank you very much Vekia, your work is greatly appreciated ! Link to comment Share on other sites More sharing options...
Pierre-Antoine Posted January 14, 2016 Author Share Posted January 14, 2016 Hi Vekia, Last question: it works perfectly, but I would like to sort those conditions according to the name. I saw in the source code I should use <a> <i class="icon-caret-up"></i> </a> <a> <i class="icon-caret-down"></i> </a> and using links in the <a> balise, but this code doesn't seem to be working and I don't understand why. <a {if isset($condition) && ($key == $condition) && ($order_way == 'DESC')}class="active"{/if} href="{$currentIndex|escape:'html':'UTF-8'}&{$list_id}Orderby={$key|urlencode}&{$list_id}Orderway=desc&token={$token|escape:'html':'UTF-8'}{if isset($smarty.get.$identifier)}&{$identifier}={$smarty.get.$identifier|intval}{/if}"> <i class="icon-caret-down"></i> </a> <a {if isset($condition) && ($key == $condition) && ($order_way == 'ASC')}class="active"{/if} href="{$currentIndex|escape:'html':'UTF-8'}&{$list_id}Orderby={$key|urlencode}&{$list_id}Orderway=asc&token={$token|escape:'html':'UTF-8'}{if isset($smarty.get.$identifier)}&{$identifier}={$smarty.get.$identifier|intval}{/if}"> <i class="icon-caret-up"></i> </a> Did I make a mistake ? Thanks again for your help, Link to comment Share on other sites More sharing options...
Cloud Nine Posted March 11, 2016 Share Posted March 11, 2016 (edited) Hi, Thanks Vekia, i've adapted your code in order to display tags and it works : {assign var=id_tag value=Db::getInstance()->getRow("SELECT * FROM xxx_product_tag LEFT JOIN wx8_tag ON xxx_product_tag.id_tag = xxx_tag.id_tag WHERE id_product={$product['product_id']}")} I was wondering if it's possible to make an override when we edit this file : product_line.tpl This override is working : override/controllers/admin/templates/orders/helpers/view/view.tpl This one is not working : override/controllers/admin/templates/orders/_product_line.tpl Edited March 11, 2016 by Cloud Nine (see edit history) Link to comment Share on other sites More sharing options...
Cloud Nine Posted March 12, 2016 Share Posted March 12, 2016 ok, so i have just modified view.tpl in override folder : {include file='../../_product_line.tpl'} Link to comment Share on other sites More sharing options...
aguiu Posted July 18, 2017 Share Posted July 18, 2017 How i can do the same but with the column "category default" ? Link to comment Share on other sites More sharing options...
aguiu Posted July 18, 2017 Share Posted July 18, 2017 (edited) How i can display the default category column instead of condition column? Edited July 18, 2017 by aguiu (see edit history) Link to comment Share on other sites More sharing options...
Scully Posted July 24, 2017 Share Posted July 24, 2017 Use field name for the default category. Its named id_category_default This displays the id, not the cat name! 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