ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Stock Level on a Category Page
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Stock Level on a Category Page

 Post Reply Post Reply
Author
Message
avalight View Drop Down
Newbie
Newbie


Joined: 21-September-2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote avalight Quote  Post ReplyReply Direct Link To This Post Topic: Stock Level on a Category Page
    Posted: 23-May-2012 at 12:38pm
Hello
I am interested in displaying the units on hand for a non-apparel product on the category page.  The information shows up on the product page, but the visitor must click through before they can see how many units are in our inventory.  Perhaps this is a small tweak to the code, I don't know. 

Thoughts, anyone?
Thanks
curt

Curt
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 24-May-2012 at 12:41am
Hi Curt,

This is easily doable ... I just haven't had a minute to respond with instruction on it today. 

Meanwhile, could you let us know what layout you're using for your category pages?
Back to Top
avalight View Drop Down
Newbie
Newbie


Joined: 21-September-2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote avalight Quote  Post ReplyReply Direct Link To This Post Posted: 24-May-2012 at 12:58am
Hi Sean
Here is the category page i am putting this on:  page link
So I think that is horizontal.
I think the code mod is in the pcShowProductH.asp, around line 33

I am using V4.5a

Best
Curt
Curt
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 24-May-2012 at 3:14am
Hi Curt,

I couldn't resist looking into this before I shut down tonight.

Displaying the stock qty is a snap as the data is already there. You can simply place something like the following on any pcShowProduct*.asp page wherever you'd like it:
<p class="myShowStock">stock: <%=pStock%></p>
I would probably put this right above the "more info" and "buy" buttons.

To limit this to only display for non-apparel products, you'll need to tweak some stock code.

First, you'll need to add the field to the query generating the array of product data. Find:
'// Query Products of current category
Below that is the query you'll need to edit. In that query, find:
products.pcProd_BackOrder FROM products
Add the new field so that part is now:
products.pcProd_BackOrder, products.pcProd_Apparel FROM products
Now capture that from the product array to use later. Find: 
pcv_intBackOrder=pcArray_Products(15,pCnt) '// rs("pcProd_BackOrder")
Below that, add:
pcv_intApparel=pcArray_Products(16,pCnt) '// rs(" .pcProd_Apparel ")
Now you can use this information on your display intelligently, so that the above display markup would be instead, like this:
<% if pcv_intApparel <> 1 then %>
<p class="myShowStock">stock: <%=pStock%></p>
<% end if %>
I expect that should do what you're looking for.
Back to Top
avalight View Drop Down
Newbie
Newbie


Joined: 21-September-2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote avalight Quote  Post ReplyReply Direct Link To This Post Posted: 24-May-2012 at 11:05am
Wow, thanks, I will check it out and let you know how it went.
Best
Curt
Curt
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 31-May-2012 at 4:02am
Hi Curt,

How'd it go? 

I do see a little syntax error in my directions above, though. This bit should be:
pcv_intApparel=pcArray_Products(16,pCnt) '// rs("pcProd_Apparel ")

I hope that didn't throw you.

This is so "doable" that I'd like to add it to the wiki once I know how it went for you. 
< id="Siber_1" ="application/rf-chrome-plugin" style="left: 0px; top: 0px; width: 0px; height: 0px; : fixed; display: block; ">
Back to Top
avalight View Drop Down
Newbie
Newbie


Joined: 21-September-2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote avalight Quote  Post ReplyReply Direct Link To This Post Posted: 31-May-2012 at 2:08pm
Hi Sean
I only used part of the code, as the products that I was showing were not apparel products and in a special category I created for Quick Ship Products.

[code]
<% if pIDCategory=35 then %>
        <p class="pcShowProductStock">Stock on Hand: <%=pStock%></p>
        <% end if %>
[code]

In your code, does the stock on hand show alongside each product option without having to click?

Anyway, it was helpful to get this from you.

Thanks
Curt

Curt
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.055 seconds.