• Resolved lewisjwright

    (@lewisjwright)


    Hi,

    I am currently trying to develop a custom parent theme for a client. The client is a food company that require a menu and the cart on the “shop” page. I decided to show the cart on the shop page by using the mini cart functionality already built by you guys. One thing I would like to do is allow the mini cart to support AJAX so the customer can get a live view of what’s in the cart. I have found tutorials on how to do this but I am receiving a javascript error outlined in the title of this issue.

    I am overriding the default archive-product.php file in my theme and I am calling this at the top of the file:

    <?php get_header( 'shop' ); ?> and at the bottom <?php get_footer( 'shop ')?>

    In my header and footer I am calling wp_head() and wp_footer() and as far as I can see the woocommerce.min.js file is being called on the page.

    The only plugin I have activated is woocommerce.

    There must be something I am missing otherwise I wouldn’t be having this problem. Any help/suggestions would be greatly appreciated and more information can be provided if necessary.

    Thanks.

    https://www.ads-software.com/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    Are you de-enqueing scripts? You’re missing one it seems..

    Thread Starter lewisjwright

    (@lewisjwright)

    I don’t believe I am :S. My functions file just consists of standard wordpress setup such as menus and widget areas.

    It also includes the code from the support on your website to output theme wrappers and woocommerce support.

    I can see the code in the header of my page here:

    /* <![CDATA[ */
    var woocommerce_params = {“ajax_url”:”\/wp-admin\/admin-ajax.php”,”wc_ajax_url”:”\/menu\/?wc-ajax=%%endpoint%%”};
    /* ]]> */

    I assume that this is the correct data?

    Thread Starter lewisjwright

    (@lewisjwright)

    Figured it out. It was to do with the ordering of my scripts. Absolute rookie mistake.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘woocommerce_params is not defined’ is closed to new replies.