Next Button displayed both top and bottom
- condorazul
-
Topic Author
- Offline
Less
More
12 years 8 months ago #139250
by condorazul
Next Button displayed both top and bottom was created by condorazul
I would like to display the next button in checkout in both top and bottom how can i do it?
Please Log in or Create an account to join the conversation.
12 years 8 months ago #139354
by nicolas
Replied by nicolas on topic Next Button displayed both top and bottom
Hi,
There is no option for that. You would have to edit the file "show" of the view "product" via the menu Display>Views and copy/paste the code of the next/previous buttons at the bottom.
There is no option for that. You would have to edit the file "show" of the view "product" via the menu Display>Views and copy/paste the code of the next/previous buttons at the bottom.
Please Log in or Create an account to join the conversation.
- condorazul
-
Topic Author
- Offline
12 years 8 months ago #139366
by condorazul
Replied by condorazul on topic Next Button displayed both top and bottom
Ive already tried but when i copy paste it breaks evwrything and display error message. Can you please tell me wich code to copy and whre to insert it. It shold be at the syart bellow the navigation steps
Please Log in or Create an account to join the conversation.
12 years 8 months ago #139405
by nicolas
Replied by nicolas on topic Next Button displayed both top and bottom
It's that code:
that you can put at the end of the file, after adding an opening PHP tag: <?php at the beginning.
Code:
if(!empty($this->links->previous))
echo "<a title='".JText :: _('PREVIOUS_PRODUCT')."' href='".$this->links->previous."'><span class='hikashop_previous_product'></span></a>";
if(!empty($this->links->next))
echo "<a title='".JText :: _('NEXT_PRODUCT')."' href='".$this->links->next."'><span class='hikashop_next_product'></span></a>";
echo "<div class='clear_both'></div>";
Please Log in or Create an account to join the conversation.
- condorazul
-
Topic Author
- Offline
12 years 8 months ago - 12 years 8 months ago #139422
by condorazul
Replied by condorazul on topic Next Button displayed both top and bottom
Are you sure is that code? i mean i want the button next in checkout not the product buttons, the button y want is continue shopping and i think it is in step view.
<?php
if($this->continueShopping){
if(strpos($this->continueShopping,'Itemid')===false){
if(strpos($this->continueShopping,'index.php?')!==false){
$this->continueShopping.=$url_itemid;
}
}
if(!preg_match('#^https?
/#',$this->continueShopping)) $this->continueShopping = JURI::base().ltrim($this->continueShopping,'/');
echo $this->cart->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,JRoute::_($this->continueShopping),'window.location=\''.JRoute::_($this->continueShopping).'\';return false;','id="hikashop_checkout_shopping_button"');
}
}
?>
<div class="clear_both"></div>
i copy that code but it does not work it displays an error
<?php
if($this->continueShopping){
if(strpos($this->continueShopping,'Itemid')===false){
if(strpos($this->continueShopping,'index.php?')!==false){
$this->continueShopping.=$url_itemid;
}
}
if(!preg_match('#^https?
/#',$this->continueShopping)) $this->continueShopping = JURI::base().ltrim($this->continueShopping,'/');echo $this->cart->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,JRoute::_($this->continueShopping),'window.location=\''.JRoute::_($this->continueShopping).'\';return false;','id="hikashop_checkout_shopping_button"');
}
}
?>
<div class="clear_both"></div>
i copy that code but it does not work it displays an error
Last edit: 12 years 8 months ago by condorazul.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 8 months ago #139450
by Mohamed Thelji
Replied by Mohamed Thelji on topic Next Button displayed both top and bottom
Hi,
You'll just have to use the following code at the beginning of the checkout view's file of the first action of each step of your checkout workflow ("Hikashop->System->Configuration->Checkout"), for example if the first action of one of your step is address, then you'll have to add this code at the begining of the address file of the checkout view of your front-end template through "Hikashop->Display->Views" :
Also, don't forget to add this code around PHP tags : <?php YOURCODE ?>
You'll just have to use the following code at the beginning of the checkout view's file of the first action of each step of your checkout workflow ("Hikashop->System->Configuration->Checkout"), for example if the first action of one of your step is address, then you'll have to add this code at the begining of the address file of the checkout view of your front-end template through "Hikashop->Display->Views" :
Code:
if($this->nextButton)
{
if($this->step == (count($this->steps) - 2)) {
$checkout_next_button = JText::_('CHECKOUT_BUTTON_FINISH');
if($checkout_next_button == 'CHECKOUT_BUTTON_FINISH')
$checkout_next_button = JText::_('NEXT');
} else
$checkout_next_button = JText::_('NEXT');
echo $this->cart->displayButton($checkout_next_button,'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"');
$button = $this->config->get('button_style','normal');
if ($button=='css')
echo '<input type="submit" style="position: absolute; left: -9999px; width: 1px; height: 1px;"/></input>';
}
Also, don't forget to add this code around PHP tags : <?php YOURCODE ?>
Please Log in or Create an account to join the conversation.
- condorazul
-
Topic Author
- Offline
12 years 8 months ago #139494
by condorazul
Replied by condorazul on topic Next Button displayed both top and bottom
and there is no way to add it in step before the form starts? it woould be in all the pages.
i tried copy/paste there but did not work.
i tried copy/paste there but did not work.
Please Log in or Create an account to join the conversation.
12 years 8 months ago #139522
by nicolas
Replied by nicolas on topic Next Button displayed both top and bottom
Before the form starts, no you should avoid it as it might not work in some cases.
Please Log in or Create an account to join the conversation.
Time to create page: 0.241 seconds