1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Woocommerce issue with "Add to Cart"

Discussion in 'BlackHat Lounge' started by dgusic, Jul 17, 2015.

  1. dgusic

    dgusic Regular Member

    Joined:
    Feb 28, 2015
    Messages:
    330
    Likes Received:
    175
    So hey, just a quick question if anyone might be of help. When adding a variable products I can not see "Add to Cart" link on my desktop PC, but I can see it on my mobile phone. Why the hell is that?

    I tried deleting some plugins, blah blah, tried deleting cache, nothing. My variable products are in correct form since they can be seen from mobile phone. Any solutions to this retarded problem?

    I still believe this is a more of caching problem or some JS issue.
     
  2. dgusic

    dgusic Regular Member

    Joined:
    Feb 28, 2015
    Messages:
    330
    Likes Received:
    175
    Nobody?

    I believe this is a more of a caching issue as when I make a change to the website usually nothing happens.

    PS. I am using https protocol with free SSL from cloudflare
     
  3. dgusic

    dgusic Regular Member

    Joined:
    Feb 28, 2015
    Messages:
    330
    Likes Received:
    175
    Come on guys, this has become a rather weird issue.

    I can see it sometimes and sometimes it is not there. Could there be a caching issue with http and https?
     
  4. Hawkster

    Hawkster Jr. VIP Jr. VIP

    Joined:
    Jun 22, 2013
    Messages:
    3,428
    Likes Received:
    3,616
    Gender:
    Male
    Occupation:
    Listen to everyone - Follow no-one
    Location:
    UK
    Home Page:
    Did you try contacting the creators for help.

    Far better chance of an answer by doing that
     
  5. dgusic

    dgusic Regular Member

    Joined:
    Feb 28, 2015
    Messages:
    330
    Likes Received:
    175
    I did... the answer was and I quote "We do not have anything to do with that". Some support there.

    Basically, the issue is: adding variable products and I can't see the "Add to Cart" sometimes. Tried every tiny bit of code I could find, nothing.
     
  6. dgusic

    dgusic Regular Member

    Joined:
    Feb 28, 2015
    Messages:
    330
    Likes Received:
    175
    If anyone else is having this issue, this might fix it.

    add_action('wp_head','add_to_cart_script');
    function add_to_cart_script(){
    if(is_product()){
    wp_enqueue_script('wc-add-to-cart-variation');
    }
    }

    I found this on the net and edited it a bit by myself, it works now.