Change final button to Submit Order in checkout

  • Posts: 202
  • Thank you received: 2
13 years 7 months ago #13429

I have my checkout process using the following workflow:

login,cart_coupon,address,confirm_cart,end

My store has no prices, as it is a b2b store with our clients. When someone gets to the last step in the checkout process (confirm_cart), I would like the "Next" button to change to "Submit Order". Is that possible? If so, how?

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

  • Posts: 202
  • Thank you received: 2
13 years 7 months ago #13431

I found this section of code in the 'step' view:

if($this->nextButton){
			echo $this->cart->displayButton(JText::_('NEXT'),'next',$this->params,hikashop::completeLink('checkout&task=step&step='.$this->step+1),'if(hikashopCheckChangeForm(\'order\',\'hikashop_checkout_form\'))document.forms[\'hikashop_checkout_form\'].submit(); return false;','id="hikashop_checkout_next_button"');
		}

Looks like I need to play around with this area of the file.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 7 months ago #13434
Last edit: 12 years 9 months ago by nicolas.

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

  • Posts: 202
  • Thank you received: 2
13 years 7 months ago #13435

Thanks for the usual level of prompt service!!! I tried searching the forum - REALLY - before posting!

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

  • Posts: 202
  • Thank you received: 2
13 years 7 months ago #13439

Nicolas,

The code worked PERFECTLY!! Thanks!

As an aside, is there any way to add a "Back" button into the step process in checkout? I know a user can click on the progress bar at the top to go back, but the button may be more intuitive.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 7 months ago #13441

You could add something like that:

echo $this->cart->displayButton(JText::_('Back'),'back',$this->params,hikashop::currentUrl(),'history.back();return false;','id="hikashop_checkout_back_button"');

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

  • Posts: 202
  • Thank you received: 2
13 years 7 months ago #13444

Again, thanks! I wrapped it in an IF statement so it does not show on the first step in the process, like:

if($this->step!=0){
echo $this->cart->displayButton(JText::_('BACK'),'back',$this->params,hikashop::currentUrl(),'history.back();return false;','id="hikashop_checkout_back_button"');
}

That way it keeps the button functioning within the confines of the checkout process ONLY.

Many, many thanks!
Rick

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

Time to create page: 0.068 seconds
Powered by Kunena Forum