![]() |
In Stock/Out of Stock on Product Lists |
Post Reply ![]() |
Author | |
ComputerJack ![]() Newbie ![]() ![]() Joined: 28-October-2005 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() 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! |
|
![]() |
|
Planetlava_com ![]() Newbie ![]() ![]() Joined: 01-December-2005 Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
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 %> <% if pstockstat = 0 then %> <% if pstockstat < 0 then %> 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
|
|
![]() |
|
ComputerJack ![]() Newbie ![]() ![]() Joined: 28-October-2005 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
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! |
|
![]() |
|
katharina ![]() Senior Member ![]() ![]() Joined: 25-October-2005 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
fidjiti ![]() Senior Member ![]() Joined: 30-November-2006 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
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. :) |
|
![]() |
|
rotokirby ![]() Senior Member ![]() ![]() Joined: 22-April-2007 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
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)....
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? |
|
![]() |
|
rotokirby ![]() Senior Member ![]() ![]() Joined: 22-April-2007 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
Figured it out... I had to declare the variable for each of those pages
seperately by inserting the following in various places:
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 |
|
![]() |
|
Tzur-pc ![]() Newbie ![]() ![]() Joined: 01-March-2007 Location: Israel Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
Hi, I dont understand what file should i edit and where shuold i add this lines????
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |