[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Switching from HIGH mode to RPC mode problem


At 09:27 11/08/2005, you wrote:
Mark Bryant wrote:

$myout = sprintf("<TD ALIGN=RIGHT class=contentbar1>&#163;%.2f</td>", $Tag->subtotal({ noformat => 1 })*0.175);
                   ^^^^^^^^
                  'noformat'

Try quoting noformat. I've found that unquoted hash keys in Perl blocks can be funny.

jimbo
;-)

Hi Jimbo,

quoting noformat seems to have done the trick for that one!! Many thanks for that :)

However, now I'm getting more weird [perl] errors on my checkout page that also don't happen in HIGH mode

supercow.vwe.net egP8XQBC:vwe.net - [11/August/2005:09:00:28 +0000] eros /cgi-bin/eros/process.html Safe: Can't locate object method "new" via package "Vend::Parse" (perhaps you forgot to load "Vend::Parse"?) at /usr/lib/interchange/lib/Vend/Interpolate.pm line 618.
>
>
> if ($Scratch->{is_bad_shopping_cart} > 0){
> $myout = <<'EOF';
> <table align="center" cellpadding="0" cellspacing="0">
> <TR>
> <td><img align="left" src="/eros/images/warning_icon.gif" border="0"></td>
> <td align=center><b><font color="#993333">You must remove all Out-of-Stock items<BR>from your cart before you can checkout!</font></b></td>
> </tr>
> </table>
> EOF
>   }
> elsif ($Tag->total_cost({ noformat => 1}) <7){
> $myout = <<'EOF';
> <table align="center" cellpadding="0" cellspacing="0">
> <TR>
> <td><img align="left" src="/eros/images/warning_icon.gif" border="0"></td>
> <td align=center><b><font color="#993333">Not enough items in your shopping cart!<br>Minimum Order &#163;7.00</font></b></td>
> </tr>
> </table>
> EOF
> }
> return $myout;
>
>

