Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for order with multiple shipping adresses #2715

Closed
loicginoux opened this issue Apr 25, 2018 · 3 comments
Closed

Support for order with multiple shipping adresses #2715

loicginoux opened this issue Apr 25, 2018 · 3 comments

Comments

@loicginoux
Copy link
Contributor

Hi,
Our solidus app is going to need to ship to multiple adresses and I am evaluating the work to be done.
I see this PR #1138 that rolled back the shipment-adress association, because it was buggy... that's a shame :(
I guess I'll revert these changes in our app, start from here and fix the bugs mentionned in this PR.
I'll open a PR if I manage to get something working.
Not sure If I am the only one that needs shipment-adress association but that's seems more logical and more generic than having a order-adress association.
If you have any suggestions or advises that could help me make these changes, please let me know.
Thank you

@loicginoux
Copy link
Contributor Author

One question: In the context of multiple shipment address, what's the use of order.ship_address ? Is it still necessary to have this address linked to the order if the association is only "valid" when the shipments ship to a unique address.

@loicginoux
Copy link
Contributor Author

To respond to my last comment, I use the order.ship_address as a default address for a shipment, so by default a shipment has shipment_id: nil and so it refers to the order ship address.
Now I have another issue with this case :
1 - I set the order ship address, it creates all the shipments with default address
2 - I update one shipment address to be different from the order.ship_address,
3 - I update the order.ship_address.

Result: it will destroy and recreate all the shipments and therefore I loose the modified shipment address.

How could I keep a modified shipment address when updating the order ?

@AdnanTheExcellent
Copy link

AdnanTheExcellent commented May 21, 2018

@loicginoux try adding following functions in your order decorator:

  def ensure_updated_shipments; end
  
  def refresh_shipment_rates; end

This should override those order methods and prevent the shipments from being updated with new rates as well as prevent the shipments from being destroyed. Hope that helps. You will have to manually update your shipments though, which it seems like you want to do.

@solidusio solidusio locked and limited conversation to collaborators Sep 7, 2022
@waiting-for-dev waiting-for-dev converted this issue into discussion #4599 Sep 7, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants