If this is your first visit, check our documentation. To post, register or login.

Removing a line item in mobile menu

Started by mrmcastle on 27 May 2024, 3:33 AM · Views: 1,215

Results 1 to 5 of 5
27 May 2024, 3:33 AM
#1
mrmcastle avatar

mrmcastle

New Zenner

Join Date:
Apr 2019
Location:
Orange, CA
Posts:
22
Plugin Contributions:
0

Post #1 by mrmcastle

Hey all, I've got a zen-cart site setup for display only.... I did this thru admin and it works great on a desktop. But when viewing the website with a mobile device, all the shopping cart info is still there.... I'm hoping to remove the shopping cart icon and also the first line of the menu "Shopping cart-0 items -$0.00" website is cheapsheetmusic.com and the template is responsive all-business by PicaFlor Azul. Thanks for any advice you can throw my way

27 May 2024, 4:06 AM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,908
Plugin Contributions:
23

Post #2 by dbltoe

The icon is just a matter of ```
.m-cart {display: none;}


Unfortunately the template does not set up a class or ID for the li insider the #container.  That will take some core file munging.

Use the Developers Tool Kit to find Shopping Cart inside an li.  Log In will be nearby as will plain Shopping (the third line in the menu).

```html
<li><a href="https://cheapsheetmusic.com/index.php?main_page=shopping_cart">Shopping Cart - 0 item(s) - $0.00</a></li>

Will need to be commented out in order to not show.

If it is pure html, just precede the info with <!-- and end with -->

<!--<li><a href="https://cheapsheetmusic.com/index.php?main_page=shopping_cart">Shopping Cart - 0 item(s) - $0.00</a></li>-->

More than likely the code is a mix of PHP and HTML. If so, you can either experiment yourself or post the entire li here for more help.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

28 May 2024, 2:56 AM
#3
mrmcastle avatar

mrmcastle

New Zenner

Join Date:
Apr 2019
Location:
Orange, CA
Posts:
22
Plugin Contributions:
0

Post #3 by mrmcastle

tried searching for that in developers toolkit but it wouldn't find it. I found one mobile file in the templates that feels like it may be the one I'm looking for tpl_modules_mobile_categories_tabs.php Here is the code:

