How to access Customizable Text Fields From Prestashop Module? -
I am creating a new module for Prestashop where users can design their product from third party service when users later Adds the product to my car, so I would like to save the ID that I get from this third party service where the user designs their product.
I think the best way to do this is to create a customization textfield in Prestashop named "DesignID." Now I want to know how I can save data in this area rather than manually data Instead of filling, save data from module development in Prestashop.
So basically ... how do I add data from these customizable areas? Within the Prestashop module, when the user adds the product to their car?
These customizable fields are used You are simple users and you are not designing a module . To save DesignID it will be just a hack.
Since you are creating a new module, I would suggest that the third party ID should be placed in a newly created database table, which will match id_product, id_design, id_cart, id_order, etc .. .
You can hook up on "actionCartSave" and record with matching table and add all other necessary data to your table.
If you want to paste on that customization feature, add a sample field and review the following database tables:
ps_customization ps_customization_field ps_customization_field_lang ps_customized_data
and When you receive third party ID, repeat the change
If all your products will be customized, ps_customization_field & amp; Consider adding the required data to During the module installation, ps_customization_field_lang (table for field structure), so after installing it you can only ps_customization & amp; Ps_customized_data (tables for field data)
To add optimization in PrestaShop is not just the appropriate API, only to retrieve the data, so that you have to manually write SQL queries, just review ProductController for ps_customization & Amp; Ps_customized_data changes and adminProductsController for ps_customization_field & amp; Ps_customization_field_lang
Do not forget to remove the optimization markup code from your product & amp; Cart template.
Comments
Post a Comment