Support » Plugin: WooCommerce » Show quantity button when only 1 piece left

  • Resolved jantuz



    Could somebody help me with view showing quantity button when only 1 piece of product left in woocommerce?

    When I had in inventory lot of pieces I see quantity button and I can add to cart so many pieces so I have in stock. When I have only 1 piece, the button dis appears. It is logical. But when it disappear, my ‘Add to cart’ button move higher. So, I would like to see quantity button in each case. I looking for this code, where I could change it, but I wasn´t successful. Can somebody advice me, how can I do it?.

    There is a screen shot for better understanding.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You need to use some css.
    If you don’t want your button to move with the flow
    you can position the container (grey div)
    with position:relative; (the button will have its position for “starting point”)
    and the button with position:absolute; top:50px; right:60px;
    for example… you can use ems instead of px if you prefer.


    thank you for your advice. I try it, but there is a problem with different explorer. Chrome and IE relate absolute position differently than Opera and Firefox. Chrome and IE had referencing point somewhere on the site top and Opera and Firefox relate ‘add to cart’ button to the grey div.

    so, I didn’t define relative position grey div. Now it works. Great. Thank you very much.

    You’re welcome!
    You can add [resolved] to the subject 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show quantity button when only 1 piece left’ is closed to new replies.