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
 General help me questions
 admin - out of stock display
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bluesky
VP-ASP Super User

302 Posts

Posted - December 22 2011 :  05:37:44  Show Profile  Reply with Quote
Hi

In admin within left column theres a line that says

out of stock products : xxx

then it reports on number of out of stocks :-)

For some strange reason I feel an urge to add a new line below , or delete that info as id prefer a line that says

Products IN STOCK : xxx

anybody help me out with some code or pointers :-)


paul

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - December 23 2011 :  04:09:24  Show Profile  Reply with Quote
Hi Paul,
I'm still working with v6.50 but I think the routines for displaying this are the same.

The stock information is displayed in the file tmp_adminheaderfull.htm. The <%outofstockproducts%> is called from a sub in shopheaders.asp. To change this to Products In Stock open file shopheaders.asp and save a copy.
Find sub outofstockproducts.
Copy the whole sub and paste immediately into the code after the 'end sub' line and make the following changes (in red) to the pasted copy.

sub instockproducts
dim sql
dim myconn, headerrecs
shopopendatabaseP myconn

'get number of products in stock
sql = "select count(catalogid) as instock from products where cstock>0"
set headerrecs = myconn.execute(sql)

if not headerrecs.eof then
response.write headerrecs("instock")
else
response.write "0"
end if

closerecordset headerrecs
shopclosedatabase myconn
end sub

Save and close

Now open tmp_adminheader_full.htm

Find Out Of Stock Products: and change to Products In Stock:
Find <%outofstockproducts%> and change to <%instockproducts%>
Save and close.
Upload and test.

Regards,

Carrol
www.deanston-electrical.co.uk

Edited by - carfin on December 23 2011 04:14:35
Go to Top of Page

bluesky
VP-ASP Super User

302 Posts

Posted - March 15 2012 :  19:29:40  Show Profile  Reply with Quote
Superb carfin

Superb carfin

Superb carfin

Exactly what I needed , many thanks

Paul
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000