Jump to content

how can I oveeriede the getprice() in prestashop


bilal2005
 Share

Recommended Posts

 

 

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 

Share this post


Link to post
Share on other sites

As Nemo1 mentioned, you need to override getSpecificPrice method in /classes/SpecificPrice.php

class SpecificPrice extends SpecificPriceCore
{

    public static function getSpecificPrice(.....

Share this post


Link to post
Share on other sites

 

 

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 

 

 

post-980837-0-06008800-1430964947_thumb.png

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More