Jump to content

get attribute names from $id_product_attribute variable


shpetimi

Recommended Posts

if you've got an id of attribute you can just simply use Combination class

$combination = new Combination($id_product_attribute);

then $combination variable will store each available combination object definition

  • Like 1
Link to comment
Share on other sites

Thank you Vekia, I tried the Combination class with print_r($combination) and as I can see there it doesnt fetch the name column from the attribute_lang. Because I need the attribute names. Basically I am trying to change the PriceCalculation() function. so in order to do that I need the attribute names because the calculation formula that I am trying to implement depends on the selected attributes (2 selected attributes) to show the price in cart, etc.. In the product page it works because I implemented this with javascript. But I need to fetch the selected attributes to show the price based on those attributes. (Note: I am not using prestashop default combinations). 

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...