Skip to content
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

Creating address via /actions/commerce/customer-addresses/save always pushes to billing and shipping #1069

Closed
engram-design opened this issue Oct 23, 2019 · 1 comment
Assignees
Milestone

Comments

@engram-design
Copy link
Contributor

Not sure if this is required functionality, or supposed to happen, but If I submit a request to this controller, it'll set both the billing and shipping address for the customer. Is this correct?

In our instance, customers want to be able to control their billing and shipping addresses independently. The customers set their shipping address first (during cart), then much later set their billing address. Due to this behaviour, the shipping address is pushed on to the billing address, which we don't want.

Pretty much these lines -https://github.com/craftcms/commerce/blob/develop/src/controllers/CustomerAddressesController.php#L103-L111 assume that if one of the addresses isn't set, push it onto that.

Expected behaviour? I would've though the billingAddressSameAsShipping/shippingAddressSameAsBilling or autoSetNewCartAddresses config settings might have been in use here.

@nfourtythree
Copy link
Contributor

Have pushed a fix for this that will be included in 3.0.

joshangell added a commit to joshangell/commerce that referenced this issue Dec 5, 2019
…item-options-management

* upstream/3.0: (337 commits)
  Fixed delete orders permission
  Fixed edit orders permission
  Update translation method usage
  Remove EVENT_REGISTER_ADDRESS_VALIDATION_RULES event fixes craftcms#1031
  Fixed a js bug with the shipping zone field on shipping rules
  Added line item statuses table constant and updated references
  Added ability to sort by first, last and full name for billing and shipping addresses on the orders index page
  Fixed an error that would select the wrong tax zone when editing a tax rate
  finish 2.2.8
  Update changelog
  Added the COMMERCE_PAYMENT_CURRENCY environment variable
  Update save customer address, don’t force primary address if blank fixes craftcms#1069
  Build commerce UI files
  Update order status message max length craftcms#971
  Fixed order status condition IDs are strings at this point
  Changelog tweak
  Fixed old Customer field migration now that the Customer field has been removed
  Remove customer fieldtype
  Fixed random char in changelog
  Normalise duration settings to use seconds craftcms#1071
  ...

# Conflicts:
#	src/models/Settings.php
#	src/web/assets/commerceui/dist/js/app.js
#	src/web/assets/commerceui/dist/js/app.js.map
#	src/web/assets/commerceui/dist/js/chunk-vendors.js
#	src/web/assets/commerceui/dist/js/chunk-vendors.js.map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants