Jump to content

Id product attribute current in product page preststahop 1.7.8.6


pavel83

Recommended Posts

i am trying to call in the product page, the current id code of the active combination. I am trying to use this code but I am not getting any results

$id_product_attribute=Tools::getValue('id_product_attribute');

 

Somebody can help me?
 

Link to comment
Share on other sites

I'm trying writing a module, for my website to synchronize quantities through in a webservice in hook of the product page, everything works for me, except in case the product has combinations.
I need to check the product id of the current combination and update the quantities via the reference.

 $product = new 
         
               Product(Tools::getValue('id_product'));
               $idarticolo = $product->reference;               

            if ($product->hasAttributes()) {

                        $id_product_attribute=Tools::getValue('id_product_attribute');
                         $combination = new Combination($id_product_attribute);                        
                        $idarticolo = $combination->reference;


            }
     

can you help me?

 

          

Edited by pavel83 (see edit history)
Link to comment
Share on other sites

for products without combinations, there are no problems, for those with combinations I can't query find the current id combination of the active product so it doesn't work for me

i am trying this

     $id_product_attribute=Tools::getValue('id_product_attribute');


but doens't work

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