• I have set 3 variables of size (S | M | L)
    After I change the stock quantity of variable S to 0 (i.e. out of stock), normally, the variable S button would become disabled:
    <input type=”radio” name=”attribute_size” value=”S” id=”size_v_S” disabled=”disabled”>
    So the S size button is still visible and I can grey out the button.
    But somehow, of some products (not every product), the variable S’s radio button is missing.
    I want to add the code: <input type=”radio” name=”attribute_size” value=”S” id=”size_v_S” disabled=”disabled”> back to my product page, please teach me how. (I tried modified the variable.php, but still have no clue.)
    Thanks a lot.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Vairations on the front end use <select> fields, not <input> fields. This suggests that your theme (or another 3rd party plugin) is overriding core WooCommerce templates for the single product page. Are you still experiencing the same issue after deactivating all of your plugins (except WooCommerce) and switching to the default Twenty Sixteen theme?

    Thread Starter ive6830

    (@ive6830)

    Hi, Riaan. Thanks for your suggestion.
    Yes I forgot to mention that I use “WC Variations Radio Buttons” Plugin to change the dropdown button <select> of variations to radio buttons <input>.
    And I tried your brilliant way to test where the problem is by deactivating all my plugins (except WooCommerce) and switching to default Twenty Fifteen theme.
    But it’s still wrong (only show size L but missing S and M).
    And I found out a strange thing, this situation seems appears only when I change the quantity of the product variable at WP Product Backstage Settings. But if the product is checkout and automatically set to “out out stock” status, the variable didn’t disappear.
    Another strange thing is that I tried to delete the product with this issue, and create a new product, it works fine at first. But after I change the new product’s SKU number and address URL to the same as the wrong product’s SKU and address URL, it got wrong again.
    Do you have any other idea about how to find out where the problem is?
    Thanks.

    Thread Starter ive6830

    (@ive6830)

    Hi, I just found out something!
    I went to the WP backstage to change the quantity of variations S and M to 1, and the status set to “In stock”.
    Then I went to the product front-end page, yeah the variations S and M showed up. And then I checked out the S and M items, the variations S and M were still there at the product page (and being disabled).
    It just worked fine! Weird, isn’t it?
    I don’t know if it’s sort of a WooCommerce’s bug?
    Have any idea to fix that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sold out variable missing’ is closed to new replies.