Items represent what’s inside the shipment. My current thinking is to have them serialized ala adjustments, each ShipmentItem is a value object that has a purchased entity type, purchased entity id, quantity. We also talked about storing an order item ID but at this point I’m no longer convinced it’s necessary. Might just need a use case for it though.

The reason why I want to serialize items is because they’re going to be recalculated during the refresh. If our default behavior is “single shipment per order”, then each change to the order (at cart/checkout) must be reflected in the shipment.

The amount is a price field, taken from the selected rate. Adjustments store handling fees and/or taxes.

CommentFileSizeAuthor
#4 shipment.patch27.11 KBbojanz
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Tyler_Marshall created an issue. See original summary.

TylerMarshall’s picture

Currently tracking progress on my fork of Bojanz branch

https://github.com/Tigatok/commerce_shipping-1/tree/2831602/create-a-shi...

bojanz credited jsacksick.

bojanz’s picture

Title: Create a ShipmentItem Object » Implement the shipment entity type
Assigned: TylerMarshall » bojanz
Status: Active » Needs review
FileSize
27.11 KB

Here is jsacksick's current progress. I'll wrap the patch up and commit it.

  • bojanz committed 4c76c80 on 8.x-2.x authored by jsacksick
    Issue #2831602 by bojanz, Tyler_Marshall, jsacksick: Implement the...
bojanz’s picture

Status: Needs review » Fixed

Done.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.