<script type="text/javascript" src="includes/templates/responsive_all_business/jscript/script.js"></script> <div id="container"> <a class="toggleMenu" href="#"><img src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'images').'/'.M_MENU_IMAGE ?>" alt="m menu image" /></a> <a class="m-home"></a><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><img src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'images').'/'.M_HOME_IMAGE ?>" alt=" m home" /></a> <a class="m-cart" href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><img src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'images').'/'.M_CART_IMAGE ?>" alt="m cart" /></a> <ul class="nav"> <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?> - <? echo $_SESSION['cart']->count_contents();?> <?php echo HEADER_TITLE_CART_ITEMS; ?> - <? echo $currencies->format($_SESSION['cart']->show_total());?></a></li> <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li> <li class="test"><a href="#"><?php echo HEADER_TITLE_CATEGORIES; ?></a> <?php // load the UL-generator class and produce the menu list dynamically from there require_once (DIR_WS_CLASSES . 'categories_ul_generator.php'); $zen_CategoriesUL = new zen_categories_ul_generator; $menulist = $zen_CategoriesUL->buildTree(true); $menulist = str_replace('"level4"','"level5"',$menulist); $menulist = str_replace('"level3"','"level4"',$menulist); $menulist = str_replace('"level2"','"level3"',$menulist); $menulist = str_replace('"level1"','"level2"',$menulist); $menulist = str_replace('<li>','<li>',$menulist); $menulist = str_replace("</li>\n</ul>\n</li>\n</ul>\n","</li>\n</ul>\n",$menulist); echo $menulist; ?> </li> <li> <a href="#"><?php echo HEADER_TITLE_QUICK_LINKS; ?></a> <ul> <li><a href="<?php echo zen_href_link(FILENAME_PRODUCTS_NEW); ?>"><?php echo HEADER_TITLE_NEW_PRODUCTS; ?></a></li> <li><a href="<?php echo zen_href_link(FILENAME_SPECIALS); ?>"><?php echo HEADER_TITLE_SPECIALS; ?></a></li> </ul> </li> <li> <a href="#"><?php echo HEADER_TITLE_INFORMATION; ?></a> <ul> <li> <a href="#"><?php echo HEADER_TITLE_CUSTOMER_SERVICE; ?></a> <ul> <?php if (DEFINE_ABOUT_US_STATUS <= 1) { ?> <li><a href="<?php echo zen_href_link(FILENAME_ABOUT_US); ?>"><?php echo BOX_INFORMATION_ABOUT_US; ?></a></li> <?php } ?> <?php if ($_SESSION['customer_id']) { ?> <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li> <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li> <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'); ?>"><?php echo TITLE_NEWSLETTERS; ?></a></li> <?php } else { ?> <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li> <li><a href="<?php echo zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CREATE_ACCOUNT; ?></a></li> <?php } ?> <?php if (DEFINE_SHIPPINGINFO_STATUS <= 1) { ?> <li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo BOX_INFORMATION_SHIPPING; ?></a></li> <?php } ?> <?php if (DEFINE_PRIVACY_STATUS <= 1) { ?> <li><a href="<?php echo zen_href_link(FILENAME_PRIVACY); ?>"><?php echo BOX_INFORMATION_PRIVACY; ?></a></li> <?php } ?> <?php if (DEFINE_CONDITIONS_STATUS <= 1) { ?> <li><a href="<?php echo zen_href_link(FILENAME_CONDITIONS); ?>"><?php echo BOX_INFORMATION_CONDITIONS; ?></a></li> <?php } ?> </ul> </li> <li> <a href="#">General Info</a> <ul> <?php if (DEFINE_SITE_MAP_STATUS <= 1) { ?> <li><a href="<?php echo zen_href_link(FILENAME_SITE_MAP); ?>"><?php echo BOX_INFORMATION_SITE_MAP; ?></a></li> <?php } ?> <?php if (MODULE_ORDER_TOTAL_GV_STATUS == 'true') { ?> <li><a href="<?php echo zen_href_link(FILENAME_GV_FAQ, '', 'NONSSL'); ?>"><?php echo BOX_INFORMATION_GV; ?></a></li> <?php } ?> <?php if (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true') { ?> <li><a href="<?php echo zen_href_link(FILENAME_DISCOUNT_COUPON, '', 'NONSSL'); ?>"><?php echo BOX_INFORMATION_DISCOUNT_COUPONS; ?></a></li> <?php } ?> <?php if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') { ?> <li><a href="<?php echo zen_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL'); ?>"><?php echo BOX_INFORMATION_UNSUBSCRIBE; ?></a></li> <?php } ?> </ul> </li> <li> <a href="#"><?php echo TITLE_EZ_PAGES; ?></a> <ul> <?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?> </ul> </li> </ul> </li> <li> <a href="#">Search</a> <ul class="mobile-search"> <li> <?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?> </li></ul> </li> <li><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo BOX_INFORMATION_CONTACT; ?></a></li> </ul> </div>

I sure appreciate the help. If this isn't the file, I'll keep looking around...

29 May 2024, 2:03 AM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,908
Plugin Contributions:
23

Post #4 by dbltoe

Looking at your code as I don't have access to the template files, it looks like commenting out ```
<a class="m-cart" href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><img src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'images').'/'.M_CART_IMAGE ?>" alt="m cart" /></a>
<ul class="nav">
<li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?> - <? echo $_SESSION['cart']->count_contents();?> <?php echo HEADER_TITLE_CART_ITEMS; ?> - <? echo $currencies->format($_SESSION['cart']->show_total());?></a></li>


<https://stackoverflow.com/questions/4561583/how-can-i-comment-out-php-lines-inside-html-file#:~:text=also%20you%20can%20use%20the,just%20outside%20the%20php%20tags.&text=Note%20that%20the%20PHP%20code%20will%20still%20be%20executed.&text=Note%20that%20you%20should%20hide,visible%20when%20page%20is%20viewed>.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

29 May 2024, 3:15 AM
#5
mrmcastle avatar

mrmcastle

New Zenner

Join Date:
Apr 2019
Location:
Orange, CA
Posts:
22
Plugin Contributions:
0

Post #5 by mrmcastle

dbltoe you nailed it! And the really cool part is if some one else runs into this situation they can search out your solution

Can't thank you enough
M