I would probably try to use something really unique to identify the
product,
for example UPC if your product has UPC on size level or if its not,
probably Product ID + Size ID maybe Color ID its depend what kind of product
definition can make it unique. I believe in your warehouse should be a
unique identifier, in that case it will be easy to check shoping cart and if
it exists increment qty or whatever based on your requirements.

Regards,
Misha

On Fri, Jul 31, 2009 at 11:24 AM, Eric Nicholas Sweeney <
[email protected]> wrote:

>
> Thanks Dave,
>
> I still haven't figured this out... You were right about what is dumping
> and
> what is built.  Here is what I am trying to do...
>
> In my "cart" array I build two structs. 1 for options and 1 for choices.
> There can be multiple options and choices. (So, 2 options and 3 choices or
> vice versa - totally unlimited.)
>
> When you add a product to the cart it keeps the "MerchID" (Merchandise ID)
> and then builds the structs for the choices and options by looping through
> the form elements. This works fine - it adds everything as it should be.
> However...
>
> If I add TWO of the same product - I need to see if it is already in the
> cart. (Does MerchIDX already exist - if so - make the quantity 2)  However,
> it's not quite that simple, maybe they want a MerchIDx Option Large and a
> MerchIDX Option Small... If that is the case - then the quantity isn't 2 -
> it should be 2 separate items in the cart.
>
> To do this I check if the MerchID is already in the cart:
> <CFIF This.CartArray[i].MerchID EQ Arguments.MerchID>
>
> If it is, I need to see if both the options AND the choices are identitical
> - if so, I up the quantity - if not - make a new CartItem.  This is where I
> need to compare the two Structs see if they are the same and break if
> not...
> the code is close - but not quite there...
>
> ........


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4677
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to