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

Show out of stock items but not for sale

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-26-2010, 07:57 AM
 
simonparker simonparker is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 39
 

Default Show out of stock items but not for sale

May seem like a strange request but i can't see how to do this. I have over 20000 products online but stock changes daily as more items come in, and more are sold, and it seems madness to have to daily create a new sitemap as items appear and dissapear, yet alone the havoc that creates with google rankings and links back to products no longer there.

What i want to do, is to show items that are out of stock, but make them not available for sale. I know that's not the best for the customer but at least they know it's something we do normally have (usually in stock again within a week).

I have ticked the box to not track stock as i don't want to do that, prefer to do it manually.

any advice? Sure somewhere there is a setting for this but can't seem to find it.
__________________
Simon Parker
Birmingham UK
X-Cart Gold
Version 4.3.1
www.autoairconparts.co.uk
Reply With Quote
  #2  
Old 04-26-2010, 08:16 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Show out of stock items but not for sale

This doesn't seem strange at all. From time to time I have to disable a product when we are out of stock for more than a couple of days. This in turn causes problems with indexed pages. I would love to have a disabled but visable option for a product's status.

Here is an idea for a MOD:
New availability option, Disabled: Visable.

When it is set to this, the add to cart or buy now buttons are replaced with a "currently out of stock" box or image.

Even better would be a form to request an email when back in stock.

Mike
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #3  
Old 04-26-2010, 09:05 AM
 
joncampbell joncampbell is offline
 

Advanced Member
  
Join Date: Apr 2010
Location: Vancouver, BC
Posts: 60
 

Default Re: Show out of stock items but not for sale

Simon,

If you have inventory tracking disabled how is X-Cart supposed to know that a item is out of stock?

Normally if you have inventory tracking on it can still show the product as long as General Settings -> Inventory Options -> Disable products which are out of stock
is not checked.

In my tests on X-Cart 4.3 with inventory tracking enabled and the above checkbox not checked it keeps the product publicly available, it just says Out of Stock on the product page.
Reply With Quote

The following user thanks joncampbell for this useful post:
Mish (06-19-2012)
  #4  
Old 04-26-2010, 09:10 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Show out of stock items but not for sale

If you want to be able to set it per product in you administration or csv uploads, you could use an extra field.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #5  
Old 04-26-2010, 09:27 AM
 
simonparker simonparker is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 39
 

Default Re: Show out of stock items but not for sale

my products either have 1 in stock in which case they're listed, or 0 in stock so they're not, so at the end of the day i'll look at what stock as come in from suppliers, what is sold and update them all to in or out of stock.

Just needs to be simple, if i have items listed as '0' stock, then display them but not available to buy.
__________________
Simon Parker
Birmingham UK
X-Cart Gold
Version 4.3.1
www.autoairconparts.co.uk
Reply With Quote
  #6  
Old 04-26-2010, 09:34 AM
 
simonparker simonparker is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 39
 

Default Re: Show out of stock items but not for sale

Quote:
Originally Posted by joncampbell
Simon,

If you have inventory tracking disabled how is X-Cart supposed to know that a item is out of stock?

Normally if you have inventory tracking on it can still show the product as long as General Settings -> Inventory Options -> Disable products which are out of stock
is not checked.

In my tests on X-Cart 4.3 with inventory tracking enabled and the above checkbox not checked it keeps the product publicly available, it just says Out of Stock on the product page.

I have both boxes ticked as i want to manually alter stock at the end of the day, not have it done automatically. But if i have it checked to track inventory and the 'Disable products which are out of stock' unchecked, then they are visible and can be sold, i want them visible but 'out of stock' message which i only get when inventory tracking is on.
__________________
Simon Parker
Birmingham UK
X-Cart Gold
Version 4.3.1
www.autoairconparts.co.uk
Reply With Quote
  #7  
Old 04-26-2010, 10:54 AM
 
joncampbell joncampbell is offline
 

Advanced Member
  
Join Date: Apr 2010
Location: Vancouver, BC
Posts: 60
 

Default Re: Show out of stock items but not for sale

Set your inventory tracking to off and your disabled when out of stock to off.

Then edit your include/func/func.product.php


