Skip to content
New issue

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

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

Already on GitHub? # to your account

Incomplete Documentation for requireBillingAddressAtCheckout and requireShippingAddressAtCheckout Settings #637

Open
romainpoirier opened this issue Jul 26, 2024 · 4 comments

Comments

@romainpoirier
Copy link

What happened?

Description

In the Craft Commerce 5 documentation, the following section mentions two configuration settings:

Customize what address information is required at checkout with the requireBillingAddressAtCheckout and requireShippingAddressAtCheckout config settings.

The tax and shipping engines require address information to generate accurate options and costs.

However, when clicking on the requireBillingAddressAtCheckout and requireShippingAddressAtCheckout links, no information is provided on the destination page.

Steps to reproduce

  1. Go to Craft Commerce 5 - Synchronizing Shipping and Billing Addresses
  2. Click on the requireBillingAddressAtCheckout link
  3. Click on the requireShippingAddressAtCheckout link

Expected behavior

Information or documentation about the requireBillingAddressAtCheckout and requireShippingAddressAtCheckout settings should be displayed.

Actual behavior

No information is provided on the destination page after clicking the links.

Questions

  1. Are these settings available?
  2. How should they be used?
  3. Where can detailed documentation for these settings be found?

Craft CMS version

5.2.28

Craft Commerce version

5.0.14

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@lukeholder lukeholder transferred this issue from craftcms/commerce Jul 26, 2024
@lukeholder
Copy link
Member

Those settings are now on a per store level and not global commerce configs, so the doc links need updating.

I have moved this issue to the docs repo so we can sort that.

In the meantime, to explain what those settings do: setting either of those store settings to true will cause order completion on final checkout (which usually only happens when making payment) to return as invalid. The cart will get a validation error for missing addresses.

Hope that helps.

@romainpoirier
Copy link
Author

Ok, thank you. However, I still do not understand how to set other required fields for the customer address (specifically during the users/save-address action).

In this case, I want firstName and lastName to be required, as well as organizationTaxId.

I cannot find additional options under /admin/commerce/store-management/primary.

@lukeholder lukeholder changed the title [5.x]: Incomplete Documentation for requireBillingAddressAtCheckout and requireShippingAddressAtCheckout Settings Incomplete Documentation for requireBillingAddressAtCheckout and requireShippingAddressAtCheckout Settings Jul 26, 2024
@lukeholder
Copy link
Member

@romainpoirier Sorry those settings just make the addresses required to be on the order, not specific fields.

If you want to add validation to the addresses on the order, you need to add you‘re own validation within a module.

You can add validation to all addresses as documented here:

https://craftcms.com/docs/5.x/reference/element-types/addresses.html#validating-addresses

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants