[ic] ship_message/shipping cost appears to late solved

Philipp.Trost philipp.trost at dummy.de.org
Sun Jan 16 13:23:35 EST 2005

> hello all,
> i want to do something like if logged_in show [either]ship_message[or]shipping_cost[/either](code below) in my shopping cart (ord/basket.html). but if i hit the recalculate button (weight over 2000) the shipmode error message did not appear. 
> only if i reload the page second times or hit recalculate twice the ship message (dis)/appears and the shipping costs do the same. i want to see everything on the first reload /process action.
> if i do a simple [calc]   $Tag->shipping(my_shipmode); [/calc] the shipping costs are shown correct every reload /recalculation. ive no idea what i could try anymore.
> any help would be great.
> noice
> form looks like:
> [update values]
> <form ACTION="[process-target]" METHOD="POST" name="basket">
> <INPUT TYPE="hidden" NAME="mv_session_id" value="[data session id]">
> <INPUT TYPE="hidden" NAME="mv_shipmode" value="my_shipmode">
> <INPUT TYPE="hidden" NAME="mv_todo" value="refresh">
> <INPUT TYPE="text" NAME="[quantity-name]" value="[item-quantity]">
> <INPUT TYPE="submit" value="recalculate">
>    [calc]
>         if ( $Session->{logged_in} ) {
>                 return length($Session->{ship_message}) ? $Session->{ship_message} : $Tag->shipping(my_shipmode);
>         }
>     [/calc]
> my shipmode definition in shipping.asc:
> my_shipmode: Spedition
>     criteria    weight
>     min         0
>     max         2000
>     cost        500
>     min         2001
>     max         999999
>     cost        e error message

hello again,

ive solved it for users in future:
the error was that the shipping message is stored in the session at the moment the shipping is called so if i want the message on first reload ive to do something like this BEFORE the code above [shipping mode=my_shipmode hide=1] or 

hope this helps 



More information about the interchange-users mailing list