noesac Posted April 3, 2013 Share Posted April 3, 2013 (edited) Here's a screenshot of what I'm after. Anyone have any tips on how I can do this? Edited April 3, 2013 by noesac (see edit history) Link to comment Share on other sites More sharing options...
jaimeweb Posted July 23, 2013 Share Posted July 23, 2013 Can anyone tell me how to achieve this? Link to comment Share on other sites More sharing options...
jaimeweb Posted July 23, 2013 Share Posted July 23, 2013 (edited) I would like it to show as a separate column on the customers page. Edited July 23, 2013 by jaimeweb (see edit history) Link to comment Share on other sites More sharing options...
noesac Posted July 23, 2013 Author Share Posted July 23, 2013 I never figured out a solution sorry, but I would still love to know. Link to comment Share on other sites More sharing options...
jaimeweb Posted July 23, 2013 Share Posted July 23, 2013 Hi noesac, I've done it, on 1.5.4. Go to controllers/admin/AdminCustomersController.php Starting around line 78 you will see all the columns, they look like this: 'id_gender' => array( 'title' => $this->l('Title'), 'width' => 70, 'align' => 'center', 'icon' => $genders_icon, 'orderby' => false, 'type' => 'select', 'list' => $genders, 'filter_key' => 'a!id_gender', ), 'lastname' => array( 'title' => $this->l('Last name'), 'width' => 'auto' ), 'firstname' => array( 'title' => $this->l('First Name'), 'width' => 'auto' ), and so on... I simply copy and pasted this after the 'email address' section: 'note' => array( 'title' => $this->l('Note'), 'width' => 140, ), and it worked! 1 Link to comment Share on other sites More sharing options...
noesac Posted July 23, 2013 Author Share Posted July 23, 2013 Unfortunately I'm on v1.4.10 and that file doesn't exist:( Link to comment Share on other sites More sharing options...
Carlsen Posted August 5, 2013 Share Posted August 5, 2013 (edited) A note to jaimeweb's solution (which works perfectly for 1.5.x): You have to paste 'note' => array( 'title' => $this->l('Note'), 'width' => 140, ), In AdminOrdersController.php at around line 100. You can decide the position your self, I pasted it after 'payment' => array( 'title' => $this->l('Payment: '), 'width' => 100 ), Edited August 5, 2013 by Carlsen (see edit history) Link to comment Share on other sites More sharing options...
blue17 Posted August 7, 2013 Share Posted August 7, 2013 (edited) I'm on v1.4.10 and that file doesn't exist:( ps1.4 admin/tabs/AdminXyzzzzz.php is analagous to ps1.5 controllers/admin/AdminXyzzzzzController.php You'll find the code you're looking for in admin/tabs/AdminCustomers.php within the "fieldsDisplay" array declaration $this->fieldsDisplay = array( Personally, I would just write it out to a single line (in contrast to the multiline format suggested in earlier posts) 'note' => array('title' => $this->l('Note'), 'width' => 140, 'align' => 'left'), FWIW, you can control where (leftmost? to the right of 'email' column? etc) the new 'note' column will display. (For each of the "admin tab pages", the order in which you declare the fields determines left-to-right column order of the resulting html data table.) Edited August 7, 2013 by blue17 (see edit history) Link to comment Share on other sites More sharing options...
semor Posted January 10, 2014 Share Posted January 10, 2014 Hi, I search the way to put private note on order,Anybody can help me ? Link to comment Share on other sites More sharing options...
noesac Posted January 10, 2014 Author Share Posted January 10, 2014 ps1.4 admin/tabs/AdminXyzzzzz.php is analagous to ps1.5 controllers/admin/AdminXyzzzzzController.php You'll find the code you're looking for in admin/tabs/AdminCustomers.php within the "fieldsDisplay" array declaration $this->fieldsDisplay = array(Personally, I would just write it out to a single line (in contrast to the multiline format suggested in earlier posts) 'note' => array('title' => $this->l('Note'), 'width' => 140, 'align' => 'left'),FWIW, you can control where (leftmost? to the right of 'email' column? etc) the new 'note' column will display.(For each of the "admin tab pages", the order in which you declare the fields determines left-to-right column order of the resulting html data table.) Thanks! I didn't even realise I had a reply! That worked. Hi, I search the way to put private note on order, Anybody can help me ? Yes I'm wondering this too. The solution provided is to display it on the Customer tab, which is nice, but more useful would be the Orders tab as per my original post. 1 Link to comment Share on other sites More sharing options...
semor Posted January 15, 2014 Share Posted January 15, 2014 (edited) For Order tab, in admin/themes/default/template/controllers/orders/helpers/view/view.tpl You have that : {if $customer->id} <!-- Customer informations --> <br /> <fieldset> <legend><img src="../img/admin/tab-customers.gif" /> {l s='Customer information'}</legend> <span style="font-weight: bold; font-size: 14px;"><a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}"> {$customer->firstname} {$customer->lastname}</a></span> ({l s='#'}{$customer->id})<br /> (<a href="mailto:{$customer->email}">{$customer->email}</a>)<br /><br /> {if ($customer->isGuest())} {l s='This order has been placed by a guest.'} {if (!Customer::customerExists($customer->email))} <form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}"> <input type="hidden" name="id_lang" value="{$order->id_lang}" /> <p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform a guest into a customer'}" /></p> {l s='This feature will generate a random password and send an email to the customer.'} </form> {else} <div><b style="color:red;">{l s='A registered customer account has already claimed this email address'}</b></div> {/if} {else} {l s='Account registered:'} <b>{dateFormat date=$customer->date_add full=true}</b><br /> {l s='Valid orders placed:'} <b>{$customerStats['nb_orders']}</b><br /> {l s='Total spent since registration:'} <b>{displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</b><br /> </fieldset> {/if} {/if} Modify with that : {if $customer->id} <!-- Customer informations --> <br /> <fieldset> <legend><img src="../img/admin/tab-customers.gif" /> {l s='Customer information'}</legend> <span style="font-weight: bold; font-size: 14px;"><a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}"> {$customer->firstname} {$customer->lastname}</a></span> ({l s='#'}{$customer->id})<br /> (<a href="mailto:{$customer->email}">{$customer->email}</a>)<br /><br /> {if ($customer->isGuest())} {l s='This order has been placed by a guest.'} {if (!Customer::customerExists($customer->email))} <form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}"> <input type="hidden" name="id_lang" value="{$order->id_lang}" /> <p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform a guest into a customer'}" /></p> {l s='This feature will generate a random password and send an email to the customer.'} </form> {else} <div><b style="color:red;">{l s='A registered customer account has already claimed this email address'}</b></div> {/if} {else} {l s='Account registered:'} <b>{dateFormat date=$customer->date_add full=true}</b><br /> {l s='Valid orders placed:'} <b>{$customerStats['nb_orders']}</b><br /> {l s='Total spent since registration:'} <b>{displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</b><br /> </fieldset> {/if} {if $customer->note} <br /> <fieldset> <legend><img src="../img/admin/tab-customers.gif" />Customer Note</legend> <span style="font-weight: bold; font-size: 14px;">{$customer->note}</span> </fieldset> {/if} {/if} Edited January 15, 2014 by semor (see edit history) 1 Link to comment Share on other sites More sharing options...
noesac Posted January 15, 2014 Author Share Posted January 15, 2014 thanks! Which part did you modify? That's a frightening amount of code to just bulk replace... Link to comment Share on other sites More sharing options...
semor Posted January 15, 2014 Share Posted January 15, 2014 Search 'Customer informations' in view.tpl and you will see the piece of code (In PS 1.5.6, start at line 155) 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