- Posts: 26
- Thank you received: 0
provide shipping address during registration
- issa.mouawad
-
Topic Author
- Offline
Less
More
10 years 5 months ago #239085
by issa.mouawad
provide shipping address during registration was created by issa.mouawad
-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.4.8
Hi , I would like to simplify guest checkout by dispalying both billing and shipping address(in case the product is shippable of course) initially,
I guessed that I should update the view registration_bootstrap to check for shippment requirement and then display the view of shipping address, but how I am going to direct the system to save the address when the user press "register".
this will require - as far as I know- a modification to some controller function,
can you please assist me on that ?
-- Joomla version -- : 3.4.8
Hi , I would like to simplify guest checkout by dispalying both billing and shipping address(in case the product is shippable of course) initially,
I guessed that I should update the view registration_bootstrap to check for shippment requirement and then display the view of shipping address, but how I am going to direct the system to save the address when the user press "register".
this will require - as far as I know- a modification to some controller function,
can you please assist me on that ?
Please Log in or Create an account to join the conversation.
10 years 5 months ago #239126
by nicolas
Replied by nicolas on topic provide shipping address during registration
Hi,
Yes, the system doesn't support the saving of the extra fields you would add. So you'll have to edit the file components/com_hikashop/controllers/checkout.php in the _doRegister function which handles the registration.
It actually calls the function "register" of administrator/components/com_hikashop/classes/user.php so you'll want to look there as well. While you might not need to modify that second file, that's where the address fields are saved so it will be interesting to you to see how it's done by default.
Yes, the system doesn't support the saving of the extra fields you would add. So you'll have to edit the file components/com_hikashop/controllers/checkout.php in the _doRegister function which handles the registration.
It actually calls the function "register" of administrator/components/com_hikashop/classes/user.php so you'll want to look there as well. While you might not need to modify that second file, that's where the address fields are saved so it will be interesting to you to see how it's done by default.
Please Log in or Create an account to join the conversation.
- issa.mouawad
-
Topic Author
- Offline
Less
More
- Posts: 26
- Thank you received: 0
10 years 5 months ago #239259
by issa.mouawad
Replied by issa.mouawad on topic provide shipping address during registration
thanks for your guidance, I have managed to store the address , however the next step(address) is displayed yet it contains the previously entered address, how can I make the checkout jumps over the address step,
I thought I can delete the step "address" from the checkout, but that disables displaying it altogether (even during the registration )
can you please assist me ?
I think I need to load checkout/ address view during registration, but I can't load the view from another controller(registration is part of "user" while "address" is part of checkout)
I thought I can delete the step "address" from the checkout, but that disables displaying it altogether (even during the registration )
can you please assist me ?
I think I need to load checkout/ address view during registration, but I can't load the view from another controller(registration is part of "user" while "address" is part of checkout)
Please Log in or Create an account to join the conversation.
10 years 5 months ago #239271
by nicolas
Replied by nicolas on topic provide shipping address during registration
Hi,
To set the billing or shipping address you can do like that:
It will then be used automatically by the address view.
To set the billing or shipping address you can do like that:
Code:
$app = JFactory::getApplication();
$app->setUserState(HIKASHOP_COMPONENT.'.shipping_address', $address_id);
$app->setUserState(HIKASHOP_COMPONENT.'.billing_address', $address_id);
Please Log in or Create an account to join the conversation.
Time to create page: 0.260 seconds