Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 11-28-2008 11:36:13

cfunderburg
Member
Registered: 12-05-2006
Posts: 91

Allow 'Add to Cart' for 'Out of Stock' Items

I would like to have the 'Add to Cart' button appear even for items that are out of stock. Anybody have any idea how to do this?

I had Stephen at Cartmod.com make a mod that shows not only the stock status, but the number of items availabe and the estimated ship time. I sent him an email on how to do this, but I'm hedging my bets and hoping that someone here can help as well. Thanks!

Offline

 

#2 11-28-2008 20:38:44

stage
Member
Registered: 12-12-2005
Posts: 170

Re: Allow 'Add to Cart' for 'Out of Stock' Items

Is you set "Use declining balance inventory" to No for a particular product, that will allow a customer to order it regardless of the quantity on hand.

But then it also will not automatically reduce your Inventory Count when you sell the product.

Maybe this helps . . .

Nathan Kahn

Offline

 

#3 02-05-2009 14:53:57

cfunderburg
Member
Registered: 12-05-2006
Posts: 91

Re: Allow 'Add to Cart' for 'Out of Stock' Items

For anyone that's interested, here is the code that allowed me to show the "Add to Cart" button for out-of-stock items when "Use Declining Inventory" is enabled. This is for product listings in categories and for product detail displays

Add this code to your ste_prod.pl (MAKE A BACKUP FIRST!) after the Ste Prod Show AddToCart Detail subroutine

Code:

#######################################################################
# Ste Prod Show AddToCart Order Anyway Routine                        #
#######################################################################

sub ste_prod_show_addtocart_orderanyway {

&initialize_sub_add('ste_prod_show_addtocart_orderanyway');

#########
######### This routine prints the pre order add to cart button for products
######### where inventory levels allow you to add the item to the
######### cart.
#########

if ((($product_useinv eq "Y") || ($product_useinv eq "Y" && $product_inv <= "0")) && ($product_pricestatus ne "D") && ($product_pricestatus ne "N")) {

print <<ENDOFTEXT;
<center><INPUT TYPE="IMAGE" SRC="$images_path/button/submit_addtocart.gif" BORDER="0" VALUE="submit"></center>
ENDOFTEXT
} ######### End of if statement.

&initialize_sub_remove('ste_prod_show_addtocart_orderanyway');

} ######### End of subroutine.


#######################################################################
# Ste Prod Show AddToCart OrderAnyway Detail                          #
#######################################################################

sub ste_prod_show_addtocart_detail_orderanyway {

&initialize_sub_add('ste_prod_show_addtocart_detail_orderanyway');

#########
######### This routine prints the add to cart button for products
######### where inventory levels allow you to add the item to the
######### cart.  This is for product detail displays.
#########

if ((($product_useinv eq "Y") || ($product_useinv eq "Y" && $product_inv <= "0")) && ($product_pricestatus ne "D")) {

if (($product_pricestatus ne "N") || ($product_pricestatus eq "N" && $optionproddisp_count > "0")) {

&display_print('ste_proddet_quan');

print <<ENDOFTEXT;
<CENTER><INPUT TYPE="IMAGE" SRC="$images_path/button/submit_addtocart.gif" BORDER="0" VALUE="submit"></CENTER>
ENDOFTEXT

} ######### End of if statement.

} ######### End of if statement.

&initialize_sub_remove('ste_prod_show_addtocart_detail_preorder');

} ######### End of subroutine.

Add this (CGIGET TYPE="SUB" VALUE="ste_prod_show_addtocart_orderanyway") after the (CGIGET TYPE="SUB" VALUE="ste_prod_show_addtocart_detail") element in your product detail displays and category product detail displays.

Offline

 

Board footer