*

sezy2021

  • **
  • 24 posts
How to display the cart at the top
« on: September 09, 2021, 10:08:09 AM »
How can I display the cart diagram at the top of the TOP page?

*

MB Themes

Re: How to display the cart at the top
« Reply #1 on: September 09, 2021, 01:01:54 PM »
Use your design.
Cart URL can be generated using osp-cart route.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

sezy2021

  • **
  • 24 posts
Re: How to display the cart at the top
« Reply #2 on: September 09, 2021, 05:51:22 PM »
I succeeded when I referred to the posts of other people.
Thank you! Everyone in the forum! :)

*

sezy2021

  • **
  • 24 posts
Re: How to display the cart at the top
« Reply #3 on: September 09, 2021, 05:52:57 PM »
header.php



 <?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', 'alpha'); ?>" 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 } ?>

*

MB Themes

Re: How to display the cart at the top
« Reply #4 on: September 09, 2021, 08:06:02 PM »
@sezy2021
That is solution as well.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots