bilal2005 Posted May 5, 2015 Share Posted May 5, 2015 I need to overreid the getprice() method in presatshop for my price to add in panel there an exmple how to do that ?? thanks Link to comment Share on other sites More sharing options...
NemoPS Posted May 6, 2015 Share Posted May 6, 2015 Actually what you want to override is usually getPriceStatic. Just follow these steps to create an override: http://doc.prestashop.com/display/PS15/Overriding+default+behaviorsSee the section on classesAlso, you might have to override PriceCalculation as well, again, Product class Link to comment Share on other sites More sharing options...
bilal2005 Posted May 6, 2015 Author Share Posted May 6, 2015 Actually what you want to override is usually getPriceStatic. thans for your shared . I see thatt but this not what I want to do for mor explain I create a module for prestashop and I create new attribute for specail and culculate of price no I need to change the price in panel to new price to cart Link to comment Share on other sites More sharing options...
tuk66 Posted May 6, 2015 Share Posted May 6, 2015 As Nemo1 mentioned, you need to override getSpecificPrice method in /classes/SpecificPrice.php class SpecificPrice extends SpecificPriceCore { public static function getSpecificPrice(..... Link to comment Share on other sites More sharing options...
bilal2005 Posted May 7, 2015 Author Share Posted May 7, 2015 class SpecificPrice extends SpecificPriceCore{ public static function getSpecificPrice(..... where can I override getSpecificPrice method for exmple I have this problem larg and haut are the attributs while the user enter the large and haut the price change so I need to add this price in panle cart . there an exmple to do that thanks Link to comment Share on other sites More sharing options...
NemoPS Posted May 13, 2015 Share Posted May 13, 2015 Oh, i's a lot more complicated with attributes. In this case you might have to amend javascript as well (product.js, findCombinations function). Unfortunately Prestashop renders out combo prices using javascript, not php 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