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

"IN STOCK" message with buy now button

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-20-2007, 04:58 AM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 303
 

Default "IN STOCK" message with buy now button

We get a flood of phone calls and emails asking if a product is in stock. To help reduce this, I am thinking that an "in stock" message or image that appears whenever the buy now button appears would help. Any ideas how to accomplish this?

Thanks!
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
  #2  
Old 02-20-2007, 05:10 AM
  NightFire's Avatar 
NightFire NightFire is offline
 

X-Adept
  
Join Date: Jul 2004
Location: The Netherlands
Posts: 561
 

Default Re: "IN STOCK" message with buy now button

You can activate the inventor tracking module. This shows how many products there are in stock, if set in the product details.
Also you could edit products.tpl And use an if statement to show an image when in stock. Also was thinking about this idea. Will try to work it out when I'm back at home.

Edit: Copied this code from the product.tpl page:

Code:
{if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""} <tr><td width="30%">{$lng.lbl_in_stock}</td><td nowrap="nowrap"><span id="product_avail_txt">{if $product.avail gt 0}{$lng.txt_items_available|substitute:"items":$product.avail}{else}{$lng.lbl_no_items_available}{/if}</span></td></tr> {/if}

You can just remove the <td width="30%"> and add an image before the code so it will say how many items there are in stock, or if the product is out of stock. You can paste the code in your products.tpl anywhere you want.
__________________
Best regards,
Niki Buitenrust Hettema

X-Cart Gold 4.1.8 (Live & Loaded)
Royal Bhaktapur: Handmade products from Nepal - Pashmina's, scarfs, shawls, stola's and more...
Reply With Quote
  #3  
Old 02-23-2007, 05:12 PM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 303
 

Default Re: "IN STOCK" message with buy now button

I don't want to show how many products I have in stock. I just want to list in stock or "available for immediate shipping" or something similar. I already have inventory tracking enabled, but I don't show the quantity of items remaining. How can I just add text to in stock items?
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
  #4  
Old 03-09-2007, 08:53 AM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 303
 

Default Re: "IN STOCK" message with buy now button

I ended up just changing the language variable for the buy now button to IN STOCK - Buy Now. It's cheap and dirty, so we'll see if this helps reduce emails and phone calls.
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
  #5  
Old 03-09-2007, 12:12 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: "IN STOCK" message with buy now button

Code:
{if $product.avail gt 0} IN STOCK {else} BACKORDERED {/if}
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote

The following user thanks inebriate for this useful post:
dmic (02-08-2014)
  #6  
Old 03-09-2007, 12:33 PM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 303
 

Default Re: "IN STOCK" message with buy now button

Just add that code to product.tpl ?
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
  #7  
Old 03-09-2007, 03:51 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: "IN STOCK" message with buy now button

in product.tpl, find
Code:
{if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""} <TR><TD width="30%">{$lng.lbl_quantity}</TD><TD nowrap><SPAN id="product_avail_txt">{if $product.avail gt 0}{$product.avail}</SPAN>{else}{$lng.txt_no}{/if} {$lng.txt_items_available}</TD></TR> {/if}
replace with
Code:
{if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""} <TR><TD width="100%"> {if $product.avail gt 0} IN STOCK {else} BACKORDERED {/if} </TD></TR> {/if}
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #8  
Old 01-01-2008, 01:04 PM
 
fearnothing fearnothing is offline
 

Senior Member
  
Join Date: Jun 2005
Location: North East England
Posts: 124
 

Default Re: "IN STOCK" message with buy now button

We use a similar system on our store to display a message when the stock level is at Zero.

We are starting to implement inventory management using a bar code scanner, and I have written some basic external PHP scripts to allow us to 'swipe' goods as they go out or are received in, to update the inventory accordingly.

To make this work we need to stop the inventory from auto decreasing after every order placed, however if the 'Inventory Tracking' option is disabled, it also disables the check to see if an item is out of stock and EVERYTHING appears to be in stock. Doh!

Can anyone point out the code that should be commented out to stop x-cart.products.avail being updated on order completion? The option to 'Disable Out Of Stock Items' is not appropriate as we then lose out on search engines picking these items up, and of course browsing customers (our OOS message includes a 'please contact us for delivery estimates' link).

BTW I'm happy to post the PHP scripts if anyone is interested - perhaps some Smarty wizard can find a way of making them work from within the admin interface? Well beyond my level of expertise, I'm afraid!
__________________
www.smartchoicemusic.com
Smart Choice Music - Import CD and DVD Specialists
4.6.0
MySQL 5.5.34
PHP 5.4.24
Apache/2.2.26
Multiple homegrown and paid-for mods
Reply With Quote
  #9  
Old 02-26-2012, 05:36 PM
 
smek smek is offline
 

Advanced Member
  
Join Date: Jan 2004
Posts: 54
 

Default Re: "IN STOCK" message with buy now button

I am trying to use the same code but it doesnt seem to work. Maybe because i am using 4.1.6 ?

In the product details it shows "out of stock" so i know its out of stock...

{* show message if product is out of stock *}

{if $product.avail eq 0}
<p>this is out of stock</p>
{/if}

{* show message if product is out of stock *}
__________________
xcart 4.5.2
Reply With Quote
  #10  
Old 02-27-2012, 08:46 AM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 303
 

Default Re: "IN STOCK" message with buy now button

Did you clear your templates cache?
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:26 AM.

   

 
X-Cart forums © 2001-2020