1
Answers
Vote up!
0
Vote down!

Assign Products to a Product Display Node using rules

Hi, I have a rule that check if a a new product display node was created, then it creates two products (each one of a different product type). Next, I need to assign those two products to the product display node.

Could you please advice how to achieve this: to assign the created products to the product reference field of the product display node, within the same rule? thanks.

Asked by: luthien
on May 14, 2013

1 Answer

Vote up!
0
Vote down!

$product_1 = $product1_created->sku;
$product_2 = $product2_created->sku;
variable_set("custom_product_1_".$node->nid,$product_1);
variable_set("custom_product_2_".$node->nid,$product_2);

Answer by: luthien
Posted: May 16, 2013

Comments

I'm not sure what this code is supposed to show - using variable_set() like that shouldn't do anything for you. Perhaps you can edit your question again and include the Rule you do have?

- Ryan Szrama on May 17, 2013