Skip to main content

Label - Next Button

More
15 years 7 months ago #9242 by maekz
Label - Next Button was created by maekz
Hi,

is it possible to change the label of the 'next/continue' button in a step (especially only in one step)? (e.g.: complete order)
i only found something in the view 'checkout / step.php', but thought that it was for all steps, wasn't it?

Thanks
The following user(s) said Thank You: klimmbimm

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

More
15 years 7 months ago #9249 by nicolas
Replied by nicolas on topic Re: Label - Next Button
Yes, indeed it's for all the steps.

It depends on your checkout workflow. If you have only one step like it is by default, you can change the name to finish bu otherwise, you will have to add a condition to change the label based on the current step...

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

More
15 years 7 months ago #9287 by maekz
Replied by maekz on topic Re: Label - Next Button
ok, thanks for ya quick answer.

i think its too difficult to create such a condition, isn`t it?

would be deeply grateful...


thanks

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

More
15 years 7 months ago #9288 by nicolas
Replied by nicolas on topic Re: Label - Next Button
Here is an explanation on the last post:
translate.google.com/translate?js=n&prev...par-poids.html%23377
It's automatically translated from french but it seems to be enough to understand.

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

More
15 years 7 months ago #9294 by maekz
Replied by maekz on topic Re: Label - Next Button
hi nicolas,..first i have to say...Fantastic support!

i tried to understand the code, but don´t know where to put in the code and what i have to edit (only the step which i want to change or others too? or only the checkout / step.php ?)

my workflow is login_address,payment_shipping,cart_confirm_terms,end ( 4 steps (with end))think it is possible?=

think, havin a mental blank

sorry,

thanks

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

More
15 years 7 months ago #9297 by nicolas
Replied by nicolas on topic Re: Label - Next Button
Then you should use that code (the finish button will be on step 1):
Code:
if($this->step==2){ echo $this->cart->displayButton('Finish','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"'); }

That file step can be modified via the menu Display->views in Hikashop
The following user(s) said Thank You: woonydanny, SG

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

More
15 years 7 months ago #9317 by maekz
Replied by maekz on topic Re: Label - Next Button
Nicolas !!!!

i love u!

it works fine!

think to buy enterprise or business version for sooner projects!

NICE!

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

More
15 years 5 months ago #14305 by jmilli
Replied by jmilli on topic Re: Label - Next Button
Thanks! This is great!

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

More
14 years 6 months ago #44471 by maison05
Replied by maison05 on topic Re: Label - Next Button
I've 3 steps and End. Are the codes here still valid? I'm getting an error after I add in
Code:
if($this->step==2){ echo $this->cart->displayButton('Finish','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"'); }

after taking away
Code:
return false ',' id = "hikashop_checkout_next_button" ');

found in checkout/step.php in display->views

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

More
14 years 6 months ago #44616 by nicolas
Replied by nicolas on topic Re: Label - Next Button
It's not just
Code:
return false ',' id = "hikashop_checkout_next_button" ');
that you should take away but the whole
Code:
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"');
line of code.

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

More
14 years 6 months ago #44632 by maison05
Replied by maison05 on topic Re: Label - Next Button

nicolas wrote: It's not just

Code:
return false ',' id = "hikashop_checkout_next_button" ');
that you should take away but the whole
Code:
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"');
line of code.


It works! Thanks!

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

More
14 years 5 months ago - 14 years 5 months ago #46728 by klimmbimm
Replied by klimmbimm on topic Re: Label - Next Button
what happens in case of a Hikashop update or even an upgrade to Business Edition?
won't the manually changed code be gone afterwards?
Last edit: 14 years 5 months ago by klimmbimm.

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

More
14 years 5 months ago #46733 by nicolas
Replied by nicolas on topic Re: Label - Next Button
No, you won't loose your modifications when you update/upgrade as long as you do them via the interface, as we recommend.
The following user(s) said Thank You: klimmbimm

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

More
14 years 4 months ago #50170 by klimmbimm
Replied by klimmbimm on topic Re: Label - Next Button
another more general question to this: where are my adaptions physically saved?

in case of emails it is "media/com_hikashop/mail/" with "modified" in the filename.
what about the adaptions under display -> view?

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

More
14 years 4 months ago #50231 by nicolas
Replied by nicolas on topic Re: Label - Next Button
in templates/YOUR_TEMPLATE/html/com_hikashop
The following user(s) said Thank You: klimmbimm

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

More
14 years 2 months ago #57796 by foleys
Replied by foleys on topic Re: Label - Next Button
Hi,
what am I doing wrong? I can`t edit the step-file. If I push the save button, the not edited text appears again. :(
Regards,
Foleys

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

More
14 years 2 months ago #57859 by nicolas
Replied by nicolas on topic Re: Label - Next Button
Try to disable the codemirror plugin of joomla which can sometimes causes such problems.
The following user(s) said Thank You: foleys

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

More
14 years 2 months ago #57905 by foleys
Replied by foleys on topic Re: Label - Next Button
Hi Nicolas,
thank you very much!!!

You`re right, the codemirror was the problem.
Now it is working very well.

Best regards

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

More
13 years 10 months ago - 13 years 10 months ago #72862 by ihaveaquestion
Hi,

this is a part of my step.php file:
Code:
<?php if($this->nextButton){ echo $this->cart->displayButton(JText::_('HIKA_NEXT'),'next',$this->params,hikashop_completeLink('checkout&task=step&step='.($this->step+1)),'if(hikashopCheckChangeForm(\'order\',\'hikashop_checkout_form\')){ if(hikashopCheckMethods()){ document.getElementById(\'hikashop_validate\').value=1; document.forms[\'hikashop_checkout_form\'].submit();}} return false;','id="hikashop_checkout_next_button"'); } ?> </form> <?php

So what do I need to change here in order to get a confirm button before the last step?
I tried including
Code:
if($this->step==2){ echo $this->cart->displayButton('Finish','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"'); }

But then I will just get a white screen when I click on the shop and nothing appears. This is my checkout workflow: cart, login_adress_shipping, payment_status_fields.

Can you help me?
Last edit: 13 years 10 months ago by ihaveaquestion.

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

More
13 years 10 months ago #73211 by nicolas
Replied by nicolas on topic Re: Label - Next Button
That modification sounds fine.

However, your checkout workflow should be like that:
cart,login_adress_shipping,payment_status_fields_confirm,end

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

Time to create page: 0.385 seconds
Powered by Kunena Forum