The GenericAdd
class is used to add a target specified by ID or value to a target specified by ID or value. For example:
Add item by ID or value to shipping group by ID or value.
Add item by ID or value to payment group by ID or value.
Add item by value to order by ID.
Add shipping group by value to order by ID.
Add payment group by value to order by ID.
These are the only valid combinations. Both the ID and the value should not be set for either the target or the container. Everything should be added to the order before it is used as either a target or container for another GenericAdd
.
For example if you are adding a new item, shipping group, and payment group, and want to add the item to both of the groups you would do the following:
Add the item to the order.
Add the shipping group to the order.
Add the payment group to the order.
Add the item to the shipping group.
Add the item to the payment group.