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

allowing orders of out of stock items?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 04-12-2005, 05:46 PM
 
jkk jkk is offline
 

Member
  
Join Date: Mar 2005
Posts: 15
 

Default

I went about this a slightly different way in 4.0.12 with product options enabled. Note that I have tried this on products without options and it works fine as well.

First, I went and set unlimited products to yes.

I then modified the following:

/skin1/customer/main/product.tpl - line 178 change:

Code:
{if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""}

to

Code:
{if $config.Appearance.show_in_stock eq "Y" and $product.distribution eq ""}

This will make your quantity in stock display.

Then change /skin1/modules/Product_Options/check_options.tpl - line 351 change:

Code:
if((mq > 0 && avail > mq) || is_unlimit == 'Y') avail = mq; // Update product quantity if(document.getElementById('product_avail_txt')) document.getElementById('product_avail_txt').innerHTML = ((avail > 0)?(flag?avail:product_avail):txt_no);

to

Code:
show_avail = 0; if((mq > 0 && avail > mq) || is_unlimit == 'Y') show_avail = avail; avail = mq; // Update product quantity if(document.getElementById('product_avail_txt')) document.getElementById('product_avail_txt').innerHTML = ((show_avail > 0)?show_avail+" item(s) available":txt_no);

This seems to work for me. If people want to try it, let me know if there are any issues and I'll try to resolve them. It's kind of a kludge, but I could easily see it being a simple configurable checkbox as a sub-configuration item of unlimited products.
__________________
X-Cart Gold 4.0.14
X-AOM 4.0.14
X-GiftReg 4.0.14
Reply With Quote
  #22  
Old 07-19-2005, 10:19 AM
 
dchihorn dchihorn is offline
 

Advanced Member
  
Join Date: Mar 2005
Location: USA - Texas - DFW
Posts: 34
 

Default

deleted due to change in info
__________________
--------------------------
X-cart ver 4.0.16
Reply With Quote
  #23  
Old 07-19-2005, 08:49 PM
 
dchihorn dchihorn is offline
 

Advanced Member
  
Join Date: Mar 2005
Location: USA - Texas - DFW
Posts: 34
 

Default

Quote:
Originally Posted by B00MER
Edit skin1.conf and you should find a variable UnlimitedProducts ="N" Set it to "Y" and customers should be able to place orders even if the avail returns zero.

hth.

Ok, Mr Balinor said he used JKK's version and it worked ok for him. Well, the first thing JKK said to do was to make the change that Boomer lists in the above quote.

Unfortunately, when I go edit the skin1.conf file, it is fairly empty and there is no variable UnlimitedProducts ="N".

Could I just write it in there or would that not work?

Or do I need to be on a minimum of 4.0.12 to get this to work?


Thanks again for putting up with these questions.
__________________
--------------------------
X-cart ver 4.0.16
Reply With Quote
  #24  
Old 07-20-2005, 04:04 AM
 
jkk jkk is offline
 

Member
  
Join Date: Mar 2005
Posts: 15
 

Default

Quote:
Ok, Mr Balinor said he used JKK's version and it worked ok for him. Well, the first thing JKK said to do was to make the change that Boomer lists in the above quote.

Ah - no - actually what I did was set the unlimited products equal to "yes" in the administration panel. You can find this under Administration->General Settings->General Options->Disable products which are out of stock

Hope that helps.

-jkk
__________________
X-Cart Gold 4.0.14
X-AOM 4.0.14
X-GiftReg 4.0.14
Reply With Quote
  #25  
Old 07-22-2005, 05:32 PM
 
shafiq shafiq is offline
 

Newbie
  
Join Date: Jun 2005
Posts: 5
 

Default

Quote:
Originally Posted by jkk
Ah - no - actually what I did was set the unlimited products equal to "yes" in the administration panel. You can find this under Administration->General Settings->General Options->Disable products which are out of stock

Hope that helps.

-jkk

Do you mean you uncheck the option ?

Thanks

:sK
__________________
X-Cart Version 4.0.12 Gold
Reply With Quote
  #26  
