Jump to content

Edit History

pavel83

pavel83

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?

 

          

pavel83

pavel83

i am writing a module 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.i am writing a module 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.i am writing a module 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;


            }
     

 

          

×
×
  • Create New...