-
AuthorPosts
-
September 26, 2016 at 1:07 pm #691594
Great Work Guys,
Please i need a function code to move the cart icon from right to the left of the menu. I have searched the forum but haven’t seen anything to help.
I saw some css code to re-position the item but when resizing the browser it looses its place, so i was thinking there is a code that can make it start before the menu (like this: https://kriesi.at/support/topic/move-shopping-cart-to-main-nav-menu/#post-368028 but no longer works) or at least could i add a first menu icon link (using normal menus) and let it behave like the cart icon (by showing item number and also the cart dropdown on mouse over.) I dont want to have to download a plugin for this. Enfold is well built and very extensive I’m sure i can achieve it without a plugin.
Looking forward to your response.
September 26, 2016 at 11:29 pm #692006Hey adotopanuga,
Please try adding this code to the Quick CSS section under Enfold > General Styling or to your child themes style.css file:
.html_cart_at_menu.html_bottom_nav_header #menu-item-shop { float: left !important; left: 325px; }
Best regards,
JordanSeptember 27, 2016 at 1:34 am #692028hi jordan,
thanks for the code. Unfortunately, that doesn’t solve my problem across various screen sizes. Please any help will be much appreciated.
September 28, 2016 at 3:21 pm #692736Hi,
Please add following code to Quick CSS in Enfold theme options under General Styling tab
.cart_dropdown { position: inherit; height: auto; margin-left: -40px!important; }
Then add following code to Functions.php file in Appearance > Editor
function av_move_search_tb(){ ?> <script> jQuery(window).load(function(){ jQuery("#header ul.cart_dropdown").detach().prependTo('.avia-menu.av-main-nav-wrap') }); </script> <?php } add_action('wp_footer', 'av_move_search_tb');
Best regards,
Yigit- This reply was modified 8 years, 1 month ago by Yigit.
October 19, 2016 at 2:16 am #700961Hi Thanks for this code but it did not work.
Any other help will be much appreciated.
Thanks and Welldone.
October 19, 2016 at 2:04 pm #701313Hi,
I noticed a typo in my code and edit the post above. Can you please try it once again? If that still does not help, please create a temporary admin login and post it here privately so we can look into it :)
Best regards,
YigitJune 11, 2020 at 1:41 pm #1221680Hello! how are u? I’ve used your js code to move the cart. this seems fine, but when you add the product’s there are some issues in the cart number.
The number of the product’s are duplicated, example: add 1 product but in the ajax cart appear 2 products, if you have 2 they appear 4.
I’m really don’t understand what could cause this problem.
I’m driving crazy,
thanks in advance for any help.
( I linked in private the production website to better understanding. :)
f.June 17, 2020 at 11:58 am #1223322 -
AuthorPosts
- The topic ‘Move Cart Icon to beginning of menu’ is closed to new replies.