S4hosting Posted June 12, 2021 Share Posted June 12, 2021 Hi how to bring the item cart number in to that cart icon blue colour number place? here i have the shared the code with style kindly help in this.... <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"> <style> .navbar-nav.toolbar{ font-size: 1rem; font-weight: 400; line-height: 1.5; color: #212529; text-align: left; font-family: 'Open Sans',sans-serif; box-sizing: border-box; margin-top: 0; display: flex; padding-left: 0; margin-bottom: 0; list-style: none; flex-direction: row; } .nav-item.ml-3 { font-size: 1rem; font-weight: 400; line-height: 1.5; color: #212529; font-family: 'Open Sans',sans-serif; list-style: none; box-sizing: border-box; margin-left: 1rem!important; } .btn.nav-link.cart-btn{ font-family: 'Open Sans',sans-serif; list-style: none; box-sizing: border-box; text-decoration: none; font-weight: 400; text-align: center; vertical-align: middle; user-select: none; background-color: transparent; line-height: 1.5; transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; display: block; overflow: hidden; cursor: pointer; padding: .5rem 1rem; border-radius: .25rem; border: 1px solid #e5e5e5; color: #e5e5e5; position: relative; font-size: .9em; margin: 0px 0; } .badge.badge-info { font-family: 'Open Sans',sans-serif; list-style: none; user-select: none; cursor: pointer; box-sizing: border-box; display: inline-block; font-weight: 700; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; color: #fff; background-color: #17a2b8; position: absolute; top: 2px; right: 5px; opacity: .8; font-size: 10px; padding: 3px 5px; border-radius: 50%; } .sr-only{ font-family: 'Open Sans',sans-serif; list-style: none; font-weight: 400; text-align: center; user-select: none; line-height: 1.5; cursor: pointer; color: #e5e5e5; font-size: .9em; box-sizing: border-box; white-space: nowrap; border: 0; clip: rect(0,0,0,0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } .nav-item.ml-3.d-xl-none{ font-size: 1rem; font-weight: 400; line-height: 1.5; color: #212529; font-family: 'Open Sans',sans-serif; list-style: none; box-sizing: border-box; display: none!important; margin-left: 1rem!important; } .btn.nav-link { list-style: none; box-sizing: border-box; margin: 0; font-family: inherit; text-transform: none; appearance: button; font-weight: 400; text-align: center; vertical-align: middle; user-select: none; background-color: transparent; line-height: 1.5; transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; display: block; overflow: hidden; cursor: pointer; padding: .5rem 1rem; border-radius: .25rem; border: 1px solid #e5e5e5; color: #e5e5e5; position: relative; font-size: .9em; } </style> </head> <body> <ul class="navbar-nav toolbar"> <li class="nav-item ml-3"> <a class="btn nav-link cart-btn" href="https://secure1.s4hosting.in/cart.php?a=view"> <script language="javascript" src="https://secure1.s4hosting.in/feeds/cartnumitems.php"></script> <i class="fas fa-shopping-cart fa-fw" style="font-size:20px"></i> <span class="badge badge-info">0</span> <span class="sr-only">Shopping Cart</span> </a> </li> <li class="nav-item ml-3 d-xl-none"> <button class="btn nav-link" type="button" data-toggle="collapse" data-target="#mainNavbar"> <span class="fas fa-bars fa-fw"></span> </button> </li> </ul> </body> </html> 0 Quote Link to comment Share on other sites More sharing options...
S4hosting Posted June 12, 2021 Author Share Posted June 12, 2021 forget to share the cart icon image here it is 0 Quote Link to comment Share on other sites More sharing options...
S4hosting Posted June 12, 2021 Author Share Posted June 12, 2021 Now i bring in to the blue color circle but dont know to modify the cartnumitem.php about this msg "you have 0 item in basket " here i need the value 0 only in to that blue color circle here.... 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 13, 2021 Share Posted June 13, 2021 create a new data feed, based on the cartnumitems.php feed, and move your badge output inside the returned code - the widget should be doing all the work, so design it to output the content that you want. 0 Quote Link to comment Share on other sites More sharing options...
S4hosting Posted June 13, 2021 Author Share Posted June 13, 2021 Hi brian already its there under feeds folder don't know which one to change here... i cant paste the code here getting 403 forbidden error.... 0 Quote Link to comment Share on other sites More sharing options...
S4hosting Posted June 14, 2021 Author Share Posted June 14, 2021 here i have attached the codes as image? 0 Quote Link to comment Share on other sites More sharing options...
S4hosting Posted June 14, 2021 Author Share Posted June 14, 2021 here is the feed url https://secure1.s4hosting.in/feeds/cartnumitems.php 0 Quote Link to comment Share on other sites More sharing options...
S4hosting Posted June 14, 2021 Author Share Posted June 14, 2021 Finally i fixed bro after changing this line in php widgetoutput('' . \Lang::trans('feeds.itemsInBasket', [':count' => $cartitems]) . ''); to widgetoutput("$cartitems"); 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 15, 2021 Share Posted June 15, 2021 16 hours ago, S4hosting said: Finally i fixed bro after changing this line in php you will still need to create a new data feed - as the default data feeds will get overwritten during a WHMCS update. 1 Quote Link to comment Share on other sites More sharing options...
S4hosting Posted June 15, 2021 Author Share Posted June 15, 2021 ok brian i will thank you.... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.