MarketPress Add To Cart Does Not Work

Hello,

In store settings when Checkout Button Type is set to Add To Cart, clicking it does not add the item to the cart.

The cart will never populate with anything while setting is Add To Cart.

However, when the setting is Buy Now, then clicking the Buy Now Button places the item in the cart and additional items can be added to the cart before proceeding to checkout.

Also, Empty Cart Button Does not work and can only remove items from cart by checking the remove checkbox beside the items in the cart and then clicking the update cart button.

http://soobahkdomall.com

Any suggestions would be appreciated.

Thanks,
Phil D

  • SooBahkDo

    Hello Jack,

    I cannot deativate every plugin on a network of 60 sites to troubleshoot this, so hopefully there is an alternate way to go about it.

    I had another developer look at this quickly and he reported back the following:

    "I haven't found anything so far. I couldn't see any javascript errors, just a warning about the FB application setup. Clicking add to cart does send a request to the server, but it seems that it isn't saved even though the server sends a response back. I have to go offline for the evening, some one who knows MarketPress will probably be able to solve it quicker than I can."

    Any suggestions?

    Thanks,
    Phil D

  • SooBahkDo

    Update: When store setting is "Add To Cart" selected items will appear momentarily in the widget shopping cart when clicked, but will not stay in the cart and additional items cannot be added.

    At the same time, the cart item count at the top of the page does not increment even when an item is appearing in the widget cart.

    The only plugin active on this subsite is MarketPress.

    Of course all the networkwide plugins are still active.

  • Jack Kitterhing

    Hi there @SooBahkDo

    I hope you are well today and sorry for the extreme delay in my reply, somehow I completely missed your reply's.

    Could you send me through the following details so I can check your install?

    - Mark to my attention
    - Link back to this thread
    - Include admin/network access
    - Include FTP
    - Include any relevant URLS for your site
    https://premium.wpmudev.org/contact/

    Thank you for being a WPMU DEV member and again sorry for the delay.

    Kind Regards
    Jack.

  • SooBahkDo

    Hi Jack,

    I will PM you the details you requested.

    In the interim I configured MarketPress on another multisite 3.5.1 installation and activated exactly the same plugins on that installation trying to identify the conflict without success. You can see that store in operation here: http://www.6.blogcrop.com with no domain mapping active. With presentation settings set for "Add To Cart" it works as expected.

    On the other MarketPress installation with the issue, as a work around, I have configured the presentation settings for "Buy Now" and visitors can successfully make selections and purchases through the site, but we need to find the conflict causing the "Add To Cart" feature NOT to work. This site is
    http://www.store.soobahkdo.org with domain mapping active to http://www.soobahkdomall.com

    I'll send the requested info now.

    Looking forward to your assist.

    Thanks,
    Phil D

  • Jack Kitterhing

    Hi there Phil,

    I hope you are well today and thank you for the info.

    I have been checking out your install and there's a lot of redirects going on, you have the sub domain linking to a main domain, but then you login on the sub domain, which if you then try to visit network admin, the login needs to be done again.

    There is a total of 288 plugins on your site, which is quite a lot, someone one of the plugins or multiple plugins is causing a DB issue, it's not correctly closing the connection, the only way this can be troubleshooted, is to deactivate every plugin and then see if it works, if it does reactivate one by one. Is this possible at all?

    Or create a exact replica to your test site.

    Thank you!

    Kind Regards
    Jack.

  • SooBahkDo

    Hi Jack,

    Thanks for looking into this.

    Can you elaborate on the "lot of redirects going on?"

    We use the WPMUDEV domain mapping plugin and the WPMUDEV multi-domains plugin with several domains available for site creation.

    The network settings for domain mapping are:
    Administration mapping: original domain
    Login mapping: original domain

    Are you suggesting we should change those?
    Or is there another implication you are referring to that I am missing?

    As for deactivating every plugin on the network to locate the conflict.
    I have been through the time sink drill once without success.

    I hoped someone would advise me about a troubleshooting tool or the primary issue that is most likely causing the failure, so that I could narrow my search a bit.
    Bringing down the whole network again will have to wait a bit.

    As for a clone of the site for testing.
    http://www.6.blogcrop.com is on a different server and is a smaller multisite installation with only 3-4 sites on it and It has the exact same plugins active and performs without an issue. MarketPress works fine there.

    That confirms the issue is a conflict on http://www.soobahkdmall.com but since it has the same plugins active as http://www.6.blogcrop.com I am confused about where/what to look for to identify the source of the conflict.

    So what I was hoping for was some advice or guidance on what kind of conflict I need to be looking for. Ajax, Javascript, php ??? And/or what tool might I use to identify the conflicting items?

    Thanks for any help.
    Phil D

  • SooBahkDo

    Hello Jack,

    I deactivated and removed from the plugin folder on the server all but 92 plugins. Many of these are WPMUDEV plugins and most of these are active network wide or on various subsites across the network.

    I then tested changing the store presentation settings on MarketPress to "Add To Cart" after removing and deactivating the plugins so far, but "Add To Cart" still does not work. I will eliminate additional plugins as time permits.

    HOWEVER and perhaps unrelated to the primary issue, after removing these plugins I noticed the public directory error log filling rapidly with the following errors recurring continuously:

    [26-Apr-2013 02:38:03] PHP Warning: mysql_real_escape_string(): 18 is not a valid MySQL-Link resource in /home/soobabiz/public_html/wp-includes/wp-db.php on line 885
    [26-Apr-2013 02:38:03] PHP Warning: mysql_real_escape_string(): 18 is not a valid MySQL-Link resource in /home/soobabiz/public_html/wp-includes/wp-db.php on line 885
    [26-Apr-2013 02:38:03] PHP Warning: mysql_error(): 18 is not a valid MySQL-Link resource in /home/soobabiz/public_html/wp-includes/wp-db.php on line 1205

    Any advice or suggestion on the source of these errors?

    I ran a database repair and reinstalled WordPress 3.5.1 completely with no change in the errors filling the log files.

    Also, this long standing error continues to fill the Admin director error log. There is no Translation plugin installed on the server although we have previously used Transposh and WP Google Translate on some blogs.
    This error has been previously reported in this thread.
    https://premium.wpmudev.org/forums/topic/domain-mapping-is-rapidy-filling-network-error-logs#post-412536

    [26-Apr-2013 02:36:27] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'translation_ops' AND site_id = 1 made by include('wp-admin/admin-header.php'), do_action('admin_head'), call_user_func_array, domain_map->build_cookie, update_user_meta, update_metadata
    [26-Apr-2013 02:36:41] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'translation_ops' AND site_id = 1 made by require_once('wp-admin/admin-header.php'), do_action('admin_head'), call_user_func_array, domain_map->build_cookie, update_user_meta, update_metadata
    [26-Apr-2013 02:37:20] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'translation_ops' AND site_id = 1 made by require_once('wp-admin/admin-header.php'), do_action('admin_head'), call_user_func_array, domain_map->build_cookie, update_user_meta, update_metadata
    [26-Apr-2013 02:38:25] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'translation_ops' AND site_id = 1 made by require_once('wp-admin/admin-header.php'), do_action('admin_head'), call_user_func_array, domain_map->build_cookie, update_user_meta, update_metadata
    [26-Apr-2013 02:39:34] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'translation_ops' AND site_id = 1 made by require_once('wp-admin/admin-header.php'), do_action('admin_head'), call_user_func_array, domain_map->build_cookie, update_user_meta, update_metadata
    [26-Apr-2013 02:39:50] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'translation_ops' AND site_id = 1 made by include('wp-admin/admin-header.php'), do_action('admin_head'), call_user_func_array, domain_map->build_cookie, update_user_meta, update_metadata
    [26-Apr-2013 02:41:19] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'translation_ops' AND site_id = 1 made by include('wp-admin/admin-header.php'), do_action('admin_head'), call_user_func_array, domain_map->build_cookie, update_user_meta, update_metadata
    [26-Apr-2013 02:41:33] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'translation_ops' AND site_id = 1 made by require_once('wp-admin/admin.php'), require_once('wp-admin/admin-header.php'), do_action('admin_head'), call_user_func_array, domain_map->build_cookie, update_user_meta, update_metadata
    [26-Apr-2013 02:41:43] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'translation_ops' AND site_id = 1 made by require_once('wp-admin/admin.php'), require_once('wp-admin/admin-header.php'), do_action('admin_head'), call_user_func_array, domain_map->build_cookie, update_user_meta, update_metadata
    [26-Apr-2013 02:41:57] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'translation_ops' AND site_id = 1 made by require_once('wp-admin/admin.php'), require_once('wp-admin/admin-header.php'), do_action('admin_head'), call_user_func_array, domain_map->build_cookie, update_user_meta, update_metadata
    [26-Apr-2013 02:42:50] WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'translation_ops' AND site_id = 1 made by require_once('wp-admin/admin.php'), require_once('wp-admin/admin-header.php'), do_action('admin_head'), call_user_func_array, domain_map->build_cookie, update_user_meta, update_metadata

    I mention these errors in the event they provide any kind of clue about the current problem.
    Although these errors have been logged, the sites all seem to function without issue.

    The first malfunction encountered has been with MarketPress.

    Any ideas?

    Thanks,
    Phil D

  • Jack Kitterhing

    Hi there Phil,

    I hope you are well today.

    With regards to the redirects, how is your overall site set-up, as it does explain the re-directs because of domain mapping, but how is the multisite installed? in the root of which domain?

    I've been looking for a .htaccess file, unless you don't have one?

    The errors with regards to the DB, the top ones are that the Database connection isn't closed fully by one of your plugins or themes most likely.

    As the button is working on your test site, would you mind sending me the following details so I can compare every setting and configuration please?

    - Mark to my attention
    - Link back to this thread
    - Include admin/network access
    - Include FTP
    - Include any relevant URLS for your site
    https://premium.wpmudev.org/contact/

    Thank you for being a WPMU DEV member and have a great weekend!

    Kind Regards
    Jack.

  • Temporal Sales

    I'm experiencing the same cart problems on a much simpler MU installation where I do have the luxury of turning off all the plugins, except for MarketPress and Mapping.

    See my open post #419355.

    The common thread between our two posts appears to be that a mapped MU website experiences this problem while an unmapped site doesn't exhibit this problem. (My test sites used just the WP 2012 theme, MarketPress, and Mapping on the mapped site.)

    Ergo, it appears the problem lies somewhere within the mapping function and/or MarketPress when mapping is enabled.

    Thanks!

  • SooBahkDo

    Temporal sales,

    Thanks for chiming in.

    This might also offer a clue to the developer.

    I also observe that when Market Press is set to Buy Now, the empty cart feature in the accordian section at the top of the site will not work, HOWEVER the REMOVE items checkboxes in the cart will remove items.

    Ergo, the code for the REMOVE items feature is working on a mapped or unmapped site while the EMPTY cart feature is failing.

    One code set seems to manage the mapped domain scenario and another code set does not.

    Perhaps that provides a clue as to why the MarketPress ADD TO CART setting will not work at all on a mapped site.

    Phil D

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.