WordPress.org

Ready to get started?Download WordPress

Forums

Magento WordPress Integration
[resolved] Items in My Cart header block don't show in wordpress (15 posts)

  1. Ircsome
    Member
    Posted 1 year ago #

    Using this in header.php ...

    <?php
    $head = get_block('head', false);
    echo $head->getCssJsHtml();
    ?>

    WordPress does NOT display items in cart next to My Cart eg My Cart (4 items)
    Magento does.

    http://wordpress.org/extend/plugins/magento-wordpress-integration/

  2. Ircsome
    Member
    Posted 1 year ago #

    is this a known problem?

  3. jamesckemp
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Ircsome,

    It sounds like it may be a cookie issue, you shouldn't need the cssjs for the toplinks to show items in cart.

    Just to confirm, do you have the_block('top.links'); in your template files, as this is the block that shows cart items next to the cart link.

    If so, make sure your cookie settings are set up correct. Please let me know where Magento and WordPress are installed on your server.

    Thanks

  4. Ircsome
    Member
    Posted 1 year ago #

    cookies it was indeed. thanks for the clue.

    default magento install leaves cookie path and cookie domain setting blank. Set as follows and My Cart now ok.

    cookie path: /
    cookie domain: .domain.com

    using the_block('header'); rather than the_block('top.links');. The css/js for other stuff.

    Thanks again.

  5. jamesckemp
    Member
    Plugin Author

    Posted 1 year ago #

    Perfect, glad it's sorted

  6. trooks
    Member
    Posted 1 year ago #

    ******************This was resolved. You can delete this post. It started working, maybe a caching issue************

    I am also having this issue. I did what lrcsome recommended but am still getting the same issue.

    It might have something to do with my working from a development server where my wordpress is installed in .com/wordpress and magento is installed in /wordpress/magento.

    Also, do the premium plugins you offer make it easier to share the theme from wordpress to magento?

  7. jamesckemp
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Trooks,

    Could you let me know what you entered for the cookie domain and the cookie path? The premium add-ons don't make integration easier, but they allow you to bring products out in WordPress using shortcodes and widgets

  8. trooks
    Member
    Posted 1 year ago #

    Sorry it started working. Im thinking it was caching.

    You've got super fast responses! Thanks.

  9. jamesckemp
    Member
    Plugin Author

    Posted 1 year ago #

    No worries, feel free to rate the plugin!

  10. minasokoni
    Member
    Posted 1 year ago #

    I have run into this issue. I am using magento 1.7 and the latest wordpress. I have wordpress installed in the root and magento installed within /store. I manually changed the cookie path. It works when inside /store (which is magento) but when on wordpress (/) my cart doesnt have any items and Im not logged in.

  11. jamesckemp
    Member
    Plugin Author

    Posted 1 year ago #

    Could you show me what you've entered for the cookie paths?

  12. minasokoni
    Member
    Posted 1 year ago #

    Mage.Cookies.path = '/';
    Mage.Cookies.domain = '.shirts.com'

    The cart only works if the user is not logged in magento.

  13. jamesckemp
    Member
    Plugin Author

    Posted 1 year ago #

    Have you cleared the var/cache and var/sessions folders in Magento via FTP? It may be that the cookies are already logged and can't be replaced.

    You can also set a cookie path in WordPress' wp-config.php file, which may help

  14. thinkwell.solutions
    Member
    Posted 1 year ago #

    Having the exact same issue minasokoni details above.

    I have ensured my cookie paths are correct, I have set the cookie path in 'wp-config.php' and have also cleared the var/cache and var/sessions folders, but the 'My Cart' block will not reflect the cart total on my WordPress site

    Any insight?

  15. gabrielpita
    Member
    Posted 1 year ago #

    Hello,
    I'm having the same problem does not appear the quantity in the shopping cart. I'm using wordpress installed in the root and magento installed within /loja.

    I've made the changes mentioned above, but did not succeed.
    And the change:
    Mage.Cookies.path = '/';
    Mage.Cookies.domain = 'http://localhost.com/wordpress/'
    I can not even access the admin panel magento more.

    any solution?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags