*

Sudo

  • ***
  • 47 posts
[SOLVED] Like to add cart button on header
« on: October 05, 2017, 10:38:37 PM »
Hi,
Would like to put the cart function (display link to cart with amount if any in cart) in my header (e.g. Cart $12.00) so if clicked goes to cart.
What code do I need to display this?

thanks,
Sudo
« Last Edit: October 26, 2017, 01:18:02 AM by Sudo »

Marked as best answer by frosticek on October 06, 2017, 01:38:33 PM
*

reflexus

  • ****
  • 146 posts
Re: Like to add cart button on header
« Reply #1 on: October 06, 2017, 03:27:42 AM »
Code: [Select]
<?php 
$cart osp_cart_price();
$htmlcart .= '<a href="' osc_route_url('osp-cart') . '"><i class="fa fa-shopping-cart"></i> ' __('Cart''osclass_pay') . ' ' osp_format_price($cart['price']) . '</a>';
echo $htmlcart
?>

« Last Edit: October 06, 2017, 03:39:54 AM by reflexus »