question

jameswood avatar image
jameswood asked jameswood edited

Item with variants and modifiers and a category

I am creating an item with variants and modifiers and a category using the REST API. Here is an example:

Item: Pizza

Category: Lunch

Variants: small $3; large $4;

Modifier Group: Meat Toppings


Is this the correct way of doing this:

Step 1: Create Item Group: Pizza

Step 2: Create Attributes for Item Group: Sizes

Step 3: Create Options for attribute: Small; Large;

Step 4: Create 2 SEPARATE Items initialized with the SAME Item Group ID from step 1

Step 5: Create associations between items and options: 1 item associates to the small option; the other item associates to the large option

Step 6: Create a Lunch category, and associate it to EACH item (or to the Group???)

Step 7: Create a modifier group (that applies to both items) and associate it to EACH of the items (or to the Group???)

Step 8: When retrieving items, retrieve the group and display the group name and the names of each item in the group as the variants


Inventory
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered jameswood edited
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jameswood avatar image jameswood commented ·

Hi David. Steps 1 to 5 are now clear, but just to clarify:

For step 6, I should associate the category to each item and NOT to the group?

For step 7 I should associate the modifier group to each item and NOT the item group?

For step 8 I should retrieve and display the item group as though it was an item, then show each item in the item group as a variant? Thanks a lot!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community