tijojoel Posted October 27, 2017 Share Posted October 27, 2017 Hi, I want to add a new field to store value that will be common to all products. For example I need to increment all product quantity with some value that I configured in the admin end. Can anyone give a solution where, how to add this new field so that admin can configure this value and all products will get affected. Link to comment Share on other sites More sharing options...
NemoPS Posted October 29, 2017 Share Posted October 29, 2017 It really depends on what needs to be done, each function needs something specific. For the example you mentioned, you would need to get a list of products and run the stock manager, but other things will need different snippets. For the value, I would say try with a basic module that saves a config entry in the database. What's your ps version? Link to comment Share on other sites More sharing options...
tijojoel Posted October 30, 2017 Author Share Posted October 30, 2017 On 29/10/2017 at 8:34 AM, NemoPS said: It really depends on what needs to be done, each function needs something specific. For the example you mentioned, you would need to get a list of products and run the stock manager, but other things will need different snippets. For the value, I would say try with a basic module that saves a config entry in the database. What's your ps version? prestahop 1.6.12 is the version. I am creating a module for this but can you tell me where I can add the field ? Link to comment Share on other sites More sharing options...
NemoPS Posted November 1, 2017 Share Posted November 1, 2017 You can use the module's config page actually, the getContent method will be fine (or displayForm) Then use the module's postProcess to run the script that updates quantities, based on that field Link to comment Share on other sites More sharing options...
tijojoel Posted November 7, 2017 Author Share Posted November 7, 2017 @NemoPSYes I had used like that. Thank you very much for the input. 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