Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor Jeremiah

    (@jprummer)

    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

    Thread Starter Auror

    (@auror)

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

    Now, this is embarrassing, I forgot the address! https://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!

    Plugin Contributor Jeremiah

    (@jprummer)

    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?

    Thread Starter Auror

    (@auror)

    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.

    Plugin Contributor Jeremiah

    (@jprummer)

    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.

    Thread Starter Auror

    (@auror)

    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.

    Plugin Contributor Jeremiah

    (@jprummer)

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

    Thread Starter Auror

    (@auror)

    That’s it.

    Plugin Contributor Jeremiah

    (@jprummer)

    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!

    Ulrich

    (@grapplerulrich)

    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.
    https://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.

    Thread Starter Auror

    (@auror)

    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!

    Plugin Contributor Jeremiah

    (@jprummer)

    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!

    Thread Starter Auror

    (@auror)

    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: https://www.ateliechrislima.com.br)

    Thread Starter Auror

    (@auror)

    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!

    Plugin Contributor Jeremiah

    (@jprummer)

    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

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Won't work even though menu is named correctly’ is closed to new replies.