OrangeJuice Posted March 11, 2015 Share Posted March 11, 2015 Hi I've some experience of php but never added/edited and custom extensions before and hoping someone could tell me what is needed to add a custom calculation to cart. The user chooses a material that has a certain price per meter. Then the user enters height and width (in metres or cm) in an input box and selects the style. Then presses calculate, if the user is in agreement with the calculated price the usual checkout process continues. Behind the scenes the price is controlled by width, height and style. I can’t simply multiply height x width as this is governed by additional formula as the width only comes in set sizes. In addition the style has a bearing on price. I’m thinking of simplifying the pricing structure so it fits within an existing extension as an option. Another option is to create an extension so that the cart behaves in this way. Any advice helpful as new to this area. Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted March 11, 2015 Share Posted March 11, 2015 I would tie your code in product::getPriceStatic and product::priceCalculation. More in the latter, probably. Make sure it can access your measurements and simply modify the output price if they're thereYou might need to change orderDetail as well, and cart::getProducts. SOunds like a tough job Link to comment Share on other sites More sharing options...
OrangeJuice Posted March 11, 2015 Author Share Posted March 11, 2015 (edited) Hi I havent used Prestashop for a few year, how far will out the box take me? Any existing extentions on the market to take it any further? Thanks Edited March 11, 2015 by OrangeJuice (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted March 11, 2015 Share Posted March 11, 2015 For your needs? Nowhere, you might find some third party modules for price by meter but I cant swear on it as I never tried any Link to comment Share on other sites More sharing options...
Recommended Posts