Jan Fromm Posted June 14, 2023 Posted June 14, 2023 Hi @kongondo, I am trying to place useBillingAddress in a Customer Checkout Form: <input name="useBillingAddress" id="useBillingAddress" type="checkbox" value="1"> <label for="useBillingAddress">Use Billing Address</label> I’m not sure if this is really required, but I also referred to this field in the checkout template: $customFormFields = [ [ 'input_name' => 'useBillingAddress', 'type' => 'integer' ], ]; Anyway, no luck. When I look in $orderCustomer during checkout confirmation, it always shows ["useBillingAddress"]=> int(0), whether the checkbox is selected or not. The documentation doesn’t list useBillingAddress as a Supported Form Input field – Should I assume it’s not possible this way? Thanks!
kongondo Posted June 14, 2023 Posted June 14, 2023 Hi @Jan Fromm, Yes. This is currently used for orders created manually (in the backend). What's your use case? I cannot remember why I disabled the saving of the value for frontend use.
Jan Fromm Posted June 15, 2023 Author Posted June 15, 2023 I would like to provide the customer with an optional license address (and occupy the billing address fields for this). In this case, useBillingAddress would be very useful for form validation: when this checkbox is selected, the billing address input fields become required. I can solve this in another way, but useBillingAdress seems well suited for this.
kongondo Posted June 15, 2023 Posted June 15, 2023 9 hours ago, Jan Fromm said: I would like to provide the customer with an optional license address (and occupy the billing address fields for this). In this case, useBillingAddress would be very useful for form validation: when this checkbox is selected, the billing address input fields become required. OK. I will re-enable this in a future Padloper version. Meanwhile, I'll send you a PM with a suggestion for an interim solution. Thanks. 1
Jan Fromm Posted June 16, 2023 Author Posted June 16, 2023 Hi @kongondo, I may have discovered a bug. I am using billingAddressCountry in the Customer Checkout form: <select id="billingAddressCountry" name="billingAddressCountry"> <option> </option> <option value="1195">Belgium</option> <option value="1205">Germany</option> <option value="1454">United Kingdom</option> </select> After submitting the form, $orderCustomer looks like this: ... ["billingAddressCountry"]=> string(4) "1205" ["billingAddressCountryID"]=> int(0) ... However, it should look like this: ... ["billingAddressCountry"]=> string(7) "Germany" ["billingAddressCountryID"]=> int(1205) ... Apparently $orderCustomer->billingAddressCountry is not determined based on the submitted Country ID of billingAddressCountry. Or did I understand this wrong? 1
kongondo Posted June 16, 2023 Posted June 16, 2023 6 hours ago, Jan Fromm said: I may have discovered a bug. I am using billingAddressCountry in the Customer Checkout form: Hi @Jan Fromm, Thanks for reporting. Looks like an omission on my part. I'll have a look.
kongondo Posted June 27, 2023 Posted June 27, 2023 Hi @Jan Fromm, I can confirm that this is a bug. I have it fixed in my current dev version. I am hoping to make that the next release of Padloper. I hope to do this pretty soon. Hopefully it isn't too late for your needs. Please let me know if it is. Thanks. 1
Jan Fromm Posted June 28, 2023 Author Posted June 28, 2023 Hi @kongondo, Thanks for checking! No hurry – it’s not urgent from my end.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now