[ic] Can the price be editted in the cart??? - What Is Wrong Now?

Rage-DCA interchange-users@lists.akopia.com
Tue Jul 24 02:15:01 2001


Dan and Everyone Else,

I need to change the price of [item-price] before it is displayed in the
cart. This will need to be done by my sales reps since they modify prices on
the phone. From what I can tell, Interchange will not let me manipulate
[item-price].

I added the following to the top of the cart component file to try to change
[item-price]:

[perl]
my $price = "100.00";
my $this_sku = "os28108";
undef $cart;

my $cart = $Carts->{main};
foreach my $item (@$cart){
     if ($this_sku eq $item->{'code'}){
         $item->{'mv_price'} = $price;
     }
}
[/perl]

when i check $item->{'mv_price'} it is set to 100.00, but when i check the
sku's price, it won't change. what can i do to correct this and in what file
do i make the necessary changes?

Thanks,

Jason Osborne

-----Original Message-----
From: interchange-users-admin@developer.akopia.com
[mailto:interchange-users-admin@developer.akopia.com]On Behalf Of Dan
Browning
Sent: Monday, July 23, 2001 12:10 PM
To: interchange-users@developer.akopia.com
Subject: Re: [ic] Can the price be editted in the cart???


At 10:24 AM 7/23/2001 -0400, you wrote:
>"Jason Osborne" <jason@sohonetworks.cc> writes:
>
> > Had a quick question. I am trying to allow editing of the price in
> > the shopping cart for an Intranet e-commerce package. I went under
> > basket and setup a input text box like so:
> >
> > <INPUT TYPE=text NAME="[price-name]" VALUE="[item-price]" SIZE=7>
> >
> > Only problem is that when I either hit the recalculate or the check
> > out button, it does not carry the price over.
>
>I think this is because the [subtotal] and [price] tags go directly
>against the database and not session variables.  One way to overcome
>that is to override those tags with global subs that use session
>variables instead.  BTW, these global subs could still be catalog
>specific.

Additionally, here's an example of how to set specific prices in perl
(4.6.x) using mv_price:

my $change_sku = $CGI->{mv_order_item};
my $cart = $Carts->{main};
my $count = 0;
foreach (@$cart){
         if ($this_sku eq $cart->[$count]{code}){
                 $cart->[$count]{mv_price} = $price;
         }
         $count++;
}

HTH,

Dan Browning, Cyclone Computer Systems, danb@cyclonecomputers.com

_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users