Page 1 of 2
Can't Add Multiple Items with Different Options
Posted: Tue Jul 22, 2014 7:02 am
by kwikstand
I am currently having problems being able to add items with different option selections to the cart. For example; two pair of pants of different sizes. If a pair of pants
http://www.contractors-solutions.net/br ... pants.aspx are added to the cart, then when the user tries adding another pair of a different size, it replaces the first ones. Only the most recent size selection remains in the cart. A customer alerted me to this problem and another one this morning is having problems. These are just the users I am aware of.
Does anybody have any idea why this problem would suddenly appear? I have made no changes to the website recently at all.
Re: Can't Add Multiple Items with Different Options
Posted: Tue Jul 22, 2014 10:01 am
by Katie
Have you tried testing this yourself? I was able to added different sizes (same color) to the cart and they registered as separate items. I also tried different colors (same size) and that worked as well. Testing with the latest version of Firefox
Re: Can't Add Multiple Items with Different Options
Posted: Tue Jul 22, 2014 10:09 am
by kwikstand
Yes, I tried in two different computers, IE, Chrome and Firefox, deleted all history and cookies. Customers are having problems too. I haven't had an order with multiple items of various sizes since 7/15, except for the one I had to place manually from the admin. because the customer couldn't do it.
Re: Can't Add Multiple Items with Different Options
Posted: Tue Jul 22, 2014 10:14 am
by Katie
What options are you selecting? It worked for me every time. Sometimes, it can be helpful to provide some screenshots showing the issue.
Re: Can't Add Multiple Items with Different Options
Posted: Tue Jul 22, 2014 10:31 am
by kwikstand
I am simply adding a pair of pants to the cart and then adding another pair of a different size. The first selection gets booted and the new selection is retained. There are no screen shots. I would need to show you a video of adding the second selection and then the cart coming up with only the last selection showing and the first one missing. I can't show a shot of the cart and then try explaining that there should be 2 selections instead of one.
Re: Can't Add Multiple Items with Different Options
Posted: Tue Jul 22, 2014 11:03 am
by Katie
In my last post, I asked "What options are you selecting?"
Here is a screenshot showing that it works for me.

