[ic] how to access the price for options in cart
Daniel Davenport
ddavenport at newagedigital.com
Fri Apr 15 09:44:43 EDT 2005
>>> tim.g at edsd.com 04/13/05 12:43 PM >>>
> Dan,
> Thanks for the response. Do you know how the checkout
> process adds to item-subtotal if a particular option is
> selected?
> For instance, if you select yes "installed" which adds $.20
> to the extended price. Where is this code located. Maybe I
> could inject code snippet to tally installed items there?
>
> Tim Good
As far as i'm aware, the cart and checkout pages recheck the price of the item each time the cart is viewed. To them, it's not "add $20 to the price"....it's more like "The current options for this item are <x>, <y>, and <z>. Give me the current price."
I did think of a way you could calculate the installation fees....
for each $item in the cart,
* get the current price ([item-subtotal] could do that). I'll call it "first price".
* save the current value of $item->{installed}
* set $item->{installed} to 0, '', or undef
* Grabbing the price at this point will give you the price without installation fees. I'll call this "second price".
* Set $item->{installed} back to its former value
* second price - first price ====> installation fee for the current item
/
More information about the interchange-users
mailing list