• Hi,

    Since Woocommerce’s forum is now closed, I’ve ended up here. I hope this is the right place for this topic.

    I am developing a custom theme for a shop using Woocommerce. In our design we’ve put the entire cart and checkout into an overlay which is accessible on every page. It all went fine until I got to the actual order submission. Woocommerce is using checks on page type to output different HTML, which includes javascript parameters. So I’m having a hard time updating shipping costs depending on a selected country (it all should be done live via AJAX) and even simply submitting the order doesn’t work as intended.

    Right now I’m trying to find a way to get the cart nonce tokens that are normally retrieved via wc_checkout_params variable. I could try to grab it via AJAX by parsing the contents of actual cart page, but that sounds like a dirty hack rather than a solution. Is there a way to print out these JS parts on every page? By these I mean wc_checkout_params and wc_cart_params variables in the same way they are declared on the cart/checkout page.

    I’ve tried assigning cart and checkout pages to “shop” in Woocommerce settings, but for some reason it causes infinite redirect loop for unauthorised users on the main page and I’m guessing that it could cause some other issues too.

    PS: I’ve spent quite some time trying to find a working solution on the internet, but the solutions that I’ve found don’t work either because Woocommerce has been updated or because they don’t show cart on every single page (I guess it’s not a common design).

  • The topic ‘[Plugin: Woocommerce] cart&checkout on every page’ is closed to new replies.