pengo Posted May 26, 2011 Share Posted May 26, 2011 Hello from New Zealand.Prestashop is brilliant. We want to use 1.4 for a business to business web store, which requires that customers are identified primarily by their company name (first and last name are still required, but company name is primary). I've found the following relevant posts in this forum:Make company mandatory in registration processMore customer information neededHow to add a new field to registration formAdding new fields to new accountHow to make company and additional information mandatoryMy question is this. Can the /override capability of Prestashop 1.4 be used to achieve the display of company name in the back office Customers tab? We set up accounts for customers, so we're happy entering the information on the Addresses page ... we just want to be able to make that field visible and primary in the back office Customers list.Thanks,::Leighhttp://www.else.co.nz/ Link to comment Share on other sites More sharing options...
pengo Posted June 1, 2011 Author Share Posted June 1, 2011 Two files have to be edited to display the company name on the Customers tab in the back office. The details are in the last two posts in this thread:[Tutorial] Ajouter un champ TVA intracommunautaire obligatoireYou can read this en anglais in this Google translation:[Tutorial] Add a field mandatory VATNote that for my purposes (displaying the company name on the Customers tab in the back office) only the last two posts are relevant. Both require changes in admin/tabs/AdminCustomers.php. There are minor tweaks needed to get the second change displaying properly in 1.4, but both work well. It's a shame this can't be done using the /override functionality ... or maybe it can, but I'm not sure how. Still, keeping a log of all customisations means that at least I know where the bodies are buried when the inevitable upgrade happens. Link to comment Share on other sites More sharing options...
mikedyos Posted June 16, 2011 Share Posted June 16, 2011 I'm new, i've looked the the 3 posts you have linked and I still didn't undetstand. Could you provide more detail? thanks Link to comment Share on other sites More sharing options...
pengo Posted June 16, 2011 Author Share Posted June 16, 2011 I'm happy to help. What is it you don't understand:[1] what I was trying to do or[2] how I eventually did it?Let me know and I'll provide more detail.Thanks,::Leighhttp://www.else.co.nz/ Link to comment Share on other sites More sharing options...
mikedyos Posted June 17, 2011 Share Posted June 17, 2011 How you eventually did it, in English.Thanks Link to comment Share on other sites More sharing options...
pengo Posted June 17, 2011 Author Share Posted June 17, 2011 Nae problemo. In PrestaShop 1.4 there are three required changes in admin/tabs/AdminCustomers.php. The most straightforward way to explain these is to post my edited file: you can compare it with the original to see what's changed. Each change point is preceded by the comment LH company name. If I can provide any further assistance don't hesitate to ask.Best wishes,::Leighhttp://www.else.co.nz/ AdminCustomers.php Link to comment Share on other sites More sharing options...
zeckis Posted June 21, 2011 Share Posted June 21, 2011 hi,i would like to add an information on front-offfice in registration, i have already add on back-office by searching on this forum, but anything for the front-office. I use prestashop 1.4.25.Can i have help? Link to comment Share on other sites More sharing options...
pengo Posted June 21, 2011 Author Share Posted June 21, 2011 Hello Zeckis,I don't know the answer to this question. I suggest you create a new thread for your request: no-one's likely to notice it tucked away at the bottom of a different topic. If you go here and click the NEW TOPIC button on the top right you'll be on your way to a useful answer, I hope. Making the question as clear and detailed as you can will help.Best wishes,::Leighhttp://www/else.co.nz/ Link to comment Share on other sites More sharing options...
carvefx Posted October 9, 2012 Share Posted October 9, 2012 Hey there, I'm running prestashop 1.4.8.3 and I've tried the modification in AdminCustomers.php. Trouble is that it works for 1 refresh or so, and after that it breaks displaying an error regarding a wrong SQL query. The only pseudo-work-around I've found was renaming the variable that holds the information like so: $this->_select = '(SELECT d.company FROM '._DB_PREFIX_.'address d WHERE d.id_customer = a.id_customer LIMIT 1) as company_2'; Again this works for a short while and breaks. Anyone that could enlighten me as to why this is happening? Link to comment Share on other sites More sharing options...
ruilong Posted October 9, 2012 Share Posted October 9, 2012 You probobly need to look inte the company name field also on the address table, it's limited to 32 chars or something like that, and then also increase the value in classes/Address.php Link to comment Share on other sites More sharing options...
carvefx Posted October 9, 2012 Share Posted October 9, 2012 (edited) You probobly need to look inte the company name field also on the address table, it's limited to 32 chars or something like that, and then also increase the value in classes/Address.php So you thing the issue is because the company name is longer than 32 characters and it conflicts? Later edit: Increased both the table to 128 chars and the formatting in Address.php and it's still failing to execute that SQL. Is there anywhere I can see what the actual error is? Edited October 9, 2012 by carvefx (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted October 9, 2012 Share Posted October 9, 2012 Hello carvefx, thank you for the message. I found this reference manual for mySQL error log here. I hope this helps! Link to comment Share on other sites More sharing options...
carvefx Posted October 9, 2012 Share Posted October 9, 2012 Hello carvefx, thank you for the message. I found this reference manual for mySQL error log here. I hope this helps! Thank you for this information, but prestashop is being hosted on a shared hosting server and I'm not sure if I can access the mySQL logs. The biggest issue with this is that the error message is extremely vague - nothing specific - just that the SQL query is wrong. 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