WordPress.org

Forums

WooCommerce Menu Cart
[resolved] Won't work even though menu is named correctly (16 posts)

  1. Auror
    Member
    Posted 2 years ago #

    Hello!

    I've installed the plugin and named the principal menu "cart", then set it to "cart" on the plugin settings as well. Still, it doesn't work. I've checked the "display even if empty" option and I did tests with products in the cart. Nothing. What am I missing?

    Screenshots:
    https://dl.dropbox.com/u/10196435/Screen%20Shot%202013-01-18%20at%2016.17.04.png
    https://dl.dropbox.com/u/10196435/Screen%20Shot%202013-01-18%20at%2016.16.44.png

    Also, login data for site I'm having trouble with:

    shopping-cart
    testing-cart

    http://wordpress.org/extend/plugins/woocommerce-menu-bar-cart/

  2. Jeremiah
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Auror,

    Thanks for such a detailed explanation! What's the url of the site? It would help me if I could look at it.

    Also, on this screenshot https://dl.dropbox.com/u/10196435/Screen%20Shot%202013-01-18%20at%2016.16.44.png I noticed that nothing is set for the primary menu. Did you try setting that menu to cart as well?

    Thanks!

    Jeremiah

  3. Auror
    Member
    Posted 2 years ago #

    No, thanks you Jeremiah for such a blazing fast answer.

    Now, this is embarrassing, I forgot the address! http://www.ateliechrislima.com.br

    So, after I posted this I installed another WooCommerce plugin (I had only WooCommerce and your plugin before; except, of course, for the "stock" plugins) and I noticed the shopping cart showed up on the menu.

    I was about to come back here and update the topic as resolved, but before that I tried to make a tiny adjustment to the plugin, changing the code in order to adapt it to Brazilian Portuguese. I made changes to lines 131 and 132, as pasted below. The shopping cart menu did not, however, update to my changes: it still shows "1 item", "2 items" and "View your shopping cart".

    So, I'm confused. Maybe I did do something wrong in the first place?

    $viewing_cart = __('Ver seu carrinho', 'woothemes');
    	$cart_url = $woocommerce->cart->get_cart_url();
    	$cart_contents = sprintf(_n('%d produto', '%d produtos', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);

    I'm briefly changing the website's language to English so you can have a look if you want to.

    Oh, and I did try setting both menus, but at the time it had no effect.

    Thanks again!

  4. Jeremiah
    Member
    Plugin Author

    Posted 2 years ago #

    There doesn't seem to be anything wrong with what you have here. Before you changed the language to English and made the adjustments to the code, did it show up as items, and view your shopping cart?

  5. Auror
    Member
    Posted 2 years ago #

    It did show up in English ("item", "items", "View your shopping cart"). I didn't revert the language adjustments to the code, though. I don't understand how it still shows up in English.

  6. Jeremiah
    Member
    Plugin Author

    Posted 2 years ago #

    I actually have no idea why that's happening. I'm completely new to language translation on WordPress, and this was my first attempt. How about posting it to the support forum? I'll also ask another person who asked about translation earlier to check on this and let us know if he sees anything weird.

  7. Auror
    Member
    Posted 2 years ago #

    If I may, this does not seem to be a problem in translation. I just deleted the plugin and created a new menu with a new name and different content, and the shopping cart menu item still shows up. It's currently like that, if you wanna check.

  8. Jeremiah
    Member
    Plugin Author

    Posted 2 years ago #

    Are you saying that the plugin has been uninstalled but it still shows up on your site?

  9. Auror
    Member
    Posted 2 years ago #

    That's it.

  10. Jeremiah
    Member
    Plugin Author

    Posted 2 years ago #

    That is incredibly strange. I'm not sure how that could be possible because it requires the function to run in order for anything to display (products and cost) which wouldn't be installed if the plugin has been deleted. I don't have time today, but I'm going to look into this more tomorrow. Sorry you're having this issue!

  11. Ulrich
    Member
    Posted 2 years ago #

    Hello Auror,

    Here is the pot file that you can use to translate the text.
    https://www.dropbox.com/s/5kd6cxj429ovrk8/woocommerce%20menucart.pot

    Use this program to translate this file.
    http://www.poedit.net/

    then save the files as pt_BR

    You should have two files pt_BR.po and pt_BR.mo. Place these two in the child theme.

    Let me know that goes.

  12. Auror
    Member
    Posted 2 years ago #

    Thanks a bunch, Ulrich! And thanks and sorry for troubling you, Jeremiah.

    I tried reinstalling the plugin – and this is incredibly weird –, but until five minutes ago the menu had two shopping car items, even though I only had one installed (obviously).

    So, I had a look at the code and it seemed to me it made some additions to the WooCommerce plugin backbone. I had a hunch somehow this wasn't reverting itself even when I removed the Shopping Cart plugin.

    I then deactivated WooCommerce and again removed the Shopping Cart plugin. This did eliminate shopping car menu item and I was able to reinstalled it and only get one shopping car item on the menu. But – as if all of that wasn't odd enough – two shopping car icons show up!

    I had a look at the code again and reinstalled a clean (ie not modified for translation purposes) copy of the plugin, to no luck. The only thing that served as a half solution was manually disabling the shopping car icon on admin panel. After that, it showed up as one item at last.

    Anyway, I'm just an adventurer here and I'm definitely not knowledgeable on WordPress, so I can't offer any explanation, but I thought reporting what happened might help if this situation comes up again.

    Again, many thanks, Jeremiah!

  13. Jeremiah
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Auror,

    That is strange. Was it the icon itself that was showing up twice, or was it the content that was being echoed from WooCommerce? I'll do a little more research into this and see why that could be. To be honest, I'm still learning a few things, and writing plugins is always difficult because it's so hard to be sure that it works with every WordPress install. Thanks for letting me know about the issues you had, and I'm glad you were able to get the translation piece figure out.

    @Ulrich, thanks so much for your help!

  14. Auror
    Member
    Posted 2 years ago #

    No, really, Jeremiah, I can't thank enough for developing this and caring so much about support.

    Oh, another update: I have two shopping cart menu items (not icons) again. The one in Portuguese I'm able to remove if I disable the plugin. The order one seems stubborn. (The address, again: http://www.ateliechrislima.com.br)

  15. Auror
    Member
    Posted 2 years ago #

    I just figured it out. After the first try with this plugin, I had updated my theme and the newer version had a shopping cart menu item embedded in the code. Really embarrassed for this. Sorry for the confusion, Jeremiah!

  16. Jeremiah
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Auror,

    I'm glad you got it figured out, and don't worry about the confusion. :) Now I see that you're using a theme by WooThemes, which would explain the issue. Let me know if you need anything else!

    Jeremiah

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce Menu Cart
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.