Checkout address

  • Posts: 1119
  • Thank you received: 114
7 years 9 months ago #260634

Hi,

I would like to use "ask address on registration" but in this way i dont see how user could modify address later during checkout. I have tried to add address view in same step where login is but after registration or guest it will stay on same step and show address view. Is there a way to go into next step after registration or guest is done and skip address view? So later user could go back to address and modify it if need it.

Thanks

Last edit: 7 years 9 months ago by kyratn.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 9 months ago #260636

Hi,

Recent packages of HikaShop should already do that.
Nicolas implemented a modification in the checkout system two days ago so the "login" block will be able to invalid the "address" markers when the user registration is processed.
So, if there is an "address" block in the same step than the "login" block ; the moment when the user is registering, the fact that the user and the addresses are modified in the cart will not force the customer to stay on the same step.

That implementation has been made in order to allow a full "one step checkout" (with some conditions, for sure).
But in your case description, it should also do the "trick".

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 1119
  • Thank you received: 114
7 years 9 months ago #260676

Hi,

Unfortunately it doesn't do like that.
I have downloaded new package and installed it. I have set "ask address on registration" to YES. I have put login and address blocks in same step in checkout workflow settings. I have used switcher and tried to register + entered address details. After i have pressed register button it has loaded address view for me. All tried with protostar template without any modifications.

Kind Regards

Last edit: 7 years 9 months ago by kyratn.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 9 months ago #260678

Hi,

The processed I describe is just working when you press the "next" button.
For sure when you press the "registration" button, you are doing the registration in ajax ; there is no reloading of the page but some blocks will be refreshed.

So what you're asking is just not possible in ajax ; it is beyond the logic of dynamic calls which can refresh blocks.
If you want to go in the next step, you need to press the "next" button !

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 1119
  • Thank you received: 114
7 years 9 months ago #260770

Hi,

Thanks Jerome, I understand now.


Regards

Last edit: 7 years 9 months ago by kyratn.

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

  • Posts: 1119
  • Thank you received: 114
7 years 9 months ago #260997

Hi,

I am now have 2 issues with address customization.

1. Is it possible to have address block always be open like you would edit or create new address? What code should be removed/modified for this?

2. I have autocomplete for city. It was working fine with old version but not with new. If you create new address it works fine but not for editing. It looks like after ajax javascript doesn't work anymore. Not sure what can be done here to make it work.

The code for autocomplete i have is this:

<script type="text/javascript">
$(function () {
  $('#address_city').autocomplete({
    source: function (request, response) {
        $.getJSON("https://mysite.com/ajax_service.php?fnc=autocompleteLocalityDefault&callback=myAmazingFunction&term=" + request.term, function( data, status, xhr ) {
            response( $.map( data, function( item ) {
              return {
               value: item.label,
              }
         }));
      });
    },
    minLength: 3,
    delay: 200
  });
});
</script>

I have tried to put it inside address block but no luck.

Thanks

Last edit: 7 years 9 months ago by Jerome. Reason: clean code

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

  • Posts: 1119
  • Thank you received: 114
7 years 9 months ago #261009

3. I also want to notice that system will skip address view only for guest. Using registration after press "next" it will show address view which should be skipped as per Jerome advise. If this would be fixed i think this would solve all my problems.

Thanks

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 9 months ago #261015

Hi,

1.In a way, it could be possible with a little view override.
But I'm afraid that it will be difficult for the user to use a different address for the shipping.

2. I don't know where you put your code, but because the block can be refreshed :
- you have to reload the listener on the HikaShop checkout event
OR
- you need to put the script directly in the view so when the block is refreshing, it will be re-executed.
The other point is that I don't think that there is still an input with the id "address_city" ; we are avoiding such kind of ID in the checkout to be sure that two identical block can't generated unwanted side effects.

3. Thanks for the report ; I'll check the rules in the address checkout helper.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 1119
  • Thank you received: 114
7 years 9 months ago #261077

Hi,

1. Well, mostly everyone is using same shipping address in our shop and if someone need to change he could go back to address view and change it.
Does it require a lot view customization? Or it can be done with some code change. If you could tell me which line I should look then I would be very thankful.


2. Just found that I had to load jquery ui file from hikashop like this:

<script src="media/com_hikashop/js/jquery-ui.min.js"></script>

and script started to work inside view.

3. Great!


Thanks

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

  • Posts: 1119
  • Thank you received: 114
7 years 9 months ago #261123

Please ignore my last topic i have found what i need.

Thanks

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

  • Posts: 1119
  • Thank you received: 114
7 years 9 months ago #261348

Hi,

With old checkout i used this to display text under post code field in address view:

if($fieldName=='address_post_code') echo '<span class="address_post_code_search">SEARCH</span>';

However i can't get it to work with new one where you edit address. The code looks like this and text doesn't display.

<?php
			$onWhat = 'onchange';
			if($field->field_type == 'radio')
				$onWhat = 'onclick';

			$field->table_name = 'order';
			echo $this->fieldClass->display(
					$field,
					@$this->edit_address->$fieldname,
					'data[address_'.$this->step . '_' . $this->module_position.']['.$fieldname.']',
					false,
					' ' . $onWhat . '="hikashopToggleFields(this.value,\''.$fieldname.'\',\'address_'.$this->module_position.'\',0);"',
					false,
					$this->cart_addresses['fields'],
					$this->edit_address
             );
if($fieldName=='address_post_code') echo '<span class="address_post_code_search">SEARCH</span>';
		?>

Has anything changed? What code i could use now?

UPDATE: Sorry, found the issue...All fine.

Thanks

Last edit: 7 years 9 months ago by kyratn.

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

Time to create page: 0.075 seconds
Powered by Kunena Forum