Re: Back Order Button not working

Back Order Button not working

petertphillips
New Member
6 0 0

I found a guide on the forum to add a back order button for items that are out of stock - the add to cart button changes to back order  - this works very well however I get "Required parameter missing or invalid: items" 

 

I dont want to have every product set "continue selling when out of stock"  as the customer doesnt know it might not ship straight away.   we have over 4000 products on our site so backorder will work very well. 

 

The guide I followed is here : 

https://community.shopify.com/c/payments-shipping-and/how-can-i-enable-a-backorder-button-when-inven...

Replies 12 (12)

Sonya_2025
Shopify Partner
246 32 45

Hi @petertphillips 

Welcome to shopify community.

Can you share the code you added pls? Which theme are you using?

 

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME
petertphillips
New Member
6 0 0

we have the venture theme and the code for the snippet is : 

 

{% if product.available %}
<form action="/cart/add" method="post">
<button type="submit" class="btn">Add to cart</button>
</form>
{% else %}
<button class="btn">Backorder (Usually ships within 48 hours)</button>
{% endif %}

 

 

 

and then added in to the code on page is 

 

{% render 'backorder-button' %}

 

 

petertphillips
New Member
6 0 0

Actually liquid theme 

Sonya_2025
Shopify Partner
246 32 45

OK,  Can you explain more detail to me when and where the error "Required parameter missing or invalid: items" shows

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME
petertphillips
New Member
6 0 0

https://kartingcentre.com.au/collections/chassis-components-1/products/otk-engine-stop-bolt

 

as you click on the now back order button - it pops up with the error immediately and doesnt add anything to the cart  

Sonya_2025
Shopify Partner
246 32 45

OK, Thank you. Since it is out of stock. So it should not add to cart. What behavior you expect after click the back order button?

do you just expect to remove the error, right?

 

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME
petertphillips
New Member
6 0 0

really want an option for someone to have the ability to still order the product even though its sold out - however dont want to set the product as sellable if its sold out as it wont give a warning that its on back order

 

looking at the comments from the first link I shared it seems entirely possible ?

Sonya_2025
Shopify Partner
246 32 45

I think it is possible. Replace your current code with below cope snippet.

 

<form action="/cart/add" method="post">
{% if product.available %}
<button type="submit" class="btn">Add to cart</button>
{% else %}
<button class="btn" type="submit">Backorder (Usually ships within 48 hours)</button>
{% endif %}
</form>

 

 

Feel free to reach out if you need any further assistance

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME
petertphillips
New Member
6 0 0

sadly same issue with missing parameter 

Sonya_2025
Shopify Partner
246 32 45

I did found the item id  is missing if your product is out of stock.

So I need a further investigation on your theme and  I have sent you a DM. 

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME
Sonya_2025
Shopify Partner
246 32 45

Hi @petertphillips 

 

Do you allow sell product that out of stock?

Can you  check if it selected?

Sonya_2025_0-1715592051177.png

 

if not, try selected it and retry the back order to see if it works.

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME

JayAdra
Shopify Partner
122 13 29

Hey Peter!

 

Were you still having issues with this? Just wanted to suggest considering using an app for handling back-order products. We just launched one called Early Bird which makes setting up back-orders for your entire catalog super easy.

 

It also means no theme modifications or liquid code (one-click setup, removed completely on uninstall).

 

You can choose to activate back-orders for your entire catalog (even 4000 products!), or only for specific products you choose, and it will show clear messaging/labels that it's a back-order once the stock reaches 0. And you can of course edit this messaging/styles as needed.

 

Feel free to check it out on our Free plan to see if it works for you! I'd be happy to help get you set up too if you have any questions or issues.

 

Here's an example product with some of the different options we offer (password is "demo"). Hope it helps!