Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Variation ramaining 0 = auto hide or display Sold out text for single variation

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Variation ramaining 0 = auto hide or display Sold out text for single variation

  • This topic has 9 replies, 3 voices, and was last updated 10 years, 10 months ago by rob.marras.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • June 29, 2014 at 8:56 pm #11096
    rob.marras
    Member

    Hi

    I have a variation like:

    Size|37|38|39

    37 = 10 pair of shoes

    38 = 10 pair of shoes

    39 = 10 pair of shoes

    I can see I can use a counter for each variation within the advanced variation ui, however, if I sell of products of a specific size, the size still shows up there and I can still select it to buy it.

    e.g. 37 = 0 pair of shoes = should be: 37= sold out – or at least auto remove the variation from the drop down

    How can I do that? Thank you

    June 29, 2014 at 9:57 pm #63996
    rob.marras
    Member

    I can see that in the checkout page, if I select a product variation which has been sold out, i get this error message: “There are currently only 0 Red shoe (36) items in stock!” – but the “buy now” button it is still there as well as all the coupon and the payment method dropdown. We should not get to the checkout page if the variation product is sold out. We should simply not be able to add it to the cart from the product page, or at least do not show all those things in the checkout such as buy now button etc.

    How do i do that? (my dirty solution would be to use jQuery to remove those elements if the text says that in the checkout, but that’s very dirty.) Otherwise I am left with creating each single different product for each variation and call different cart within a single product, basically looping with php all “product pages” and only displaying certain information with a “add to cart” next to each “variation” so that if the product is sold out instead of add to cart it displays “sold out” button. But this is terrible really, I should simply auto hide the size which is sold out or not be able to select it without to go to the checkout page and have a disapointing message there for the user

    Thank you

    June 29, 2014 at 10:56 pm #63997
    admin
    Keymaster

    Please use the following addon:

    http://www.tipsandtricks-hq.com/ecommerce/wp-estore-advanced-variations-ui-addon-2168

    It will make it to where the user won’t even be able to add a variation that is sold out.

    June 30, 2014 at 9:11 am #63998
    rob.marras
    Member

    Hi

    Yes I do use that as I wrote above.

    In the plugin UI i insert my variation and for each variation I add an inventory. I can see that after buying all the variation stock, in the admin panel the variation says 0 in stock but the variation it is still shown in the web site as a choice.

    On my page I call the add to cart and variation like this: [wp_eStore_add_to_cart id=8]

    Am I doing something wrong?

    June 30, 2014 at 10:50 am #63999
    rob.marras
    Member

    I tried everything using Advanced variation UI add on but with no luck.

    I set a variation with 0 in stock but in the product page I can still see and add that variation and if I go to the checkout page I get a message saying there is not availability but I still see the Buy now button. I even tried using ajax and in the product page the variation with 0 in stock is there and if I hit the Add to cart i get a green icon, if I then go to the checkout page I don’t even get that no stock message.

    If a variation has 0 in stock should not be selectable, any help please?

    June 30, 2014 at 11:32 am #64000
    rob.marras
    Member

    Basically that message as shown here [https://vimeo.com/61771140?height=450&width=800] appearing below the product add to cart when the variation stock is 0 it is not appearing

    June 30, 2014 at 2:40 pm #64001
    rob.marras
    Member

    To resolve this (in a dirty way) I had to use jQuery:

    Added a class to the error message in the checkout, so in eStore-variations-form-addon.php i did:

    $check_result = “<span class=’alert alert-danger’>Unfortunatly there are”.$inventory_count.” “.$product_name.” items in stock at the moment</span>”;

    Then in my footer

    if ($(“.alert”).hasClass(“alert-danger”)) {

    $(“#btn-paypal”).remove();

    }

    Where #btn-paypal is my “Buy now” button. This way it removes the buy now button.

    But this is bad for many reasons, ideally should work like your video, where when the variation in the product page is sold out, a message should appear. Really don’t know why this isn’t working. Any idea?

    June 30, 2014 at 10:33 pm #64002
    rob.marras
    Member

    any luck to have an update on this? Thanks guys

    July 1, 2014 at 12:47 am #64003
    wpCommerce
    Moderator

    Hi, we will need to take a closer at your site to see what is happening. I have sent an email to your registered email address for site access. Let me know if you don’t receive it.

    July 2, 2014 at 6:14 am #64004
    rob.marras
    Member

    Got your email and I did fill in the form to give you access, let me know when you guys are done, this is much appreciated as that’s the only thing is missing to finalise the site and go live for the client.

    Thanks a lot

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