ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - In Stock/Out of Stock on Product Lists
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

In Stock/Out of Stock on Product Lists

 Post Reply Post Reply
Author
Message
ComputerJack View Drop Down
Newbie
Newbie
Avatar

Joined: 28-October-2005
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote ComputerJack Quote  Post ReplyReply Direct Link To This Post Topic: In Stock/Out of Stock on Product Lists
    Posted: 02-November-2005 at 11:29am

I'm about to embark on an adventure to try to show In Stock/Out of Stock on the product list.

What we want is to modify viewCat_P to indicate when a product is out of stock, so the user doesn't have to click on "More Details" to find out.  Also, I'm going to explore putting small icons to the right of the product representing which sizes are in-stock (apparel add-on).  Should be a lot of fun.

Has anyone done anything like this before?  If so, any advice would be dearly welcome!

Back to Top
Planetlava_com View Drop Down
Newbie
Newbie
Avatar

Joined: 01-December-2005
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Planetlava_com Quote  Post ReplyReply Direct Link To This Post Posted: 01-December-2005 at 9:51pm

Is this what you mean? (see link Below)

http://www.planetlava.com/shop/pc/viewCat_P.asp?idCategory=4 6

Here is the code I used... It was added to the prdD1.asp file where I wanted the images to show up.

<% if pstockstat > 0 then %>
 <img src="images/in-stock.gif" alt="in stock product">
 <% end if %>

<% if pstockstat = 0 then %>
 <img src="images/out-stock.gif" alt="in stock product">
 <% end if %>

<% if pstockstat < 0 then %>
 <img src="images/out-stock.gif" alt="in stock product">
 <% end if %>

Note: Don't forget to upload your images and change the folder and filenames accordingly.

The pstockstat variable is loaded in viewCat_P.asp. I can't remember if it is there in the original code or if I added it. If it is not there it is loaded with the following line in the same area the other variables for each product are loaded...

pstockstat=rstemp2("stock")

Good Luck!

T-Bone

 

Back to Top
ComputerJack View Drop Down
Newbie
Newbie
Avatar

Joined: 28-October-2005
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote ComputerJack Quote  Post ReplyReply Direct Link To This Post Posted: 02-December-2005 at 8:50am

Marvellous!

I didn't expect it would be that easy...I hadn't noticed that the stock level was returned in the query.

I'm assuming you're not running the apparel add-on, correct?  I think that'll add a bit of complexity, because apparel items stock level isn't quite real-time.  There's a script that runs when you do a search by stock level that updates all the apparel items stock.  I'm looking into replacing that with a SQL trigger so that it IS real-time.  Once that's done, your simple code will work wonders!

Thanks a bunch!

Back to Top
katharina View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25-October-2005
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote katharina Quote  Post ReplyReply Direct Link To This Post Posted: 11-December-2005 at 9:30pm

Question, will it show out of stock if you have your backoffice on ignore stock on some item.  For example we have an item we make on demand and do not have stockage on.  Our site lets the customer buy it, even with 0 or negative inventory.  We basically set this particular item to ignore stock in the back office.  I like to use the code, but do not want to show items out of stock, if they are on ignore stock.  Looking at the code it looks like it only looks for a positive number.  Is there a way to enhance it and consider the ignore inventory feature.

Katharina



Edited by katharina - 11-December-2005 at 9:32pm
Back to Top
fidjiti View Drop Down
Senior Member
Senior Member


Joined: 30-November-2006
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote fidjiti Quote  Post ReplyReply Direct Link To This Post Posted: 07-February-2007 at 4:58am
I would think that if you're out of stock and you told the system to allow orders for out of stock items and you've entered the estimated time it'll take to ship, you can change your image to say "Special Order" or "Ships in X days" instead of showing the out of stock image. No one wants to see that. You can make it look possitive. :) But if you make the item inactive then you won't see that item at all, so you woudn't have to worry about the image.
hope that makes sense and hope that helps. I haven't tried that code change yet, but I may in the future. Let me know how it works. If I'm wrong I'd love it if someone could correct me. (I'm new to this.)

Linda - I wish I knew ASP.
To view my ever evolving site click the "www" button below. :)
Back to Top
rotokirby View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22-April-2007
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote rotokirby Quote  Post ReplyReply Direct Link To This Post Posted: 15-June-2007 at 11:13pm
In similar fashion to the above I've attempted to add Inventory status to
our category pages...the following works for regular categories (those
loaded by viewcategories.asp):

Add the following to pcShowProductH.asp (assuming you're using
Horizontal alignment)....


           <% if pstock > 2 then %>
     In Stock
      <% end if %>
     
      <% if pstock < 3 and pstock > 0 then %>
     Low Stock
      <% end if %>

     <% if pstock = 0 then %>
     Out of Stock
     <% end if %>

     <% if pstock < 0 then %>
     Out of Stock
     <% end if %>



I would also like to get it to work for the "special" categories such as
Specials, Featured Products etc. but can't seem to make it work. Anyone
have any ideas?

Back to Top
rotokirby View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22-April-2007
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote rotokirby Quote  Post ReplyReply Direct Link To This Post Posted: 15-June-2007 at 11:45pm
Figured it out... I had to declare the variable for each of those pages
seperately by inserting the following in various places:


' Set variables for H display
if pcPageStyle = "h" then
     set pStock=rsProducts("stock")
     set pNoStock=rsProducts("noStock")
end if


I'm no coder, so if anyone sees some catastrophic result that could come
of my technique, I'm all ears....I'm just using logic and cutting and pasting
stuff until I get what I want! :)



Edited by rotokirby - 15-June-2007 at 11:58pm
Back to Top
Tzur-pc View Drop Down
Newbie
Newbie
Avatar

Joined: 01-March-2007
Location: Israel
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tzur-pc Quote  Post ReplyReply Direct Link To This Post Posted: 09-July-2007 at 11:50pm

Hi,

I dont understand what file should i edit and where shuold i add this lines????

 

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.090 seconds.