4
votes
Accepted
How to import user addresses?
Addresses are not Elements, so most import plugins will no support them as an import type.
You will need to create a plugin or script that imports the addresses into the commerce_addresses table. You ...
2
votes
How to make the shipping address and billing address the same?
Docs
As you can see from both examples, the shipping address is always submitted, and the billingAddress can either be also included, or set to the same address as the shipping address with the ...
2
votes
Accepted
Can I add a billing address while updating the cart?
Yes, you can submit all updates to the cart in the one controller action commerce/cart/update-cart
1
vote
Accepted
Limit countries shown in checkout shipping to countries assigned in shipping zones settings?
You would need to either
1) Delete all the countries you don't use within your site in commerce > settings > countries.
2) Simply hide them in twig with something like this:
{% set ...
1
vote
How can I best add additional fields to the Address form during the checkout
I would suggest that date and place of birth would be more appropriate as custom fields on the User profile rather than attached to the address. They don't appear to have any relevance to an address, ...
1
vote
Commerce: Calling unknown method error on Edit Address screen
You have a variable called model set to a matrix block (as per the error, a matrix block doesn't have a firstName field). The model needs to be an address model.
1
vote
Accepted
EVENT_DEFINE_ADDRESS_LINES not pushing response back to Craft Commerce
I have return $addressLines; when it should be $event->addressLines = $addressLines;. In an event the idea is to manipulate the event variables, these will then be used by the code later on. My ...
1
vote
Accepted
Craft Commerce "state" dropdown field fails to populate with states for new customer addresses
This is caused by the model.countryId not being defined on first page load, which means the options defaults to an empty array. Once the address is saved, the selected country that is saved will ...
1
vote
Accepted
Override "sameAddress" option when updating cart
It is possible to override sameAddress
The trick to doing this is as follows:
Checkout Step 1: Set your shipping address and use sameAddress1
<form method="POST">
<input type="hidden" ...
1
vote
Accepted
Craft Commerce - Edit Complete Order Address from frontend
As mentioned previously, addresses can not be edited on the order once the order is complete (from the front-end).
Right now completed order's addresses can only be edited by admins.
The only way ...
1
vote
Craft Commerce - Edit Complete Order Address from frontend
When the order is completed a copy of the address is made which is created for that specific order, that explains why it doesn't show up in the customers_addresses table.
This is so that the address ...
1
vote
Carry address over with customer's order when creating user
It's not implemented, but possible. I think it should be part of Commerce core really, and done when the user is created by default.
In the meantime, my Register On Checkout plugin does this - https:...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
addresses × 14plugin-craftcommerce × 12
craft3 × 1
plugins × 1
users × 1
php × 1
error-message × 1
plugin-craftcommerce2 × 1
plugin-craftcommerce3 × 1
order × 1
models × 1
shipping × 1
payment-methods × 1
plugin-commerce-stripe × 1
cart × 1
commerce4 × 1