Is it possible to calculate shipments without havi...
# support
d
Is it possible to calculate shipments without having added an address? The shop I'm building is only serving one country, so I could theoretically calculate shipping costs as soon as a product is added to the cart. Going through the code I think I probably need to build my own
Spree::Stock::Estimator
class and then call
order.create_proposed_shipments
during an orders
:cart
state. Is this the way to go or are there any other preferred ways to achieve this?
k
Yes, I think it’s a good way to go. Maybe you’ll have to use a “fake” address at some point, without associating it with the order.
d
Thanks. That helps 👍