Find this section
$appearance = array(
'empty_stock' => $config['General']['unlimited_products'] != "Y" && ($product['avail'] <= 0 || $product['avail'] < $product['min_amount']),
'has_price' => $product['taxed_price'] > 0 || (!empty($product['variantid']) && isset($product['variants_has_price']) && $product['variants_has_price']),
'has_market_price' => $product['list_price'] > 0 && $product['taxed_price'] < $product['list_price'],
'buy_now_enabled' => $current_area == 'C' && $config['Appearance']['buynow_button_enabled'] == "Y",
'buy_now_form_enabled' => $product['price'] > 0 || ($active_modules['Special_Offers'] && $product['use_special_price']) || $product['product_type'] == 'C',
'min_quantity' => max(1, $product['min_amount']),
'max_quantity' => $config['General']['unlimited_products'] == "Y" ? $config['Appearance']['max_select_quantity'] : min($config['Appearance']['max_select_quantity'], $product['avail']),
'buy_now_buttons_enabled' => $config['General']['unlimited_products'] == "Y" || ($product['avail'] > 0 && $product['avail'] >= $product['min_amount']) || ($product['variantid'] && $product['avail'] > 0),
'force_1_amount' => $product['distribution'] || (!empty($active_modules['Subscriptions']) && !empty($product['catalogprice']))
);


I changed it to this:
$appearance = array(
'empty_stock' => ($product['avail'] <= 0 || $product['avail'] < $product['min_amount']),
'has_price' => $product['taxed_price'] > 0 || (!empty($product['variantid']) && isset($product['variants_has_price']) && $product['variants_has_price']),
'has_market_price' => $product['list_price'] > 0 && $product['taxed_price'] < $product['list_price'],
'buy_now_enabled' => $current_area == 'C' && $config['Appearance']['buynow_button_enabled'] == "Y",
'buy_now_form_enabled' => $product['price'] > 0 || ($active_modules['Special_Offers'] && $product['use_special_price']) || $product['product_type'] == 'C',
'min_quantity' => max(1, $product['min_amount']),
'max_quantity' => $config['General']['unlimited_products'] == "Y" ? $config['Appearance']['max_select_quantity'] : min($config['Appearance']['max_select_quantity'], $product['avail']),
'buy_now_buttons_enabled' => ($product['avail'] > 0 && $product['avail'] >= $product['min_amount']) || ($product['variantid'] && $product['avail'] > 0),
'force_1_amount' => $product['distribution'] || (!empty($active_modules['Subscriptions']) && !empty($product['catalogprice']))
);



On my 4.3 that makes it so the system doesnt check if inventory track is on or off, it will only check if there is any stock left. So you can have inventory tracking disabled and it will still show it as out of stock if availability is down to 0.

Works for me,
Reply With Quote

The following 2 users thank joncampbell for this useful post:
hoosierglass (04-26-2010), XCart4Life (11-15-2011)
  #8  
Old 04-26-2010, 11:43 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Show out of stock items but not for sale

Nice MOD Jon.

Now I just need to do a little work on my products_t.tpl to make these changes look better.

Thanks a bundle.
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #9  
Old 04-27-2010, 12:50 AM
 
simonparker simonparker is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 39
 

Default Re: Show out of stock items but not for sale

Thanks Jon, will give it a try and let you know. Appreciate your help
__________________
Simon Parker
Birmingham UK
X-Cart Gold
Version 4.3.1
www.autoairconparts.co.uk
Reply With Quote
  #10  
Old 11-15-2011, 12:20 PM
  XCart4Life's Avatar 
XCart4Life XCart4Life is offline
 

Advanced Member
  
Join Date: Feb 2010
Posts: 62
 

Default Re: Show out of stock items but not for sale

Great! Worked in 4.4.4!

I edited the same file... include/func/func.product.php

I just changed the one line:

PHP Code:
'empty_stock'   => $config['General']['unlimited_products'] != "Y" 

To this:

PHP Code:
'empty_stock' => ($product['avail'] <= || $product['avail'] < $product['min_amount']) 
__________________
X-Cart Pro v4.2.2 [Win]
X-Cart Pro v4.2.3 [Win]
X-Cart Pro v4.4.4 [Win]
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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 11:35 PM.

   

 
X-Cart forums © 2001-2020