• Resolved samisraeli

    (@samisraeli)


    When adding a product to the cart in product archive page with ajax, the link’s text changed to view cart but the link’s url is null and the user can’t continue to the cart page.

    I saw the the wc_add_to_cart_params.cart_url is null
    Here is the values of wc_add_to_cart_params{
    “ajax_url”: “/wp-admin/admin-ajax.php”,
    “wc_ajax_url”: “/?wc-ajax=%%endpoint%%”,
    “i18n_view_cart”: “view cart”,
    “cart_url”: null,
    “is_cart”: “”,
    “cart_redirect_after_add”: “no”
    }
    I saw the code is in:
    \woocommerce\assets\js\frontend\add-to-cart.min.js
    How can I fix it?
    Thank you,
    Sam

    • This topic was modified 3 years, 7 months ago by samisraeli.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ??

    This kind of problem is usually caused by a conflict with your theme or with another plugin.
    ?
    The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    Before you start

    First, please make sure you have a good backup in place of your full site and database. Most hosting companies have this included in the subscription, but you could also consider using a service like?Jetpack. If something goes wrong, it’s nice to know that you can restore your site.

    Second, I would suggest installing a plugin called?Health Check & Troubleshooting. This is a plugin developed by the WordPress community and it allows you to disable plugins without affecting your current site visitors.

    Cheers

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    It’s been a while since we heard from you, so I’m marking this thread as resolved. Hopefully, you’ve been able to resolve this, but if you haven’t, please open up a new topic and we’ll be happy to help out.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wc_add_to_cart_params.cart_url is null in product archive page’ is closed to new replies.