Eliminate 'change guest information' step

  • Posts: 18
  • Thank you received: 0
3 years 6 months ago #332496

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.3
-- Browser(s) name and version -- : Chrome 90.0.4430.93

Hello,

I am building a 2 step checkout. First step is login and 2nd step all the other things.
In the login step I have included all 3 options (login, register, guest). In the guest option, when someone enters the guest email and hits next button, then there is a "hidden" step where there is this button "change guest information". The client wants to remove this step.
Will this be a heavy customization? I mean, will removing this step break something else?

Also they want to put guest as the first option in the left block with the 3 options (even though the guest is default). Is this easy?

Thank you in advance.

Last edit: 3 years 6 months ago by kathrin20.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 6 months ago #332500

Hi,

1. What you can try is to edit the file show_block_login via the Display>Views menu and replace the code:

<span id="hikashop_checkout_guest_email_title">
		<?php echo JText::_('HIKA_EMAIL'); ?><span class="hikashop_checkout_guest_email_separator">:</span>
	</span>
	<span id="hikashop_checkout_guest_email_value"><?php echo $this->options['current_login']->user_email; ?></span>
	<a href="" class="<?php echo $this->config->get('css_button','hikabtn'); ?> hikabtn_checkout_guest_logout" onclick="window.checkout.submitBlock('login', <?php echo $this->step; ?>, <?php echo $this->module_position; ?>, 'hikashop_checkout_guest_logout=1'); this.disabled=true; window.Oby.addClass(this, 'next_button_disabled'); return false;"><?php
		echo JText::_('CHANGE_GUEST_INFORMATION');
?>
	</a>
by:
<script>window.checkout.submitStep(this);</script>
That will force the system to go to the next step when the user access the first step while having already filled in the guest form.

2. In that same view file, you have the code:
if($this->options['show_login']) {
				$v = JHTML::_('select.option', 'login', JText::_('HIKA_LOGIN').'<br/>');
				$v->class = 'hikabtn-checkout-login';
				$values[] = $v;
			}
			if($this->options['registration_registration']) {
				$v = JHTML::_('select.option', 0, JText::_('HIKA_REGISTRATION').'<br/>');
				$v->class = 'hikabtn-checkout-registration';
				$values[] = $v;
			}
			if($this->options['registration_simplified']) {
				$v = JHTML::_('select.option', 1, JText::_('HIKA_REGISTRATION').'<br/>');
				$v->class = 'hikabtn-checkout-simplified';
				$values[] = $v;
			}
			if($this->options['registration_password']) {
				$v = JHTML::_('select.option', 3, JText::_('HIKA_REGISTRATION').'<br/>');
				$v->class = 'hikabtn-checkout-simplified-pwd';
				$values[] = $v;
			}
			if($this->options['registration_guest']) {
				$v = JHTML::_('select.option', 2, JText::_('GUEST').'<br/>');
				$v->class = 'hikabtn-checkout-guest';
				$values[] = $v;
			}
Just change the order of the different pieces of code to have them in a different order.

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

  • Posts: 6
  • Thank you received: 0
3 years 6 months ago #332534

following

Last edit: 3 years 6 months ago by attenzo.

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

  • Posts: 18
  • Thank you received: 0
3 years 6 months ago #332535

Nicolas, Thank you for your prompt response!

About 2, ok done great.

About 1. I applied the code and now when I fill in the guest e-mail it takes me to a screen where there is only a next button and nothing else and I am still in the first step of the checkout.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 6 months ago #332543

Hi,

Could you provide a link to the shop so that we could check on the situation and reproduce what you're describing ?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 6 months ago #332562

Hi,

Thanks for the link.
My bad. I forgot to replace the parameter in the code I gave.
The code should be:

<script>window.checkout.submitStep(document.getElementById('hikabtn_checkout_next'));</script>
So please replace it and it should then work fine.

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

  • Posts: 18
  • Thank you received: 0
3 years 6 months ago #332586

This code brings back the e-mail and the button "change guest information"

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 6 months ago #332593

Hi,

I don't see how that would be possible since the email input and the button HTML have to be replaced by that code.
The code to display the email input and the button should not be in the view after change so it's not possible that it would display.
Please review your changes.

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

  • Posts: 18
  • Thank you received: 0
3 years 6 months ago #332609

Yes! I thought it was very odd. I don't know how it happened since the other code was out.
I then decided to make it one step checkout instead of two steps in order not to customize anything.
Thanks again.

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

Time to create page: 0.079 seconds
Powered by Kunena Forum