You must be logged in to post


Register? | Lost Your Password?

Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

Remove Header Shopping cart

UserPost

10:40 am
October 17, 2009


Su

Member

posts 33

1

Is there a way to remove the shopping cart in the header.php without the image and search re-aligning? I had tried:

 <!–
     <div class="sdl viewcarttop"><a href="<?php market_shopcart_link('thickbox'); ?>"><img src="<?php bloginfo('template_directory'); ?>/imgs/cart.gif"><?php echo mkt_THEME_HEADER_VIEW_SHOP_CART; ?></a>

–>

But it removed the color fill as well as moving the header image and search boxes.

2:29 pm
October 17, 2009


scormeny

Member

posts 8

2

Su, I was just working on this myself the other day.  I agree that the CSS could use some tweaking here to make the header better laid out.  The empty divs with clear:both is not good CSS form.

I made these edits to remove the shopping cart and search field in the header, and center my own header graphic.  This may not be what you wanted to do, but if it is, feel free to take this code and use it.

First, I've changed header.php so that the "bar" div looks as follows:

<div id="bar">
 <div class="barhead">
  <div style="clear:both;"></div>
  <div class="header"><a href="<?php bloginfo('url'); ?>" alt="<?php bloginfo('name'); ?> – <?php echo mkt_THEME_HEADER_NAV_HOME; ?>"><img src="<?php
    if ($mkt_options['mktlogo'] != null) {
        echo $mkt_options['mktlogo'];
    } else {
          bloginfo('template_directory');
        echo '/imgs/logo.gif';
    }
    ?>" alt="<?php bloginfo('name'); ?>" align="center" /></a>
    </div> <!– close header div –>
  <div class="sdl">
   </div>
  <div style="clear:both;"></div>
 </div>
</div>

Then, I went to styles.css and changed the .header definition to add "text-align:center;" to it.

Hope this helps you too!

2:40 pm
October 18, 2009


Su

Member

posts 33

3

Thanks. I actually like the search in the header. I may play with it – did you determine a way to eliminate the Cart Tab? I don't see it under the pages. I really just want to disable the cart functions, and the tab, as I'm hopeful eventually someone will come up with a clean way to have both affiliate and direct sales.

2:25 pm
October 19, 2009


Market Admin

Admin

posts 4756

4

Try this:

In your "header.php" file, find the following code at or around line #88:

     <div class="sdl viewcarttop"><a href="<?php market_shopcart_link('thickbox'); ?>"><img src="<?php bloginfo('template_directory'); ?>/imgs/cart.gif"><?php echo mkt_THEME_HEADER_VIEW_SHOP_CART; ?></a>
    </div>

Change this line to:

     <div class="sdl viewcarttop"> <!– <a href="<?php market_shopcart_link('thickbox'); ?>"><img src="<?php bloginfo('template_directory'); ?>/imgs/cart.gif"><?php echo mkt_THEME_HEADER_VIEW_SHOP_CART; ?></a> –>
    </div>

Save the file, and I think that should do it.

7:05 am
October 21, 2009


Su

Member

posts 33

5

Beautiful, that did it. Is there a way to hide the cart tab too?

3:22 pm
October 21, 2009


Market Admin

Admin

posts 4756

6

In the "header.php" file on or around line #118, you should see this:

   <!– The following line adds a "View Cart" link to the navigation menu. You may remove it if you don't want it shown –>
      <li><a href="<?php market_shopcart_link('thickbox'); ?>"><?php echo mkt_THEME_HEADER_NAV_VIEWCART; ?></a></li>
      <!– End of "View Cart" menu option–>

Basically, just remove the middle line and save.

5:17 pm
October 21, 2009


Su

Member

posts 33

7

Wonderful-Thank you. Smile

11:37 pm
November 26, 2009


Warnold

Australia

Member

posts 99

8

JHi

i have jsut followed the instructions above.  I want to keep the search box and remove the cart and cart image.

However, following the instructions for line#118 removes teh search box and following the instructions for line #88 removes cart image cart function and the search box goes half way down the page.

Any suggestions?

Susan

9:02 am
July 22, 2010


asiascouts

New Member

posts 1

9

Hi,

I would like to removet the view cart link and logo from the header but the code seems different in Ver4 from the above at line #88 and I'm afraid I don't know enough about coding to work it out myself.

Any help you can give greatly appreciated – as are all the other postings and help availalbe through this forum – thanks to all contributors.

Cheers,

Mark

10:33 am
July 22, 2010


Market Admin

Admin

posts 4756

10

Ok, for Market 4 versions, to remove them, just open your "header.php" file for editing.

To remove the view cart link in your menu area, remove line #129 where it says:

          <li><a href="<?php market_shopcart_link('thickbox'); ?>"><?php echo mkt_THEME_HEADER_NAV_VIEWCART; ?></a></li>

To remove the logo area, remove line #109 where it says:

        echo $mkt_options['mktlogo'];

Finally, to remove the top "view shopping cart" link change line #104 from this:

    ?></span><span class="shopcart"><a href="<?php market_shopcart_link('thickbox'); ?>"><?php echo mkt_THEME_HEADER_VIEW_SHOP_CART; ?></a></span>

to this:

    ?></span>

and save.

3:15 am
July 25, 2010


gordy01

Member

posts 7

11

Admin, I am using V4.

I removed the code at line 129 but I still have the 'View Cart' in the menu bar. Please advise how to remove this.

Thanks,

6:24 pm
July 25, 2010


gordy01

Member

posts 7

12

Disregard. I just needed to clear my cache.Laugh



 

Market takes e-commerce to the next level with an easy to use, quick setup platform. Learn more or take the tour.