jean.man Posted October 20, 2010 Share Posted October 20, 2010 For instance, can I change the "manufacturer" to others name? such as designer?I would like to describe the products by its designer, how to do that?Also can I add another new custom field like manufacturer in prestashop?Finally, may I know what is the differences between manufacturer and supplier?i mean in programming sense, are they treated differently in the ps logic? Link to comment Share on other sites More sharing options...
MrBaseball34 Posted October 20, 2010 Share Posted October 20, 2010 For instance, can I change the "manufacturer" to others name? such as designer?I would like to describe the products by its designer, how to do that? This would require modification of the template code. Also can I add another new custom field like manufacturer in prestashop? Yes, but it is going to require modification of both template and backend code. Finally, may I know what is the differences between manufacturer and supplier?I mean in programming sense, are they treated differently in the ps logic? Let's say I buy a DeWalt cordless drill from a drop shipper named ToolsOnTheWeb.The Manufacturer would be DeWalt and the supplier would be the ToolsOnTheWeb.You can have the same Manufacturer but several different suppliers. This helps you keep track of where the product actually came from.That should be enough to tell you how the logic would differ. Link to comment Share on other sites More sharing options...
jean.man Posted October 21, 2010 Author Share Posted October 21, 2010 Thanks for your explanation. 100% understood. May I know which files .tpl corresponds to changing the name "manufacturer" to "designer"?Would like "designer" to be displayed even in the back office, when adding the products.Many thanks. Link to comment Share on other sites More sharing options...
rocky Posted October 21, 2010 Share Posted October 21, 2010 Actually, you don't need to modify any code to change "Manufacturers" to "Designers". Just go to Tools > Translations, select "Module translations" in the dropdown, click the USA flag, scroll down to the "prestashop - blockmanufacturers" section, then enter the translation for "Manufacturers" as "Designers".Why do you want to add a new manufacturer field? Aren't the ones already in PrestaShop enough? Link to comment Share on other sites More sharing options...
jean.man Posted October 21, 2010 Author Share Posted October 21, 2010 Very cool hacks on the translation !!It definitely helps.Now I changed the manufacturer to designerAt first, I would like to have both "manufacturer", "designer" and "suppliers" for products categorization.however I think renaming it is enough for the moment.Many Thanks. Link to comment Share on other sites More sharing options...
jean.man Posted October 21, 2010 Author Share Posted October 21, 2010 One more follow up question:If I really need to add a custom field like manufacturer, how do I add it? which backend code to do that?for instance, I think I need to have 3 fields for products categorization.it is - brand- designer- suppliersMay I know how to proceed?Many thanks. Link to comment Share on other sites More sharing options...
rocky Posted October 21, 2010 Share Posted October 21, 2010 Adding fields is very difficult, since it requires modifying your database and copying much of PrestaShop's code to handle the new field. I suggest using existing fields instead of adding new ones. Link to comment Share on other sites More sharing options...
jean.man Posted October 21, 2010 Author Share Posted October 21, 2010 Got it. Agree.I guess sticking with the existing infrastructure, and do adaptation is the most effective way to getting the job done. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted October 21, 2010 Share Posted October 21, 2010 Thanks for the heads up on the translations, rocky. Link to comment Share on other sites More sharing options...
jean.man Posted October 22, 2010 Author Share Posted October 22, 2010 After I changed the "manufacturer" to "designer" in translation.I find that when accessing the designer list in the shop, the URL is : domain.com/manufacturer.phpThis is normal, since I only change the appearing name as "designer" only.Is there any way to change so that even I can access the by "domain.com/designer.php"?Which files to edit?Many Thanks. Link to comment Share on other sites More sharing options...
rocky Posted October 22, 2010 Share Posted October 22, 2010 If you want to make it easy to upgrade in the future, I suggest that you leave it as manufacturer.php. Otherwise, you will need to modify lots of files: classes/Link.php, classes/Page.php, modules/blockmanufacturer/blockmanufacturer.tpl, themes/prestashop/sitemap.tpl and admin/tabs/AdminGenerator.php. You will also need to regenerate your .htaccess file so manufacturer.php gets changed to designer.php and edit the ps_page_type table in your database. Link to comment Share on other sites More sharing options...
jean.man Posted October 22, 2010 Author Share Posted October 22, 2010 Noted and 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