[ic] Still Floundering Like a Fish Outta Water: No Shipping Costs

interchange-users@icdevgroup.org interchange-users@icdevgroup.org
Tue Jul 2 16:08:00 2002


Help.  Still lost on the shipping costs.  We encountered this problem
before, and we added the code listed on the interchange bulletin board.
That worked, and the users didn't have to enter their zip codes before
checking out.  For some odd reason, it jsut doesn't work anymore.  I know
its possible to get free shipping, WITHOUT having the customer enter his/her
zipcode first.  Does anyone have any fixes?  Has anyone else encountered
this problem?

Thanks,
BAT

-----Original Message-----
From: interchange-users-admin@icdevgroup.org
[mailto:interchange-users-admin@icdevgroup.org]On Behalf Of G Guttero
Sent: Tuesday, July 02, 2002 4:03 PM
To: interchange-users@interchange.redhat.com
Subject: [ic] Cookies-Enabled Checking Routine


>>Why is the cookies-enabled checking routine in the demo like this:
>>
>>	[calc]
>>		my $cname = $Config->{CookieName} || 'MV_SESSION_ID';
>>		$Scratch->{have_cookie} = $Tag->read_cookie($cname)
>>			and delete $Scratch->{tried};
>>		return;
>>	[/calc]
>>	[if scratch have_cookie]
>>	[elsif scratch tried]
>>     		You must have cookies set to leave the basket. Check out now or
>>forever
>>     		lose your shopping cart.
>>	[/elsif]
>>	[else]
>>		[set tried]1[/set]
>>		[bounce href="[area ord/basket]"]
>>	[/else]
>>	[/if]
>>
>>Why isn't it simple like:
>>
>>[if type=explicit compare="q{[read-cookie MV_SESSION_ID]}"]
>>[else]
>>You must have cookies set to leave the basket. Check out now or forever
>>lose your shopping cart.
>>[/else]
>>[/if]
>>
>>What is the added benefit of the top one?
>
>It is compatible with any session id cookie name, for one. Most people
>wouldn't change it, but you can name the cookie anything.
>
>In later IC versions, you could probably do:
>
>catalog.cfg:
>
>	AutoVariable  CookieName
>
>then
>
>[if type=explicit compare="q{[read-cookie __CookieName__]}"]
>[else]
>You must have cookies set to leave the basket. Check out now or >forever
>lose your shopping cart.
>[/else]
>[/if]
>
>But that requires setup changes, and the way it is works with any
>configuration.

I totally understand what you're saying there.  But why bother with the
scratch variable "tried" and the bounce?  I just want to make sure I'm not
missing something.  Why not:

[calc]
my $cname = $Config->{CookieName} || 'MV_SESSION_ID';
$Scratch->{have_cookie} = $Tag->read_cookie($cname)
and delete $Scratch->{tried};
return;
[/calc]
[if scratch have_cookie]
[else]No cookies?[/else]
[/if]

- Grant

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com

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