capturing Address at checkout

  • Posts: 27
  • Thank you received: 0
4 years 9 months ago #308262

-- HikaShop version -- : 2.3.3
-- Joomla version -- : NA
-- PHP version -- : nA
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : none

Were trying to capture the address at checkout and place into the address table on a custom checkout page, but were not having any success.

We have the following input fields in our form.


<input type="text" name="data[address][address_firstname]" value="">
<input type="text" name="data[address][address_lastname]" value="">
<input type="text" name="data[address][address_telephone]" value="">
<input type="text" name="data[address][address_street]" value="">
<input type="text" name="data[address][address_city]" value="">
<input type="text" name="data[address][address_state]" value="">
<input type="text" name="data[address][address_post_code]" value="">

Currently, we have no problems placing data into the order table with similar formatting like:
<input type="text" name="data[order][post_code]" value="">

Any assistance is appreciated.

Also, where are we able to obtain older versions of hikashop? IE 2.3.3

Thank you!

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
4 years 9 months ago #308263

Hi,

1. Custom address fields are meant to be processed during the registration / guest registration step (or when editing an address).
So normally, they are handled by the after_login task of the checkout controller while the registration process is being done.
Do you also ave data[register] fields like on the default checkout ?

2. Old version of HikaShop are not freely available.
If you want one, please request it via our contact form:
www.hikashop.com/support/contact-us.html
Please specify the version and edition you which to get and if the edition is not the starter one, please also provide information about your purchase of that edition.

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 0
4 years 9 months ago #308405

We dont have any data[register] fields in our checkout process. Can you explain how I would go about adding this?

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
4 years 9 months ago #308407

Hi,

An address needs to be associated to a user entry.
So, supposing that you're not logged in, and supposing that you have activated the guest checkout you would only need to have data[register] in order to get the email address of the customer. If you are in registration mode, then you should also get the username and password with data[register][username] and data[register][password] If you allow the customer to choose his registration mode (guest or registration), then you would also need data[register][registration_method]. Basically, the same inputs that you would see on the normal HikaShop registration page based on how your checkout is configured.[email] in order to get the email address of the customer.
If you are in registration mode, then you should also get the username and password with data[register][username] and data[register][password]
If you allow the customer to choose his registration mode (guest or registration), then you would also need data[register][registration_method].
Basically, the same inputs that you would see on the normal HikaShop registration page based on how your checkout is configured.

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 0
4 years 9 months ago #308707

Yes were doing just guest checkout. So we would do something like data[register][address_street] or all of the fields in the address table? What inputs are required for this to work? data[register][address_user_id] ?
Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
4 years 9 months ago #308711

Hi,

No, you need to keep the address fields with data[address]address_street].
It's data[register] that you need. Basically, the same as the form on the normal checkout. I would recommend to have a look at its HTML. You'll directly see all the fields and the names they have.[email] that you need.
Basically, the same as the form on the normal checkout. I would recommend to have a look at its HTML. You'll directly see all the fields and the names they have.

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 0
4 years 9 months ago #308734

I think we have the starter edition and Im guessing this wont work on that.

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
4 years 9 months ago #308741

Hi,

With the Starter edition, there is no guest checkout.
In that case, you need to provide the password and email and username fields inside data[register] in order to do a normal registration.
Otherwise, the form submit will be refused as incomplete.

The following user(s) said Thank You: cworthen75

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum