• Resolved greencitygrowers

    (@greencitygrowers)


    I’ve been having some issues integrating with a custom theme, specifically with allowing for a variable product (different sized t-shirts) being able to be added into the cart. Shop is at greencitygrowers.com/shop, for reference.

    basically we are having a javascript issue:

    the woocommerce pages get this error: “cart-fragments.min.js?ver=2.4.10:1 Uncaught TypeError: a.cookie is not a function”

    even though jquery.cookie.js loads just fine. jquery.cookie.js should make a.cookie a function – in fact it works earlier in the file (cart-fragments.min.js). i have no idea why it doesn’t work at the end of the file.

    i tried applying this fix: https://docs.woothemes.com/document/jquery-cookie-fails-to-load/ but it didn’t work.

    Any thoughts as to how to resolve this would be incredibly helpful. Thanks!

    https://ww.wp.xz.cn/plugins/woocommerce/

Viewing 5 replies - 16 through 20 (of 20 total)
  • Plugin Contributor royho

    (@royho)

    That is actually not correct. First it is an action, not a filter. Second the 10 priority is default so even if you don’t explicitly set it, it will default to 10.

    @royho – okay well maybe it’s not “correct” by your standards but it sure as hell fixed all woocommerce JS integration issues for my custom install.

    have a happy thanksgiving 🙂

    Plugin Contributor royho

    (@royho)

    @ukeboyska – It isn’t my standards. But that of the community

    oops – sorry, i didn’t realize the community you represent has achieved absolute perfection. i will code my sites 100% to the way the wordpress community has decreed, because that’s the goal of open source development, right? i forgot there’s no room for tolerance of other opinions or philosophies here, and that wordpress’ core isn’t built on a mountain of hacks.

    i appreciate your offer and eagerness to help, but am confounded by your responses on this thread which did anything but help. in fact you’ve only succeeded in insulting me even after i figured out the perfect solution to my problem.

    i come from a team of front end developers that had to build agnostic front ends for any backend. i think there are lots of benefits to that coding approach. you code from a different perspective and i’m cool with that. our team – even though we came from a lot of different backgrounds and experiences – never stopped helping figure out problems together, even if we disagreed or had different styles.

    instead of just pointing your finger and saying i’m doing it wrong, try giving your fellow coders some respect and after giving your recommendation work with whatever decision they go with.

    Plugin Contributor royho

    (@royho)

    Sorry, but my comments were not to insult you. Please re-read them. But if they were, I apologize. It is nothing more than to inform you that you’re coding for WordPress and WordPress has its standards from coding point of view. So you can say it is best practices for coding in WordPress and I am sure some of that cascades to PHP in general.

Viewing 5 replies - 16 through 20 (of 20 total)

The topic ‘variable products not adding to cart — potential javascript issue?’ is closed to new replies.