0

I have created products programmatically by following this post. I have assigned the required attribute set.

$sproduct->setAttributeSetId(attribute_set_id)

But my requirement is to select the relevant attribute options from the attributes in the attribute set.

Is there a way I can achieve this? Please advice.

Thanks in advance

3
  • what's "relevant attribute options"? please give an example.
    – Marius
    Commented Apr 10, 2015 at 6:22
  • I've got an attribute called "type of user" where there are two attribute options "Students" and "Other". I want to select one option programmatically. I'm creating these simple products to attach them to a configurable product as "Associated Products"
    – DB-Admin
    Commented Apr 10, 2015 at 6:24
  • $product->setTypeOfUser(id of the option here)
    – Marius
    Commented Apr 10, 2015 at 6:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.