- Posts: 70
- Thank you received: 4
Continue and Next buttons on first page of checkou
13 years 3 months ago #119879
by intown
Continue and Next buttons on first page of checkou was created by intown
-- url of the page with the problem -- :
www.charitymobi.org/purchase-ticket/checkout
-- HikaShop version -- : 2.2.0
-- Joomla version -- : 3.1.5
On the first step of our checkout page a "Continue" and "Next" button are appearing.
I am pretty sure the continue button has to do with user registration and the next button is part of the checkout process.
1. Are they both needed?
2. If they both do the same thing, what is the best way to hide the continue button? (I want to keep the next button since it has the same text and in same place as all of the other checkout screens)
Thanks! -- Steven
-- HikaShop version -- : 2.2.0
-- Joomla version -- : 3.1.5
On the first step of our checkout page a "Continue" and "Next" button are appearing.
I am pretty sure the continue button has to do with user registration and the next button is part of the checkout process.
1. Are they both needed?
2. If they both do the same thing, what is the best way to hide the continue button? (I want to keep the next button since it has the same text and in same place as all of the other checkout screens)
Thanks! -- Steven
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 3 months ago - 13 years 3 months ago #119895
by Mohamed Thelji
Replied by Mohamed Thelji on topic Continue and Next buttons on first page of checkou
Hi,
The continue button will test each field of your registration form, and the next button will only test if your username (email) is already used.
So if you hide the continue button, your registration won't be completely checked, and if you hide the next button, you won't be able to go through the next step if you're already logged in.
I think that the "best" solution will be to :
- Edit the checkout workflow through "Hikashop->System->Configuration->Checkout"
- Put only the "login" action through the first step
- Edit the Step file of the Checkout view of your front-end template and change this line :
By :
The continue button will test each field of your registration form, and the next button will only test if your username (email) is already used.
So if you hide the continue button, your registration won't be completely checked, and if you hide the next button, you won't be able to go through the next step if you're already logged in.
I think that the "best" solution will be to :
- Edit the checkout workflow through "Hikashop->System->Configuration->Checkout"
- Put only the "login" action through the first step
- Edit the Step file of the Checkout view of your front-end template and change this line :
Code:
if($this->nextButton){
Code:
if($this->nextButton && $this->step != 0){
Last edit: 13 years 3 months ago by Mohamed Thelji.
Please Log in or Create an account to join the conversation.
13 years 3 months ago #119897
by intown
Replied by intown on topic Continue and Next buttons on first page of checkou
Thanks so much for the reply and suggestion.
I already had the login step as the only item on the first step, so that was done. (I changed the name to shipping)
I had modified
to
So that I could change the text on the purchase step to custom text.
With the modifications I have made what should the new if statement look like?
Thanks! -- Steven
I already had the login step as the only item on the first step, so that was done. (I changed the name to shipping)
I had modified
Code:
if($this->nextButton){
to
Code:
if($this->step==4){
echo $this->cart->displayButton('Purchase Ticket','next',$this->params,hikashop::completeLink('checkout&task=step&step='.$this->step+1),'document.forms[\'hikashop_checkout_form\'].submit(); return false; ','id="hikashop_checkout_next_button"');
}else{
echo $this->cart->displayButton(JText::_('NEXT'),'next',$this->params,hikashop::completeLink('checkout&task=step&step='.$this->step+1),'document.forms[\'hikashop_checkout_form\'].submit(); return false;','id="hikashop_checkout_next_button"');
}
So that I could change the text on the purchase step to custom text.
With the modifications I have made what should the new if statement look like?
Thanks! -- Steven
Please Log in or Create an account to join the conversation.
13 years 3 months ago #119901
by Eliot
Replied by Eliot on topic Continue and Next buttons on first page of checkou
Your solution seems good.
It's way easier than changing the behavior of these button.
However I'm not sure I understood your question, which "if" are you talking about?
It's way easier than changing the behavior of these button.
However I'm not sure I understood your question, which "if" are you talking about?
Please Log in or Create an account to join the conversation.
13 years 3 months ago #119906
by intown
Replied by intown on topic Continue and Next buttons on first page of checkou
I am not sure how to write an if statement that will show the custom text on final checkout step and NOT display the next button on the first step (so only the continue button shows).
Here is our product page
www.charitymobi.org/purchase-ticket/product
you can go through the checkout to see how it works.
-- Steven
Here is our product page
www.charitymobi.org/purchase-ticket/product
you can go through the checkout to see how it works.
-- Steven
Please Log in or Create an account to join the conversation.
13 years 3 months ago #119986
by Eliot
Replied by Eliot on topic Continue and Next buttons on first page of checkou
Well in this case the code Mohamed gave you should work fine
Please Log in or Create an account to join the conversation.
13 years 3 months ago #120083
by intown
Replied by intown on topic Continue and Next buttons on first page of checkou
Thanks for the reply.
I am not sure how to combine
and
so the buttons work the way I need them to.
Thanks! -- Steven
I am not sure how to combine
Code:
if($this->nextButton && $this->step != 0){
and
Code:
if($this->step==4){
so the buttons work the way I need them to.
Thanks! -- Steven
Please Log in or Create an account to join the conversation.
13 years 3 months ago #120090
by intown
Replied by intown on topic Continue and Next buttons on first page of checkou
I think I got it.
Does this look correct?
Everything seems to work.
Does this look correct?
Code:
if($this->step==4){
echo $this->cart->displayButton('Purchase Ticket','next',$this->params,hikashop::completeLink('checkout&task=step&step='.$this->step+1),'document.forms[\'hikashop_checkout_form\'].submit(); return false; ','id="hikashop_checkout_next_button"');
}elseif($this->nextButton && $this->step != 0){
echo $this->cart->displayButton(JText::_('NEXT'),'next',$this->params,hikashop::completeLink('checkout&task=step&step='.$this->step+1),'document.forms[\'hikashop_checkout_form\'].submit(); return false;','id="hikashop_checkout_next_button"');
}
Everything seems to work.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 3 months ago - 13 years 3 months ago #120099
by Mohamed Thelji
Replied by Mohamed Thelji on topic Continue and Next buttons on first page of checkou
I think that you should use something like :
Code:
if($this->nextButton){
if($this->step != 0 && $this->step != 4){
echo $this->cart->displayButton(JText::_('NEXT'),'next',$this->params,hikashop::completeLink('checkout&task=step&step='.$this->step+1),'document.forms[\'hikashop_checkout_form\'].submit(); return false;','id="hikashop_checkout_next_button"');
}
if($this->step==4){
echo $this->cart->displayButton('Purchase Ticket','next',$this->params,hikashop::completeLink('checkout&task=step&step='.$this->step+1),'document.forms[\'hikashop_checkout_form\'].submit(); return false; ','id="hikashop_checkout_next_button"');
}
}
Last edit: 13 years 3 months ago by Mohamed Thelji.
The following user(s) said Thank You: intown
Please Log in or Create an account to join the conversation.
13 years 3 months ago #120121
by intown
Replied by intown on topic Continue and Next buttons on first page of checkou
Thanks so much for the code!
You guys are the best! -- Steven
You guys are the best! -- Steven
Please Log in or Create an account to join the conversation.
Time to create page: 0.081 seconds