I've read the manual, placed what is needed in the link.html template but when I try to make a purchase a blank page appears.
Mar 15, 2003, 8:33 AM
User (219 posts)
Mar 15, 2003, 8:33 AM
Post #5 of 23
Views: 8318
Aki, found another one. Already corrected it also.
The HTTP referer should have preference over the cookie value when getting the entry_url variable to continue shopping, otherwise if users shop from multiple locations the cookie value will cause some confusion and incorrect continue shopping referers.
the correct code shoud be:
if ($ENV{HTTP_REFERER} =~ /cart\.cgi/) {
$referido = $IN->cookie( "entry_url" );
}
else {
$referido = $ENV{HTTP_REFERER};
}
$tags->{gocart_to_currency} = dollar_str_subroutine();
$tags->{gocart_to_datestr} = \×tamp_to_datestr;
$tags->{cid} = $IN->param( "cid" ) || $IN->cookie( "cid" );
$tags->{entry_url} = $IN->param( "entry_url" )
|| $referido
|| $IN->cookie( "entry_url" )
|| $cfg->{cart_bounce_url};
The HTTP referer should have preference over the cookie value when getting the entry_url variable to continue shopping, otherwise if users shop from multiple locations the cookie value will cause some confusion and incorrect continue shopping referers.
the correct code shoud be:
if ($ENV{HTTP_REFERER} =~ /cart\.cgi/) {
$referido = $IN->cookie( "entry_url" );
}
else {
$referido = $ENV{HTTP_REFERER};
}
$tags->{gocart_to_currency} = dollar_str_subroutine();
$tags->{gocart_to_datestr} = \×tamp_to_datestr;
$tags->{cid} = $IN->param( "cid" ) || $IN->cookie( "cid" );
$tags->{entry_url} = $IN->param( "entry_url" )
|| $referido
|| $IN->cookie( "entry_url" )
|| $cfg->{cart_bounce_url};
Mar 31, 2003, 12:57 PM
User (219 posts)
Mar 31, 2003, 12:57 PM
Post #14 of 23
Views: 8212
Aki, here's what i've found so far.
The error log shows this:
"my" variable $db masks earlier declaration in same scope at (eval 708) line 7.
"my" variable $db masks earlier declaration in same scope at (eval 712) line 5.
"my" variable $db masks earlier declaration in same scope at (eval 717) line 11.
"my" variable $db masks earlier declaration in same scope at (eval 720) line 5.
"my" variable $db masks earlier declaration in same scope at (eval 724) line 4.
"my" variable $db masks earlier declaration in same scope at (eval 727) line 6.
"my" variable $db masks earlier declaration in same scope at (eval 728) line 4.
"my" variable $db masks earlier declaration in same scope at (eval 734) line 6.
"my" variable $row masks earlier declaration in same scope at (eval 734) line 9.
"my" variable $db masks earlier declaration in same scope at (eval 738) line 6.
"my" variable $row masks earlier declaration in same scope at (eval 738) line 9.
"my" variable $db masks earlier declaration in same scope at (eval 741) line 6.
"my" variable $time_norm masks earlier declaration in same scope at (eval 741) line 21.
"my" variable $db masks earlier declaration in same scope at (eval 742) line 6.
"my" variable $time_norm masks earlier declaration in same scope at (eval 742) line 21.
Use of uninitialized value in sprintf at /home/simrada/public_html/cgi-bin/scripts/admin/Plugins/GOCart/Payment/Invoice.pm line 298.
The exact problem i'm having is the following:
user browses products ->
User adds product to car -> (if first time running then error 500) if not then it correctly shows quantity
Now, here's where the problem starts. if yiu try to change quantity when in the cart in get all messed up. sometimes it updates it, sometimes it doens't some times when you try to advance to the next screen it tells you you don't have any products in your cart, altough in the previuous screen (cart) you had the products corretly listed. I'm sure this problem is related to this:
ame="quantity<%order_row%>"
Why is the name of the quantity field appended with <%order_row%> in the templates? now look at the error log I sent you. does it help?
The error log shows this:
Code:
[Mon Mar 31 14:49:40 2003] [error] Can't locate Payment.pm in @INC (@INC contains: /home/simrada/public_html/forums/cgi-bin/admin /home/simrada/www/forums/cgi-bin/admin ../.. /home/simrada/public_html/cgi-bin/scripts/admin /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /home/simrada/www/cgi-bin/scripts/cart.cgi line 58."my" variable $db masks earlier declaration in same scope at (eval 706) line 4. "my" variable $db masks earlier declaration in same scope at (eval 708) line 7.
"my" variable $db masks earlier declaration in same scope at (eval 712) line 5.
"my" variable $db masks earlier declaration in same scope at (eval 717) line 11.
"my" variable $db masks earlier declaration in same scope at (eval 720) line 5.
"my" variable $db masks earlier declaration in same scope at (eval 724) line 4.
"my" variable $db masks earlier declaration in same scope at (eval 727) line 6.
"my" variable $db masks earlier declaration in same scope at (eval 728) line 4.
"my" variable $db masks earlier declaration in same scope at (eval 734) line 6.
"my" variable $row masks earlier declaration in same scope at (eval 734) line 9.
"my" variable $db masks earlier declaration in same scope at (eval 738) line 6.
"my" variable $row masks earlier declaration in same scope at (eval 738) line 9.
"my" variable $db masks earlier declaration in same scope at (eval 741) line 6.
"my" variable $time_norm masks earlier declaration in same scope at (eval 741) line 21.
"my" variable $db masks earlier declaration in same scope at (eval 742) line 6.
"my" variable $time_norm masks earlier declaration in same scope at (eval 742) line 21.
Use of uninitialized value in sprintf at /home/simrada/public_html/cgi-bin/scripts/admin/Plugins/GOCart/Payment/Invoice.pm line 298.
The exact problem i'm having is the following:
user browses products ->
User adds product to car -> (if first time running then error 500) if not then it correctly shows quantity
Now, here's where the problem starts. if yiu try to change quantity when in the cart in get all messed up. sometimes it updates it, sometimes it doens't some times when you try to advance to the next screen it tells you you don't have any products in your cart, altough in the previuous screen (cart) you had the products corretly listed. I'm sure this problem is related to this:
ame="quantity<%order_row%>"
Why is the name of the quantity field appended with <%order_row%> in the templates? now look at the error log I sent you. does it help?
Mar 31, 2003, 1:11 PM
Staff (429 posts)
Mar 31, 2003, 1:11 PM
Post #15 of 23
Views: 8140
Never seen that error before from the cart. I've checked my copy of the code and it doesn't have the usual suspects for those errors in it.
Mind PM''ing or emailing me the access information to your server so I can have a look at it? My email is aki@gossamer-threads.com
Mind PM''ing or emailing me the access information to your server so I can have a look at it? My email is aki@gossamer-threads.com
Mar 31, 2003, 1:46 PM
Veteran (19537 posts)
Mar 31, 2003, 1:46 PM
Post #18 of 23
Views: 8149
That error means two variables are being declared with my() inside the same block.
Can you take a look in the code at the lines mentioned in the errors and see if you can see two same name variables.
eg...
...some code...
my $foo = 2;
Can you take a look in the code at the lines mentioned in the errors and see if you can see two same name variables.
eg...
Code:
my $foo = 1; ...some code...
my $foo = 2;
Mar 31, 2003, 3:35 PM
User (219 posts)
Mar 31, 2003, 3:35 PM
Post #19 of 23
Views: 8146
paul, thanks for pointing that out.
I had globals declaring it twice, hence when the gocart script called this global i had the errors show up. however the problem still exists. I've narrowed the error to just .
Use of uninitialized value in sprintf at /home/simrada/public_html/cgi-bin/scripts/admin/Plugins/GOCart/Payment/Invoice.pm line 298
looks to me that this error is related to a subroutine doing something to detect changes in the cart. something related to a dirty call or something. maybe it was not propertly tested with mod_perl??
I had globals declaring it twice, hence when the gocart script called this global i had the errors show up. however the problem still exists. I've narrowed the error to just .
Use of uninitialized value in sprintf at /home/simrada/public_html/cgi-bin/scripts/admin/Plugins/GOCart/Payment/Invoice.pm line 298
looks to me that this error is related to a subroutine doing something to detect changes in the cart. something related to a dirty call or something. maybe it was not propertly tested with mod_perl??
Mar 31, 2003, 3:47 PM
Veteran (19537 posts)
Mar 31, 2003, 3:47 PM
Post #20 of 23
Views: 8148
It's not specifically mod_perl related, it's just that when you load modules into mod_perl they are checked for warnings and that is why you see the errors. If you removed the script from mod_perl and added -w to the shebang line then the same errors would show.
eg....
print "Content-type: text/html\n\n";
print sprintf $foo, $bar;
...that would give the same error as you are getting because $foo and $bar don't exist. You will need to check which of the variables being passed into sprintf are undeclared and trace it back to see why it isn't declared.
eg....
Code:
#!/usr/bin/perl -w print "Content-type: text/html\n\n";
print sprintf $foo, $bar;
...that would give the same error as you are getting because $foo and $bar don't exist. You will need to check which of the variables being passed into sprintf are undeclared and trace it back to see why it isn't declared.
Mar 31, 2003, 4:16 PM
User (219 posts)
Mar 31, 2003, 4:16 PM
Post #21 of 23
Views: 8157
here's the code:
That's the line giving me the problems... $true_grandtotal seems to be properly declared before. however, i don't know how to trace "%.${dec_places}f", that's out of my league.
That's the line giving me the problems... $true_grandtotal seems to be properly declared before. however, i don't know how to trace "%.${dec_places}f", that's out of my league.
Code:
$data_payload->{GrandTotal} = sprintf "%.${dec_places}f", $true_grandtotal;
Apr 1, 2003, 6:40 AM
User (219 posts)
Apr 1, 2003, 6:40 AM
Post #23 of 23
Views: 8087
I think the problem is much much worse than what I anticipated.
if I try to change any option in the admin screen the checkout screen does not shows anything but a hash reference. I diff'ed the .cfg files with unchanged ones and every time an autoblock reference was changed or removed the problem was present.
Aki, I don't think this is just ME, this is definitely a major bug in the code, which evidently was untested with mod_perl. I run my enviroment exclusively under mod_perl, so if I had known this before you can bet i've not installed this software. Please, do whatever is in your hands to resolve this matter, I've already emailed you access to my server.
if I try to change any option in the admin screen the checkout screen does not shows anything but a hash reference. I diff'ed the .cfg files with unchanged ones and every time an autoblock reference was changed or removed the problem was present.
Aki, I don't think this is just ME, this is definitely a major bug in the code, which evidently was untested with mod_perl. I run my enviroment exclusively under mod_perl, so if I had known this before you can bet i've not installed this software. Please, do whatever is in your hands to resolve this matter, I've already emailed you access to my server.