supercow.vwe.net egP8XQBC:vwe.net - [11/August/2005:09:00:28 +0000] eros /cgi-bin/eros/process.html Safe: Can't locate object method "new" via package "Vend::Parse" (perhaps you forgot to load "Vend::Parse"?) at /usr/lib/interchange/lib/Vend/Interpolate.pm line 618.
>
>
> my $myout = sprintf("<a href='http://quote.yahoo.com/m5?a=%.2f&s=GBP&t=EUR&c=0' target='_blank'>Currency Converter</a>", $Tag->total_cost({ noformat => 1}) );
>   return $myout;
>
>
supercow.vwe.net egP8XQBC:vwe.net - [11/August/2005:09:00:28 +0000] eros /cgi-bin/eros/process.html Safe: Can't locate object method "new" via package "Vend::Parse" (perhaps you forgot to load "Vend::Parse"?) at /usr/lib/interchange/lib/Vend/Interpolate.pm line 618.
>
>
>   my $freeout = '';
>   if ($Tag->total_cost({ noformat => 1}) >= 10.00) {
>     $freeout = <<'EOF';
> <BR><B>Your order qualifies for an Eros Shop Free Sample!</B><small><sup>**</sup></small><BR><BR>
>       <SELECT NAME=free_sample align=absmiddle>
>         <OPTION VALUE=""> Please Choose Your Free Sample
> <OPTION [selected free_sample Eros Shop Choice] VALUE="Eros Shop Choice"> Eros Shop Choice > <OPTION [selected free_sample Eros Bodyglide 1.5ml Sachet] VALUE="Eros Bodyglide 1.5ml Sachet"> Eros Bodyglide 1.5ml Sachet
>         <!-- truncated option list -->
> <OPTION [selected free_sample Happy Hour Rum Condom] VALUE="Happy Hour Rum Condom"> Happy Hour Rum Condom
> EOF
>   if ($Tag->total_cost({ noformat => 1}) >= 25.00) {
>     $freeout .=<<'EOF';
> <OPTION [selected free_sample Night Light Glow-In-The-Dark Condom] VALUE="Night Light Glow-In-The-Dark Condom"> Night Light Glow-In-The-Dark Condom > <OPTION [selected free_sample Global Protection Pleasure Plus Condom] VALUE="Global Protection Pleasure Plus Condom"> Global Protection Pleasure Plus Condom
>         <!-- truncated option list -->
> <OPTION [selected free_sample Glyde Latex Dam - Wild Berry] VALUE="Glyde Latex Dam - Wild Berry"> Glyde Latex Dam - Wild Berry
> EOF
>   }
>   if ($Tag->total_cost({ noformat => 1}) >= 40.00) {
>     $freeout .=<<'EOF';
> <OPTION [selected free_sample Femidom] VALUE="Femidom"> Femidom (Female Condom) > <OPTION [selected free_sample Eros Shop Condom/Lube Case] VALUE="Eros Shop Condom/Lube Case"> Eros Shop Condom/Lube Case
> EOF
>   }
>   $freeout .= <<'EOF';
> </SELECT><BR><BR><small><sup>**</sup>A selection of Free Samples is available for all orders over &#163;10.00. A Deluxe selection is<BR>available for orders over &#163;25.00 and a Super Deluxe selection for orders over &#163;40.00.</small>
> EOF
>   }
> else {
>   my $need_to_spend;
>   $need_to_spend = 10.00 - $Tag->total_cost({ noformat => 1});
>   $freeout .= "<INPUT TYPE=HIDDEN NAME=free_sample VALUE=''><BR><B>Spend ";
>   $freeout .= sprintf("&#163;%.2f", $need_to_spend);
>   $freeout .= <<'EOF';
> more to qualify for an Eros Shop Free Sample!</B><small><sup>**</sup></small> > <BR><BR><small><sup>**</sup>A selection of Free Samples is available for all orders over &#163;10.00. A Deluxe selection is<BR>available for orders over &#163;25.00 and a Super Deluxe selection for orders over &#163;40.00.</small>
> EOF
> }
>   return $freeout;
>
>
supercow.vwe.net egP8XQBC:vwe.net - [11/August/2005:09:00:28 +0000] eros /cgi-bin/eros/process.html Safe: Can't locate object method "new" via package "Vend::Parse" (perhaps you forgot to load "Vend::Parse"?) at /usr/lib/interchange/lib/Vend/Interpolate.pm line 618.
>
>
>   my $myout = '';
> if ( ($Tag->summary({ total => 1}) < 2000) && ($Tag->total_cost({ noformat => 1}) >6.99) && ($Scratch->{is_bad_shopping_cart} == 0)) {
>     $myout = <<'EOF';
>       <table align="center" cellpadding="0" cellspacing="0">
>       <tr height="10><td height="10"></td></tr>
>       <tr>
>       <td align="center">
>         [button
>                 name="mv_click"
>                 src="/eros/images/foundation/placeorder_button.gif"
>                 text="Place Order"
>                 hidetext=1
>                 form=checkout
>         ]
>                 mv_todo=submit
>         [/button]
>         <br><BR>
>         It may take a few moments to process your order.<BR>
>         Be sure to click <B>Place Order</b> once only.
>       </td>
> EOF
>   }
>   elsif ($Scratch->{is_bad_shopping_cart} > 0){
>     $myout = <<'EOF';
> <table align="center" cellpadding="0" cellspacing="0">
> <tr height="10"><TD height="10"></td><td></TD>
> <TR>
> <td><img align="left" src="/eros/images/warning_icon.gif" border="0"></td>
> <td align=center><b><font color="#993333">You must remove all Out-of-Stock items<BR>from your cart before you can checkout!</font></b></td>
> <tr height="10"><TD height="10"></td><td></TD>
> EOF
>   }
>   else {
>     $myout = <<'EOF';
> <table align="center" cellpadding="0" cellspacing="0"><tr>
> <tr height="10"><TD height="10"></td><td></TD>
> <td><img align="left" src="/eros/images/warning_icon.gif" border="0"></td>
> <td align="center"><font color="#993333"><b>Not enough items in your shopping cart!<BR>Minimum Order &#163;7.00</font></b></td>
> <tr height="10"><TD height="10"></td><td></TD>
> EOF
>   }
>   return $myout;
>
>
>


Does anyone have any ideas what these ones might be as they do all appear to be having the same kind of problem and the code is reasonably simple in each case? I've truncated large <OPTION> lists to make the code shorter :)

Incidentally, can anyone explain what the difference between HIGH and RPC modes are and why the [perl] tag behaviour is inconsistent when switching modes?

Many thanks

Mark



Eros Shop
vwe internet ltd
PO BOX 1067
SLOUGH
SL1 7YA
UK

Shop - http://www.eros-shop.co.uk
EMail - suppressed
Tel - 0870 284 3369
Fax - 0870 284 4469


_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.