Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 Lost submit button
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vigilant
Starting Member

4 Posts

Posted - August 14 2007 :  17:58:39  Show Profile  Reply with Quote
Hello,

I seem to have lost a submit button on shopcustomer.asp. If you go to http://dev.cierratech.com/tvears/shopexd.asp?id=2 and add that item to your cart, then proceed to checkout you'll see that there's a submit buttom for login but not a submit button below the shipping select box at the bottom. What could have caused this? Thanks in advance.

devshb
Senior Member

United Kingdom
1904 Posts

Posted - August 14 2007 :  18:51:42  Show Profile  Visit devshb's Homepage  Reply with Quote
looks like some kind of bug in the number of arrays that vpasp is using on that line; the generated html says:

<p>Microsoft VBScript runtime </font> <font face="Arial" size=2>error '800a0009'</font>
<p>
<font face="Arial" size=2>Subscript out of range: 'i'</font>
<p>
<font face="Arial" size=2>/tvears/shop$db.asp</font><font face="Arial" size=2>, line 676</font>

That in turn seems to stem from a drop-down call, probably the shipping methods array. The strange thing is that those shipping arrays are by default set to being capable of holding up to 50 values, but yours is failing at 5; looks like it needs a bit of investigation to find out why; might be a shipping addon that's conflicting with the vpasp variables.

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

Edited by - devshb on August 14 2007 19:08:05
Go to Top of Page

design2host
Starting Member

United Kingdom
7 Posts

Posted - August 23 2007 :  10:54:06  Show Profile  Visit design2host's Homepage  Reply with Quote
Hi,

I too have run into this problem.

I'm using a weightrange shipping method which has resulted in over 5500 database entries thus far but when i click to "checkout" and go to the shopcustomer.asp page i get the Subscript out of range: 'i' error

Did you manage to find out what was causing this?
Go to Top of Page

vigilant
Starting Member

4 Posts

Posted - August 23 2007 :  10:59:30  Show Profile  Reply with Quote
I paid BYZ (see Simon's post above) to fix it for me. I believe he said it was indeed related to Shipping, but we had it setup by price range. Not sure the particulars of all he did to fix it, but you might be best served to contact him about it.
Go to Top of Page

design2host
Starting Member

United Kingdom
7 Posts

Posted - August 23 2007 :  11:05:26  Show Profile  Visit design2host's Homepage  Reply with Quote
I've mangaed to figure it out but now i need to know what i should update the code to

The problem is with the first 2 lines

#######

for i= 0 to cint(count) -1
if iFieldnames(i) > "" then

#######

count is the number of values the shipmethods table (in my case 5500 ish).

iFieldnames (as pointed out by devshb) only holds 50 entries so when it is iteration my shipmethods data it tries to get entry 51 from the iFieldnames but there isn't one.

How should this be updated to cope with this?

Many Thanks.
Go to Top of Page

design2host
Starting Member

United Kingdom
7 Posts

Posted - August 23 2007 :  11:25:40  Show Profile  Visit design2host's Homepage  Reply with Quote
I think i've tracked this down. Inside shippingshopcalc.asp there is a Sub GetShippingDatabase (Line 140) and in here there is a check to see if the shipmethod has been processed already so that you only get 1 instance of UPS instead of one for each weight entry in the database.

Further down the function there is an increment: shippingcount=shippingcount+1 (Line 187) but is outside of that check and therefore is incremented for each record. I believe this should be within the check so i've move this to Line 178 between "shippingvalues(shippingcount) =Tempvalue" and "end if" and it appears to be functioning as i would expect now.
Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - August 23 2007 :  13:33:22  Show Profile  Visit devshb's Homepage  Reply with Quote
the fix that we did was to lengthen the array sizes in various asps that used the shipping method arrays. It wasn't just the global shipping arrays that needed lengthening, it was also the local/function ones and the shipping addon ones too.
What it seems to do is populate the methods with the full list, and then narrow it down afterwards to only the relevant ones, so it's the initial setup that's the problem.
So, this is sort of 2 problems in one, but by lengthening the arrays it ends up resolving the issues and the final options/data end up correct.

I didn't want to mess around with the logic that populates the arrays because that could impact other areas, so the best thing seemed to be to simply lengthen all the relevant array declarations.

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

Edited by - devshb on August 23 2007 13:34:32
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00