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

Dan Browning interchange-users@lists.akopia.com
Tue Jul 24 03:23:00 2001


At 01:14 AM 7/24/2001 -0500, you wrote:
>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

First, please write below the text you are quoting.

Second, I only gave you half of the solution.  :-)  Construct is initially 
set up to use mv_price as a last resort, after it has exhausted all other 
methods of finding a price.  It's in the docs somewhere, but you have to 
modify catalog.cfg a little:

PriceField      nonexistant_field
CommonAdjust    $ ;pricing:price_group,q5,q10: ;:wholesale

(The $ means mv_price, and ';' separates each successive pricing 
method).  I think the CommonAdjust docs cover it, and there are examples in 
the mailing list (like when I was asking the same question ;-) ).

Thirdly, it sounds like you've got a good place to call it with a sku, but 
I happen to call the routine using an mv_check on my "buy now" form, and 
get my $this_sku from $Values->{my_order_sku_no}, which is set in the 
ordering form on flypage and results.

HTH, HANN, (Hope that helps, have a nice noche),

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