Old 07-22-2005, 09:01 PM
 
dchihorn dchihorn is offline
 

Advanced Member
  
Join Date: Mar 2005
Location: USA - Texas - DFW
Posts: 34
 

Default

thanks jkk for verifying. much appreciated.

unfortunately, my version 4.0.9 of product.tpl does not have the line 178. Only goes to 175. and I cant find anything similar to that line either.

guess i will have to relook at this thread after I have upgraded my store.
__________________
--------------------------
X-cart ver 4.0.16
Reply With Quote
  #27  
Old 07-24-2005, 05:08 PM
 
jkk jkk is offline
 

Member
  
Join Date: Mar 2005
Posts: 15
 

Default

Quote:
Do you mean you uncheck the option ?

Yes.

Quote:
guess i will have to relook at this thread after I have upgraded my store.

Sound like a plan. It should be an easy upgrade, I would go for it if I were you.

-jkk[/quote]
__________________
X-Cart Gold 4.0.14
X-AOM 4.0.14
X-GiftReg 4.0.14
Reply With Quote
  #28  
Old 08-15-2005, 12:12 PM
 
eastman eastman is offline
 

Advanced Member
  
Join Date: Aug 2005
Location: Wyoming
Posts: 74
 

Default

I'm trying to implement some of the procedures in this thread (jkk's and countypaintball's). I'm in version 4.0.14 and none of these options seem to be working. Specifically several of the files to alter are in different directories and I assume there are other changes in X-cart that are preventing these alterations from working. Has anyone else had similar difficulties?

Thanks
__________________
X-Cart Pro v4.4.3
Reply With Quote
  #29  
Old 09-20-2005, 01:04 PM
 
CountyPaintball CountyPaintball is offline
 

Newbie
  
Join Date: Dec 2004
Location: NJ
Posts: 8
 

Default

I'm working on the newer version of x-cart (4.0.15 - whatever) and the directories have changed along with line numbers. I'll post if I get it all working properly.

The part I haven't addressed yet is how to ship partial orders and keep everything straight.
__________________
Mike Everland
CountyPaintball.com
Reply With Quote
  #30  
Old 10-05-2005, 04:38 PM
 
hamid hamid is offline
 

Senior Member
  
Join Date: Apr 2004
Posts: 107
 

Default

I had been meaning to post this a while ago, but hadn't gotten round to it.

I accomplished this... it's a workaround rather than a clean solution - but it's quick, it's easy (you dont have to go messing about with .php files) and it works. Although there is a catch.

Basically, what you want to happen is for the customer to know the item is in stock and place an order, or that the item is not in stock and still place the order. So all you have to do is 'trick' the cart into thinking that you have more product than you actually do.

I just added an "Availability" label on my product pages (product.tpl), and next to it put:

{if $product.avail gt 100}
IN STOCK MESSAGE
{else}
OUT OF STOCK MESSAGE
{/if}

So, if the stock level goes under 100, customers see the "out of stock message", otherwise they see the "in stock message".

All you have to do now is to adjust the stock levels for your products by adding 100 to whatever amount you actually have in stock. In other words, if you have 10 items in stock you edit the inventory level for that product in admin to 110.

This way the cart system thinks there are at least 100 items in stock, so it lets customers add the product into the cart, while at the same time, you can also keep track of your inventory by subtracting 100 from the amount shown. And since the stock levels are still maintained accurately, the customer can clearly see whether it's really in stock or not.

Plus, you can also set the Low Limit to whatever you want + 100 so that you continue to get the email notifications when the product runs low. So if you want to be notified when you've got 2 in stock, just set the Low Limit value to 102.

Even if you have already entered your products in the db, you can still use this method - just import your products into Excel, and do the calculation (+100) in bulk, then reimport back into xcart - doing this in Excel should only take about 5-10 minutes even if you've got thousands of products.

Well as I say, it's not ideal, but it works - and it should work fine in any version of xcart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 07:08 AM.

   

 
X-Cart forums © 2001-2020