Page 1 of 1

Forcing cart to keep individual products separated

Posted: Tue Sep 29, 2015 11:55 am
by kraus_eric
I'm new to the gold version of able and more a DBA than a developer, so bear with me on this one as a lot has changed since 7.0.3. I have a unique situation we're dealing with with a customer that requires a product to be separated out individually. This customer sells shipping labels, so I built a custom product ascx and cs for this product only. What my process does is reads the addresses, calls the fedex web service, receives possible shipping options, applies a custom modifier set by the client for the cost, then allows them to select their label. I override the product price in the basket item before it goes to the basket with that value and move it to the cart. This all works fine.

The problem I'm running into is that, despite populating custom fields in the basket and specifically telling the cart to add a new basket item rather than get existing, it's combining the same product into one product and just upping the quantity despite the custom data being different when I call the basket.items.add feature and basket.save(). Is there a way to force the basket.items.add to be overridden? If so, where? Or am I just overlooking something simple? We have paid for and have access to the source because we anticipated needing to modify the commercebuilder dll for just such an occasion.

Thanks in advance.

Re: Forcing cart to keep individual products separated

Posted: Wed Sep 30, 2015 12:58 am
by jmestep
What custom fields are you populating for the basket item? I haven't tested newer versions of Gold, but in older versions of Able, if you populate the line message field with a different value for each basket item, it won't combine them. You don't even need to make the field visible.