VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 [cstock] - Display ''In Stock'' instead of quantity
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

vukodalk
Starting Member

9 Posts

Posted - March 26 2007 :  11:23:32  Show Profile  Reply with Quote
Hello

v6.50

I do not want [cstock] to display the quantity amount stock. I would like it to simply say 'In Stock' instead of the number in stock.

What code do I change to be able to accomplish this?

Mario

rvaga
VP-ASP Super User

USA
254 Posts

Posted - March 26 2007 :  12:36:35  Show Profile  Reply with Quote
Don't know. . . but this would be a good idea!
Go to Top of Page

bluesky
VP-ASP Super User

302 Posts

Posted - March 29 2007 :  19:42:16  Show Profile  Reply with Quote
no it wouldnt ........it would be a great idea !
Go to Top of Page

vukodalk
Starting Member

9 Posts

Posted - March 31 2007 :  00:54:23  Show Profile  Reply with Quote
Hello

I think I have found the answer @ http://www.shopforus.com/index.asp?url=customize28

Unless this is the same thing as [cstock] introduced in later versions of VP-ASP

I haven't tested it yet but you may be able to play around with it to hide the "inventory" some how.

Mario

Edited by - vukodalk on March 31 2007 00:58:04
Go to Top of Page

Questar
Starting Member

Canada
26 Posts

Posted - April 02 2007 :  08:42:41  Show Profile  Visit Questar's Homepage  Reply with Quote
I followed Mario's link and tried this, but it didn't work. Is there a specific template filename I need to add to my product records? Currently I have left the "template listing" field blank.
Go to Top of Page

vukodalk
Starting Member

9 Posts

Posted - April 06 2007 :  08:09:06  Show Profile  Reply with Quote
That didn't work.

C'mon VPASP support - this should be easy for you. My ASP skills are very limited.

Simply, check against the product quantity in the database and display the words "In Stock" if stock is > than "xOutOfStockLimit" or "Out of Stock" if it is < than "xOutOfStockLimit" instead of writing the "QUANITY" of stock.

Looking forward to your reply.

Mario



Edited by - vukodalk on April 06 2007 08:09:48
Go to Top of Page

troycoppola
Starting Member

10 Posts

Posted - April 17 2007 :  16:14:26  Show Profile  Reply with Quote
I would like a slution for this also if someone is willing donate the time.
Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - April 17 2007 :  17:41:06  Show Profile  Visit devshb's Homepage  Reply with Quote
if you're using the raw [cstock] value in your templates (as opposed to using the special buttons template fields which sometimes show "out of stock" messages etc), then you could create a new template field.

If you're using something like our byz033 addon (to create extra template fields), then you could use example1 as your base, eg use this in your template:

[BYZ_EXAMPLE1_ARGS cstock]

and then change the function in byz_template_codes_functions_example1.asp to something like this:

Sub BYZ_EXAMPLE1_ARGS(arg_in_value,arg_out_value,arg_in_cursor)
Dim retval
retval=""
if (arg_in_value<>"" and IsNull(arg_in_value)=false) then
if (CLng(arg_in_value)>=CLng(0)) then
retval="In Stock"
else
retval="Out of Stock"
end if
else
retval="Out of Stock"
end if
arg_out_value=retval
End Sub


our extra template fields addon (byz033) is here:
http://www.bigyellowzone.com/shopexd.asp?id=42

but that's also included for free in all our other template-field related addons too.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on April 17 2007 17:42:25
Go to Top of Page

troycoppola
Starting Member

10 Posts

Posted - April 18 2007 :  13:04:22  Show Profile  Reply with Quote
Thanks. I do have the byz033 template.
Go to Top of Page

troycoppola
Starting Member

10 Posts

Posted - April 20 2007 :  08:32:30  Show Profile  Reply with Quote
I tried your code and it does not show the words 'in stock' or 'out of stock' It just displays the value in the cstock column. Is there something wrong with this code?

Sub BYZ_EXAMPLE1_ARGS(arg_in_value,arg_out_value,arg_in_cursor)
Dim retval
retval=""
if (arg_in_value<>"" and IsNull(arg_in_value)=false) then
if (CLng(arg_in_value)>=CLng(0)) then
retval="In Stock"
else
retval="Out of Stock"
end if
else
retval="Out of Stock"
end if
arg_out_value=retval
End Sub
Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - April 20 2007 :  09:58:26  Show Profile  Visit devshb's Homepage  Reply with Quote
it should be fine, just make sure you use this in your template instead of [cstock] -

[BYZ_EXAMPLE1_ARGS cstock]

try adding test messages around the template-field too, just to make sure that it's using that template in the place that you're seeing the value.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

troycoppola
Starting Member

10 Posts

Posted - April 20 2007 :  20:17:11  Show Profile  Reply with Quote
I tried everything. It just shows what is in the cstock field. I am using ths on the tmp_product.htm file. Could that be the problem?
Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - April 21 2007 :  01:43:02  Show Profile  Visit devshb's Homepage  Reply with Quote
It should work fine on any product-based template.

If you let me know the ftp server/userid/pwd and example urls for a product with stock and one without, then I'll have a look; you can email that to me direct to [email protected], or post a ticket on our help area with the info asking for me and I'll pick it up. I'm curious to know why it's not working, so I'd like to have a look, especially as there might be other people with a similar problem and the root cause/solution might apply to them too.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

troycoppola
Starting Member

10 Posts

Posted - April 24 2007 :  08:49:59  Show Profile  Reply with Quote
Wow! I have to say that I am extremely impressed with the outstanding service that BigYellowZone given me. Your solution worked like a charm. EXACTLY what I wanted. The scripts this company offers, allow non-programmers like myself to customize my site with ease. The support after you purchase a product from them is outstanding. Thanks Simon
Go to Top of Page

Mark Priest
VP-ASP Expert

United Kingdom
570 Posts

Posted - June 26 2007 :  21:33:02  Show Profile  Reply with Quote
Hi Simon,

How could i modify this so that it shows LIMITED STOCK if the stock level is below 5 for example?

Regards,

Mark
Retail Fireworks
Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - June 27 2007 :  03:48:22  Show Profile  Visit devshb's Homepage  Reply with Quote
Dim retval
retval=""
if (arg_in_value<>"" and IsNull(arg_in_value)=false) then
if (CLng(arg_in_value)>=CLng(0)) then
if (Clng(arg_in_value)<CLng(5)) then
retval="LIMITED STOCK"
else
retval="In Stock"
end if
else
retval="Out of Stock"
end if
else
retval="Out of Stock"
end if
arg_out_value=retval

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000