Skip to content

Total Shipping Weight For Order #768

@kylekanderson

Description

@kylekanderson

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
It would be great to have the ability to get the total shipping weight for an Order. Ideally, we could pass a weight_unit to this function and the function would return a result similar to the weight_value that's returned for ProductVariants.

Example:
$order->totalShippingWeight('lbs'); // returns something like 0.5000

Or, if no weight unit is provided:
$order->totalShippingWeight(); // returns something like ['weight_value' => 0.5000, 'weight_unit' => 'lbs']

Describe alternatives you've considered
This could of course be accomplished outside of Lunar. However, with the possibility of mixed weight_units on ProductVariants, it could become difficult to implement. I'm not sure if Lunar already possesses the necessary information/logic to handle these sorts of conversions or not.

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions