Dani1989 Posted February 13, 2019 Share Posted February 13, 2019 Hello, I am new to the whole PrestaShop ecosystem. I do not know PHP, but i do know JavaScript, NodeJS, React and intermediate Java and C#. I want to make a very simple module with the following requirements: Lets say i have a shop that sells cables per rol. I want the customer to be able to buy either per meter or per complete rol. I want the module to do the following: Take the price per rol If customer wants to buy a complete rol, then display price per rol. If customer wants to buy per meter, add X% to price per rol and calculate the price per meter including the percentage increase, then display price. Would something like that be difficult to implement and are there any security concerns I should be aware of? Also where should I start? Should I start from the basics of PHP? Are there any resources that would teach me the syntax of PHP given that I already know other languages? Link to comment Share on other sites More sharing options...
joseantgv Posted February 14, 2019 Share Posted February 14, 2019 This is not the simplest and easiest module that you could start with Here you can generate a module skeleton: https://validator.prestashop.com/generator And here you have the doc https://devdocs.prestashop.com/ 1 Link to comment Share on other sites More sharing options...
razaro Posted February 14, 2019 Share Posted February 14, 2019 Yeah, like @joseantgv that definitely is not simple module to make and not the best to start with. You can check if there is similar module here https://addons.prestashop.com/en/466-sizes-units But also for your problem you may try other solution without making a module. Not sure if it would be possible but try to make 2 attributes: by roll and by meter. That could be radio buttons. Base product price could be 0 and then impact on price for "by roll" attribute could be let say $100 for roll of 50m. And for attribute "by meter" could have impact for example $100 * 20% / 50m = $2.4 per m. Link to comment Share on other sites More sharing options...
Dani1989 Posted February 14, 2019 Author Share Posted February 14, 2019 @joseantgv @razaro Thanks for your suggestions. I'll see if i can do it without a module at first. 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