Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Show "Out of Stock" on 0 qty products

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 04-17-2020, 12:25 AM
 
Luchiii Luchiii is offline
 

Newbie
  
Join Date: Jan 2020
Posts: 4
 

Talking Show "Out of Stock" on 0 qty products

Hello everyone!
My site allow people see Out of Stock products as we can reorder them but, right now, I can't show that the product is out of stock, you can't simply add it to cart. As I see, this is how the button works/appear:

HTML Code:
<div class="add-button-wrapper {{ this.getFingerprint() }}"> {% if not this.isOutOfStock() and this.isProductAvailableForSale() %} {{ widget('\\XLite\\View\\Button\\Submit', label='Add to cart', style='regular-main-button add2cart') }} {% endif %} </div>

Any advinces about how I can edit this using something like an IF / ELSE to show an "Out of Stock" message instead of the "Add to Cart" button?

Thanks a lot for your help or any advices about how I can do it!
__________________
X-Cart Ultimate 5.3.6.0
Reply With Quote
  #2  
Old 04-17-2020, 04:30 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,199
 

Default Re: Show "Out of Stock" on 0 qty products

It sounds like you have set the store to not track inventory. If the store is set to track inventory then out of stock products will show as "out of stock" and ordering is not allowed. When you set the store not to track inventory products are "available for sale" and not "out of stock".
So if you want to use your current setup it will take more than just a simple change in this template file.


Or you can use this module - https://market.x-cart.com/addons/backorder-preorder.html
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 04-17-2020, 06:31 AM
 
Luchiii Luchiii is offline
 

Newbie
  
Join Date: Jan 2020
Posts: 4
 

Default Re: Show "Out of Stock" on 0 qty products

Quote:
Originally Posted by cflsystems
It sounds like you have set the store to not track inventory. If the store is set to track inventory then out of stock products will show as "out of stock" and ordering is not allowed. When you set the store not to track inventory products are "available for sale" and not "out of stock".
So if you want to use your current setup it will take more than just a simple change in this template file.


Or you can use this module - https://market.x-cart.com/addons/backorder-preorder.html

Hi!
First of all, thanks for your reply.
I have my inventory tracked to show when a products is shown is in low stock to give a warning on product page. I just need something to tell that product in right now Out of Stock but you can ask, by using the ask form, about it. Customers have only to now that is Out of Stock and they can ask for it, not put it in the cart if quantity is 0. For that reason my idea was replace the add to cart button into an out of stock message with the same dimensions and space.
__________________
X-Cart Ultimate 5.3.6.0
Reply With Quote
  #4  
Old 04-17-2020, 08:40 AM
 
memoto memoto is offline
 

X-Cart team
  
Join Date: Feb 2018
Posts: 246
 

Default Re: Show "Out of Stock" on 0 qty products

I would also recommend using the module Steve mentioned: https://market.x-cart.com/addons/backorder-preorder.html

It provides exactly what you require and also allows customers to get notified once the products are back to stock.
__________________
X-Cart Team
Reply With Quote
  #5  
Old 04-22-2020, 12:15 AM
 
Luchiii Luchiii is offline
 

Newbie
  
Join Date: Jan 2020
Posts: 4
 

Default Re: Show "Out of Stock" on 0 qty products

Hi all!
I just want something really really more simple. I don't need notify restock or. similiar, I just want to add a box (would be great instead of the "add to cart" button as place) on a product page with stock level 0 that tells "Out of stock", nothing more!
__________________
X-Cart Ultimate 5.3.6.0
Reply With Quote
  #6  
Old 05-31-2020, 10:40 AM
  razorbackrinds's Avatar 
razorbackrinds razorbackrinds is offline
 

Newbie
  
Join Date: May 2020
Location: Arkansas - USA
Posts: 5
 

Default Re: Show "Out of Stock" on 0 qty products

I am not sure if this is exactly what you are wanting or not but we use the Backorder Module. In our case we make and sell pork rinds. We usually keep a few of each flavor in stock however there are times when a customer wants to order a particular flavor which we are out of.


So when they are viewing the actual product page, we tell them that it is available for pre-ordering if they would like to order it. Then after they have added it to their cart, the cart displays that, in our case, it is made fresh to order and to allow us 24 hours for the item to be available.


Hope that this helps.
Attached Thumbnails
Click image for larger version

Name:	step-1.png
Views:	494
Size:	63.6 KB
ID:	5506  Click image for larger version

Name:	step-2.png
Views:	490
Size:	19.6 KB
ID:	5507  
__________________
T. Patterson
Hog Wild Rinds, LLC
v 5.4.1.5
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:14 PM.

   

 
X-Cart forums © 2001-2020