glossier / solidus_retail

Solidus Extension to Support Retail Operations
BSD 3-Clause "New" or "Revised" License
8 stars 4 forks source link

Fix/additional refund bug fixing #81

Closed thisiscab closed 7 years ago

thisiscab commented 7 years ago

This custom refund calculator will take care of the bundled products.

The previous default refund calculator would use the line_item price to calculate the return_item price. The way that bundle works, is that a line_item contains multiple inventory units.

So if a bundle product line_item was set to 65$, each inventory unit being returned that were part of the bundled product would be priced at 65$.

We can't simply device the number of inventory units associated with bundled line_item because some items have more value than the others. We try to calculate a certain ratio so the item we reimburse is fair.

Those commits take care of fixing that situation.

thisiscab commented 7 years ago

cc: @bryanmtl @hugobast let's do eit!