Is there a way for me to ensure that the CanCombine(BasketItem) method always returns false?
I am generating custom quoted products (each product is unique). I have created some basic parent Product objects to reference with my custom BasketItems, but everytime I go to the Basket.aspx page, my unique items are lost and they are combined into one BasketItem (because they are based on the same generic product).
Any suggestions on the best method of tackling this situation?
Should I create custom Products on the fly and then associate those with the BasketItems? I like having each of my unique creations associated with a generic product, but I can't have them combined at checkout time as this doesn't make sense for my business.
Thanks,
Mike
Combining Basket Items
Re: Combining Basket Items
What aspect of your products is different? Is it some custom field value?
Re: Combining Basket Items
I have a unique situation where each product I ship will be custom built from a stock set of materials. I've written a quoting plug-in to allow me to auto quote a price for each custom build based on time and materials.
Therefore, I've created some default products that represent the materials in use. I create a new BasketItem for each build and then I associate the BasketItem with my generic Product. I give my BasketItem a custom Name, Price, Quantity, and Weight.
Hopefully there is a property or something that I can set that will allow me to disable the combining features of the basket.
Thanks!
Mike
Therefore, I've created some default products that represent the materials in use. I create a new BasketItem for each build and then I associate the BasketItem with my generic Product. I give my BasketItem a custom Name, Price, Quantity, and Weight.
Hopefully there is a property or something that I can set that will allow me to disable the combining features of the basket.
Thanks!
Mike
Re: Combining Basket Items
Just add a custom filed to the Product and make sure you have a unique value for the custom field for each unique product.
Re: Combining Basket Items
Thanks, I'll give it a shot!
Re: Combining Basket Items
I'm probably doing something wrong, but it didn't seem to work ... here is a code snippet:
ProductCustomField customField = new ProductCustomField();
customField.FieldName = part.FileName + part.Material;
customField.FieldValue = part.FileName;
BasketItem basketItem = GetBasketItem(productId);
basketItem.Product.CustomFields.Add(customField);
I created a new custom field that should always be unique, then I added the new field to the Product referenced in the basketItem. Unfortunately, AC still wants to combine the basketItems together (when the same generic product is referenced).
Any thoughts?
Thanks,
Mike
ProductCustomField customField = new ProductCustomField();
customField.FieldName = part.FileName + part.Material;
customField.FieldValue = part.FileName;
BasketItem basketItem = GetBasketItem(productId);
basketItem.Product.CustomFields.Add(customField);
I created a new custom field that should always be unique, then I added the new field to the Product referenced in the basketItem. Unfortunately, AC still wants to combine the basketItems together (when the same generic product is referenced).
Any thoughts?
Thanks,
Mike
Re: Combining Basket Items
OK, I got it to work using a similar principal ... I created a custom LineMessage for each BasketItem. I'm guessing two BasketItems must have the same (or no) LineMessage in order to be combinable.
Coolio.
Thanks,
Mike
Coolio.
Thanks,
Mike