Skip to main content

Change final button to Submit Order in checkout

More
15 years 5 months ago #13429 by momentis
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.

More
15 years 5 months ago #13431 by momentis
I found this section of code in the 'step' view:
Code:
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.

More
15 years 5 months ago - 14 years 8 months ago #13434 by nicolas
Last edit: 14 years 8 months ago by nicolas.

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

More
15 years 5 months ago #13435 by momentis
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.

More
15 years 5 months ago #13439 by momentis
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.

More
15 years 5 months ago #13441 by nicolas
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.

More
15 years 5 months ago #13444 by momentis
Again, thanks! I wrapped it in an IF statement so it does not show on the first step in the process, like:
Code:
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.221 seconds
Powered by Kunena Forum