*

arun008

  • ***
  • 46 posts
add cart button on header like this
« on: October 18, 2017, 09:06:47 AM »
 :)

Marked as best answer by arun008 on October 18, 2017, 09:50:28 AM
*

MB Themes

Re: add cart button on header like this
« Reply #1 on: October 18, 2017, 09:23:03 AM »
@arun
In file:
oc-content/themes/veronika/header.php

Find line:
Code: [Select]
<div class="notification">
After this line place:
Code: [Select]
          <?php if(function_exists('osp_install')) { ?>
            <?php
              $cart_count 
0;
              if(
osc_is_web_user_logged_in()) {
                
$cart ModelOSP::newInstance()->getCart(osc_logged_user_id());
                
$cart_count count(array_filter(explode('|'$cart)));
              }
            
?>


            <a class="cart tr1" title="<?php _e('Cart''veronika'); ?>" href="<?php echo osc_route_url('osp-cart'); ?>"><i class="fa fa-shopping-basket"></i> <span class="counter"><?php echo $cart_count?></span></a>
          <?php ?>


To theme style.css add line:
Code: [Select]
#header-bar .notification > a.cart span.counter { background: #02C39A; }
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

arun008

  • ***
  • 46 posts
Re: add cart button on header like this
« Reply #2 on: October 18, 2017, 09:56:30 AM »
solved thank you  :) :) :) :) :)

*

Fabio Massaro

  • *****
  • 306 posts
Re: add cart button on header like this
« Reply #3 on: December 11, 2017, 02:00:03 PM »
Hello, you could also help me that I can not insert it

*

Anonymous

  • ****
  • 200 posts
Re: add cart button on header like this
« Reply #4 on: December 11, 2017, 03:41:55 PM »
go to your theme folder, and find  header.php (theme veronika)

find
Code: [Select]
<div class="notification"> around line 114, below
Code: [Select]
<div class="notification">  copy and paste this chunk of code
Code: [Select]
    <?php if(function_exists('osp_install')) { ?>
            <?php
              $cart_count 
0;
              if(
osc_is_web_user_logged_in()) {
                
$cart ModelOSP::newInstance()->getCart(osc_logged_user_id());
                
$cart_count count(array_filter(explode('|'$cart)));
              }
            
?>


            <a class="cart tr1" title="<?php _e('Cart''veronika'); ?>" href="<?php echo osc_route_url('osp-cart'); ?>"><i class="fa fa-shopping-basket"></i> <span class="counter"><?php echo $cart_count?></span></a>
          <?php } ?

its done,

best of luck.
Innovation is change that unlocks new value  ;)

*

Fabio Massaro

  • *****
  • 306 posts
Re: add cart button on header like this
« Reply #5 on: December 11, 2017, 07:52:27 PM »
you can send me complete header.php because I can not insert the cart at the top like a photo

*

Anonymous

  • ****
  • 200 posts
Re: add cart button on header like this
« Reply #6 on: December 12, 2017, 05:40:23 PM »
@fabio

Hope yours  issue were sort out, just replace those file
 :)
Innovation is change that unlocks new value  ;)

*

apibio

  • ***
  • 68 posts
Re: add cart button on header like this
« Reply #7 on: January 01, 2018, 08:54:54 PM »
It ok

Tanks