• Resolved simba777

    (@simba777)


    Hei everyone,
    I need help with hiding product variations, that are out of stock, from the front end. these products can be back ordered by repeating clients.

    It’s easy to hide out of stock variations, but once I enable the back-order option, the out of stock products appear in the frontend, even though they are out of stock. I need to hide non the less, because, they are subscription products, that are reserved to old clients, so they should never appear for new customers.

    Any ideas?
    Thank you very much!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Nico

    (@nicolamustone)

    Automattic Happiness Engineer

    Hello!
    Why do you need to enable the Backorders if you don’t actually need people to backorder the product?

    It can be done technically via custom code, by editing the templates. You can read here how to edit the templates in WooCommerce: https://docs.woocommerce.com/document/template-structure/

    Thread Starter simba777

    (@simba777)

    Thank you for your help Nicola,
    Our shop setup is like this:
    We have subscription products, each one with about a hundred variations.
    Each variation is a table at our annual fair. So each table can be sold only once, as a subscription. So we put the stock of every variation at one.
    The problem is that when our customers try to renew the order, the shop tells them: your item is out of stock, and doesn’t let them renew the subscription.
    So we need to enable the back order option so that they can renew their subscription.
    The problem is once we allow backorders, than everyone can order any table, and there will be double bookings.
    So the solution we found was to allow back orders, but to hide them from the from the frontend, if their stock is 0 or less.

    If you think of a better way of setting up the shop, I’ll be happy to learn… ??

    Thanks!

    Hi simba,

    Further update after re-reading: Not sure if this will work for you as this would still allow more than one subscription customer to book the same table. It will only restrict the same subscription customer from booking the same table.

    If I’ve understood your requirements correctly and your customers have to be logged in to place a table order as they are paying for a subscription then have you considered the setting: ‘Sold individually’ at the product level (not a variation level). If you Enable this then it should only allow one of this item to be bought in a single order.
    If this works then I would suggest you would not have to enable stock management and just have each variation in stock or maybe you could consider setting ‘In Stock’ at the product level

    There are some very clever/complex pricing/discount plugins but hopefully the above may provide you with a solution.

    I hope this helps
    Regards
    SteveB

    • This reply was modified 6 years, 10 months ago by pxwm.
    • This reply was modified 6 years, 10 months ago by pxwm.
    • This reply was modified 6 years, 10 months ago by pxwm.
    • This reply was modified 6 years, 10 months ago by pxwm.
    Thread Starter simba777

    (@simba777)

    Hei Steve,
    I checked this option out and it looks like people will still be able to buy the same variant again and again, just as long as it’s a different order.. So it will not work in our case.

    The main problem is to hide product variants from the ajax drop-down menu. For example on this product: https://www.rajatieto.fi/tuote/poytapaikka-1krs/

    At the moment the dropdown menu shows only product variations with a stock of 1 or more.

    So any idea where the ajax controls are? and how to program them to ignore backordered variations?

    Thanks!

    Hi simba777

    Could I just check the following:-

    1. You indicate ‘Each variation is a table at our annual fair’

    Does the problem arise at your next annual fair when a customer wishes to book a table?

    Are you using the same product year on year?

    If so have you considered running a cron job to reset the product level to 1?
    Some useful tools are WP All Import (Import + Export)

    Another option would be to consider creating a new product for each yearly fair.

    I hope this helps
    Regards
    SteveB

    • This reply was modified 6 years, 10 months ago by pxwm.
    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hi @simba777

    The main problem is to hide product variants from the ajax drop-down menu. For example on this product: https://www.rajatieto.fi/tuote/poytapaikka-1krs/

    You can do this by disabling the variant that you don’t want to show on the front-end – you can see the result of that in this gif I have previously created – https://cld.wthms.co/g9lNrh

    Thanks,

    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey @simba777

    We haven’t heard back from you in a week, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    If my answer helped, or you found a solution, you can still add that as a comment on this thread.

    Thanks,

    Thread Starter simba777

    (@simba777)

    Thank you all for your answers, Disabling the variations will solve the problem temporarily, until I can figure a way of solving it automatically…
    it has to do with modifying the way the theme shows which product-variables will be shown in the product drop down menu.
    I’ve tried looking for the right js file, that handle the drop-down menu script, but couldn’t find it (the script, nor the file where the script is). So I’m stuck at the moment..
    Thank you anyways!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to hide out of stock variable products,that can be back ordered fro frontend’ is closed to new replies.