Jump to content

Difference between hookActionProductUpdate and hookActionProductAttributeUpdate


Recommended Posts

Hi,

 

I want to know the difference between both hooks, but I find installed only hookActionProductAttributeUpdate even if I declare the other hook.

In the other side I need to print id_product but I can print only id_product_attribute using this hook

public function hookActionProductUpdate($params)
    {
		//a verificar.
	if ($params['id_product_attribute']) {
			$idp = $params['id_product'];
			echo $idp;
			$ida = $params['id_product_attribute'];
			echo $ida;
			$api = new LinioApi();
			$pr = new LinioProduct($idp, false, Context::getContext()->language->id);
			$sku = $pr->getSku($idp);
			echo $pr->getSku($idp);
			$xml = simplexml_load_string($api->getProductBySku(array($sku)));
			$api->updateProduct($pr->getXmlDesc($ida));
			
        }
		echo "test9";
		die;
    }

thanks for the help.

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

Hi, yes, I have a plugin to sync combinations to a marketplace. sometimes I need to update some data for example stock I can update using the prestashop quantity hook it's ok, but when I want to change description, short description, price, I save the new values(but nothing is happen in the other side (Marketplace)), so what I do is to click editing combination and then save to take in consideration the description and price update. it's look like fine, but the issue if I have for example 50 combinations I have to click one after one to update these data?

 

Thank you.

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