Jump to content

get attribute names inside static function priceCalculation


shpetimi

Recommended Posts

I already did this for the javascript side, so now for products with attributes this calculation is processed and works until I click the Add into cart button, there of course it shows default calculated price, but in the server side now I am trying to make this custom calculation, and I believe it should be done in the priceCalculation() function inside class/product.php file. 

price += attribute1 + (attribute1 x attribute2)

I tried to query the attributes with names (note: with names) and add them inside priceCalculation() function here:
 

if ($id_product_attribute !== false) {
   $price += $attribute_price;
}

With no success. So I need to get the names of the attributes not price impact. the names stored in attribute_lang table name column.

Edited by shpetimi (see edit history)
Link to comment
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
×
×
  • Create New...