This time I used IE.
Re: Can't Add Multiple Items with Different Options
Posted: Tue Jul 22, 2014 11:08 am
by kwikstand
Like I said, I was "simply adding a pair of pants to the cart and then adding another pair of a different size". So it would be the size option. I see it works for you, but for some reason it doesn't work for me in any browser or computer and customers are having problems too. They were who told me of the problem. I don't understand why this is, but it is getting frustrating.
Re: Can't Add Multiple Items with Different Options
Posted: Tue Jul 22, 2014 11:20 am
by kwikstand
OK, I see that I CAN add different COLORS and sizes, but if I try to add another pair of the same color but a different size, it will delete the previous selection of the same color
Re: Can't Add Multiple Items with Different Options
Posted: Tue Jul 22, 2014 1:13 pm
by Katie
But if I try to add another pair of the same color but a different size
I don't know what to say. You can see in my screenshot that the basket has the same color but different size.
Re: Can't Add Multiple Items with Different Options
Posted: Wed Jul 23, 2014 5:17 am
by AbleMods
kwikstand wrote:OK, I see that I CAN add different COLORS and sizes, but if I try to add another pair of the same color but a different size, it will delete the previous selection of the same color
By chance are you reaching the product page via the link in the basket AFTER you add the first pair of pants?
In other words, are you following this sequence:
Go to product page
Make choices
Add to basket
From the basket page, click product link to return to product page
Try to add second pair of pants, but it just changes existing item
The reason I ask is the product page has a "update" feature built into it now that didn't exist in Able 7.x So if you return to the product page via the basket item, Able thinks your intent is to "update" the item in your basket, not add another item.
The workaround is simply to navigate to the product via the store menus the 2nd time rather than reach the product page via the basket link. The product page will see that as a new attempt at purchase of the same item and will allow a second pair of pants.
The clue will be the Add-to-Cart button on the product page. It will either say "Add To Cart" or "Update Cart". If it says "Update Cart", it's going to edit the existing basket item.
Re: Can't Add Multiple Items with Different Options
Posted: Wed Jul 23, 2014 5:41 am
by jmestep
What Joe is explaining can be confusing to a customer in some senses. It is nice to have a product in the basket and be able to change option selections without having to delete that product from the basket and start over, especially if there are a lot of options/kits/template fields that go with it. Then again, it can be a nuisance if you want to add a new one with a different configuration. I don't know if the following code has always been in Gold and I didn't notice it before or if it is new. In R8 the BuyProductDialog.ascx.cs has the following code and it looks like you can configure whether you want to add a new item or update the existing one. I don't think it was in older versions of Gold because I remember having to hack around the update feature.
Code: Select all
protected BasketItem GetBasketItem(bool alwaysCreateNew = false)
{
...
Then in later lines of code, it applies the logic of whether to create a new item or not.
Re: Can't Add Multiple Items with Different Options
Posted: Wed Jul 23, 2014 6:12 am
by abradley
The reason I ask is the product page has a "update" feature built into it now that didn't exist in Able 7.x So if you return to the product page via the basket item, Able thinks your intent is to "update" the item in your basket, not add another item.
The workaround is simply to navigate to the product via the store menus the 2nd time rather than reach the product page via the basket link. The product page will see that as a new attempt at purchase of the same item and will allow a second pair of pants.
The clue will be the Add-to-Cart button on the product page. It will either say "Add To Cart" or "Update Cart". If it says "Update Cart", it's going to edit the existing basket item.
May I suggest that maybe we should remove this "feature." Customers in general are stupid and anything that is not intuitive impedes sales. I suggest that you can only update the cart from the cart page. "Update Cart" would slip through the cracks for a lot of users so I vote lets make the product page always Add to Cart instead of Update.
Re: Can't Add Multiple Items with Different Options
Posted: Wed Jul 23, 2014 6:51 am
by Katie
It is nice to have a product in the basket and be able to change option selections without having to delete that product from the basket and start over, especially if there are a lot of options/kits/template fields that go with it
This is why the feature was added. If you use the product link to navigate back to the product page, then the button changes from '+Add to Cart' to 'Update Cart'. If you use the Keep shopping button, then you can add the same product with different options.
Any suggestions on how we can improve the UI without removing the feature? Perhaps we can add a pop-up that requires the customer to confirm the change, and if they did not really want to update, by clicking cancel, it would bring them back to the product page so they could add the same product with different options.
If you want a quick work-around for now, then simply remove the link from the baskets.
Re: Can't Add Multiple Items with Different Options
Posted: Wed Jul 23, 2014 8:50 am
by jmestep
Katie, I know the feature was in Able 5 Ablenet version and we had customers upgrading to Able 7 who were not happy because it was not in Able 7.
What about leaving the update button visible, but show the add to cart also? Maybe with a small explanation or additional words on the button. Like "Update Basket Item" and "Add a new item"?
That way if a customer wants to select a different configuration for a second product, they could do that and still leave the original one in the basket. If they just want to change something like quantity on the product page, they could use the update button.
I just looked at an apparel product on Amazon and if you add a dress of a particular size to the cart then click the basket item to go back to the product page, it pre-selects to the options of the one in the basket, just like Able does and you could select a different size. On the cart page, it does have a message that the quantity has been updated if that is the case. I also saw a message that showed the following info.
2014-07-23_12-35-20.jpg
Re: Can't Add Multiple Items with Different Options
Posted: Wed Jul 23, 2014 3:20 pm
by Katie
Judy,
I like the idea of another button on the product page. That way, the customer has to make a conscious choice about whether he/she is adding a new item or updating an existing one.
Anyone else have comments or thoughts about this feature??
Re: Can't Add Multiple Items with Different Options
Posted: Thu Jul 24, 2014 4:09 am
by AbleMods
Maybe another button is the way to go. But I think the whole update-versus-add feature creates more confusion than it resolves.
Re: Can't Add Multiple Items with Different Options
Posted: Thu Jul 24, 2014 7:45 am
by rmaweb
I like the extra button idea. I don't think it will get too crowded having "Add to Cart" "Update Basket Item" "Add to Wishlist".
This way your right, they will have to consciously select the button they want as opposed to thinking that they will be adding a new item when in fact they are updating an existing item.
Re: Can't Add Multiple Items with Different Options
Posted: Thu Jul 24, 2014 8:20 am
by Katie
I tracked this feature request back to Gold R3. It's somewhat interesting...
The first request was to have a feature where the merchant could create a link that had the pre-configured options in the URL. So, for example, I want to email a customer a link to a product that had all the options and/or kit configurations pre-selected. This was requested by a long time customer and active forum user (but I won't say who). It's actually a feature that makes sense. So, when we were making the changes for this issue, it sort of morphed into a new feature where the customer would have the ability to edit the basket which is the actual problem we are discussing here. That feature was added in R4, and was something we had back in the earliest version of AC. So, as far as I know, we haven't had any complaints until now, but that doesn't mean customer's aren't confused by the update -vs- add buttons. If we add the extra button, it will be a very easy solution and I can sneak it into this next release. I will also try to get the code change and post it here.
Re: Can't Add Multiple Items with Different Options
Posted: Thu Jul 24, 2014 11:26 am
by abradley
I like the second button as well! This way at least the user will realize that there is a choice to make.
Because they might not understand why there are two buttons, I also like the idea of adding a little notice to the product page explaining these choices similar to Amazon's notice. Of course this notice will only show on the product page when navigated to from the cart.
Re: Can't Add Multiple Items with Different Options
Posted: Sat Jul 26, 2014 2:35 am
by nadeem
To enable second button i.e. Add to Cart button, you people need to do the following updates in Website/Conlib/BuyProductDialog.ascx.cs:
Locate the following line of code inside AddToBasketButton_Click event
Code: Select all
BasketItem basketItem = GetBasketItem();
and replace with:
Code: Select all
var existingItem = GetExistingBasketItem();
bool alwaysCreateNew = false;
if (existingItem != null)
{
string optionList = ProductVariantDataSource.GetOptionList(_ProductId, _SelectedOptionChoices, false);
string existingOptions = existingItem.OptionList;
string existingKits = existingItem.KitList;
if (!string.IsNullOrEmpty(existingOptions) || !string.IsNullOrEmpty(existingKits))
{
alwaysCreateNew = optionList != existingOptions || AlwaysConvert.ToList(",", _SelectedKitProducts) != existingKits;
}
else
{
alwaysCreateNew = true;
}
}
BasketItem basketItem = GetBasketItem(alwaysCreateNew);
Similarly, locate the following code inside Page_PreRender method
Code: Select all
// check if we need to initialize dialog from existing item
if (existingItem != null)
{
AddToBasketButton.Visible = false;
UpdateBasketButton.Visible = true;
Quantity.Text = existingItem.Quantity.ToString();
if (_Product.UseVariablePrice && !_Product.IsSubscription) VariablePrice.Text = existingItem.Price.ToString("F2");
}
and replace with:
Code: Select all
// check if we need to initialize dialog from existing item
if (existingItem != null)
{
UpdateBasketButton.Visible = true;
Quantity.Text = existingItem.Quantity.ToString();
if (_Product.UseVariablePrice && !_Product.IsSubscription) VariablePrice.Text = existingItem.Price.ToString("F2");
}
Re: Can't Add Multiple Items with Different Options
Posted: Fri Aug 01, 2014 4:28 am
by CGrouse
This fix did not work for me. Would really appreciate an alternative to the edit cart button. We don't even use options because we're afraid it will confuse our customers too much.
Re: Can't Add Multiple Items with Different Options
Posted: Fri Aug 01, 2014 8:55 am
by Katie
There isn't an edit cart button. It's a link on each product in the basket which you are welcome to remove.
Re: Can't Add Multiple Items with Different Options
Posted: Mon Aug 04, 2014 3:28 am
by CGrouse
I guess we're not referring to the same thing then, because I'm referring to the fact that after an item with options is added, when you return to the product page, you only have the option to edit what is in the cart. There is no add to cart button for adding new variants of the product.
Re: Can't Add Multiple Items with Different Options
Posted: Mon Aug 04, 2014 4:05 am
by jmestep
Nadeem's code did work for me (R8). I put a tee shirt into the cart with size and gender options, then clicked on the product in the cart and when I was directed to the product page, both the update and add to cart buttons were showing, instead of just the update button. I selected different options and was able to add the tee shirt with those options to the cart.
Re: Can't Add Multiple Items with Different Options
Posted: Tue Aug 05, 2014 6:56 am
by AbleMods
The code provided by Nadeem will not work in older Gold installs. For Gold R5, you must make the following additional changes.
In your BuyProductDialog.ascx.cs file, locate:
Code: Select all
protected BasketItem GetBasketItem()
and change it to:
Code: Select all
protected BasketItem GetBasketItem(bool alwaysCreateNew = false)
further down in the GetBasketItem method, locate this code:
Code: Select all
//CREATE THE BASKET ITEM WITH GIVEN OPTIONS
Basket basket = AbleContext.Current.User.Basket;
BasketItem basketItem = GetExistingBasketItem();
And replace it with this code:
Code: Select all
//CREATE THE BASKET ITEM WITH GIVEN OPTIONS
BasketItem basketItem = null;
Basket basket = AbleContext.Current.User.Basket;
if (!alwaysCreateNew)
{
basketItem = GetExistingBasketItem();
}
Now the GetBasketItem method accepts and processes the optional flag for AlwaysCreateNew. Enjoy !
