• Resolved eddy09

    (@ediiqzx)


    Hello. I need to get an array with the variations (including their attributes value, price, and variation id) based on the product id. For example if I have a product called “Shirt” with id 1234 and it has two attributes: size and color withe the values “S”, “M” and “Blue”, “Green” I need to get an array that looks at minimum like this:

    1234[
    Name => “Shirt”,
    Variations =>
    12341[ Size => “S”, Color => “Blue”, Price => “123”],
    12342[ Size => “S”, Color => “Green”, Price => “543”],
    12343[ Size => “M”, Color => “Blue”, Price => “432”],
    12344[ Size => “M”, Color => “Green”, Price => “153”]
    ]

    Is it possible? I don’t need to be exactly like that just that I need an array including all these details at minimum.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How can I get an array of variations’ is closed to new replies.