- Posts: 13
- Thank you received: 0
A 'Continue shopping button' in the cart module
13 years 1 month ago - 13 years 1 month ago #116423
by Pistol
A 'Continue shopping button' in the cart module was created by Pistol
Is it possible to put an extra button (next or under 'Proceed to checkout') in the cart module.
An extra button 'Continue Shopping' like in the checkout page.
I found this topic on this forum, but I don't know where to place it.
link
An extra button 'Continue Shopping' like in the checkout page.
I found this topic on this forum, but I don't know where to place it.
link
Last edit: 13 years 1 month ago by Pistol.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 1 month ago #116432
by Mohamed Thelji
Replied by Mohamed Thelji on topic A 'Continue shopping button' in the cart module
Hi,
Like Jerome said, you'll have to place it through the cart file of your product view of your front-end template through "Hikashop->Display->Views"
Like Jerome said, you'll have to place it through the cart file of your product view of your front-end template through "Hikashop->Display->Views"
The following user(s) said Thank You: Pistol
Please Log in or Create an account to join the conversation.
13 years 1 month ago #116442
by Pistol
Replied by Pistol on topic A 'Continue shopping button' in the cart module
If I paste following code:
at the end of product- cart
All I get is a white page and I can't see my site...
Code:
$config =& hikashop_config();
$continueShopping = $config->get('continue_shopping', '');
if(!empty($continueShopping)) {
global $Itemid;
$url_itemid='';
if(!empty($Itemid)){
$url_itemid='&Itemid='.$Itemid;
}
if(strpos($continueShopping,'Itemid') === false) {
if(strpos($continueShopping,'index.php?') !== false) {
$continueShopping .= $url_itemid;
}
}
if(!preg_match('#^https?://#',$continueShopping)) $continueShopping = JURI::base().ltrim($continueShopping,'/');
echo $this->cart->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,JRoute::_($continueShopping),'window.location=\''.JRoute::_($continueShopping).'\';return false;','id="hikashop_checkout_shopping_button"');
at the end of product- cart
All I get is a white page and I can't see my site...
Please Log in or Create an account to join the conversation.
13 years 1 month ago #116444
by Pistol
Replied by Pistol on topic A 'Continue shopping button' in the cart module
Oooooh, I've missed an accolade } or how do you call this in English!!!
Great it works!!!!
Great it works!!!!
Please Log in or Create an account to join the conversation.
13 years 3 weeks ago - 13 years 3 weeks ago #121969
by rbeelen1
Replied by rbeelen1 on topic A 'Continue shopping button' in the cart module
I copied the code in the other post in my product-cart. However, I'm not an expert in these codes.
So I copied the code directly after the last line before } exit}
Please see below. Is this the correct way to do? If so, nothing has been changed, no continue shopping button was created. What is it that I do wrong?
Regards,
So I copied the code directly after the last line before } exit}
Please see below. Is this the correct way to do? If so, nothing has been changed, no continue shopping button was created. What is it that I do wrong?
Regards,
Code:
<input type="hidden" name="url" value="<?php echo $this->params->get('url');?>"/>
<input type="hidden" name="ctrl" value="product"/>
<input type="hidden" name="task" value="updatecart"/>
</form>
<?php } ?>
</div>
<div class="clear_both"></div>
<?php } ?>
<?php
if(JRequest::getWord('tmpl','')=='component'){
if(!headers_sent()){
header('Content-Type: text/css; charset=utf-8');
$config =& hikashop_config();
$continueShopping = $config->get('continue_shopping', '');
if(!empty($continueShopping)) {
global $Itemid;
$url_itemid='';
if(!empty($Itemid)){
$url_itemid='&Itemid='.$Itemid;
}
if(strpos($continueShopping,'Itemid') === false) {
if(strpos($continueShopping,'index.php?') !== false) {
$continueShopping .= $url_itemid;
}
}
if(!preg_match('#^https?://#',$continueShopping)) $continueShopping = JURI::base().ltrim($continueShopping,'/');
echo $this->cart->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,JRoute::_($continueShopping),'window.location=\''.JRoute::_($continueShopping).'\';return false;','id="hikashop_checkout_shopping_button"');
}
exit;
}
Last edit: 13 years 3 weeks ago by Jerome. Reason: code tag makes nice code blocks
Please Log in or Create an account to join the conversation.
13 years 3 weeks ago - 13 years 3 weeks ago #122045
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic A 'Continue shopping button' in the cart module
Hi,
You have to past the code where you want to display the button in the page.
And in your case, I guess that you want to display it under the cart list.
And please, use the code from this post:
www.hikashop.com/en/forum/4-how-to/60725...the-cart-module.html
Regards,
You have to past the code where you want to display the button in the page.
And in your case, I guess that you want to display it under the cart list.
Code:
$this->cart_product_price=false;
?>
</tbody>
</table>
<!-- PASTE THE BLOCK FROM THE OTHER POST RIGHT HERE -->
<?php
if($this->params->get('show_cart_quantity',1)){ ?>
<noscript>
<input type="submit" class="btn button" name="refresh" value="<?php echo JText::_('REFRESH_CART');?>"/>
</noscript>
<?php }
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 13 years 3 weeks ago by Jerome.
Please Log in or Create an account to join the conversation.
Time to create page: 0.230 seconds