Add To Cart Popup Persistence

Hi,

When using the default theme and someone adds an item to the cart, the "The Product Was Added To Your Cart" popup appears with the [View Cart] and [Checkout] buttons. Then, it disappears. A couple people have contacted me saying they thought something went wrong.

The question is, how can I make this popup stay up until they click a button or close it clicking the [X]?

Thanks,

Don

Hi,

When using the default theme and someone adds an item to the cart, the "The Product Was Added To Your Cart" popup appears with the [View Cart] and [Checkout] buttons. Then, it disappears. A couple people have contacted me saying they thought something went wrong.

The question is, how can I make this popup stay up until they click a button or close it clicking the [X]?

Thanks,

Don

Hello, Don!

Please, find the app/controllers/frontend/checkout.php(~85 row) and replace this code:

fn_set_notification('I', __($product_cnt > 1 ? 'products_added_to_cart' : 'product_added_to_cart'), $msg, 'I');

with this one:

fn_set_notification('I', __($product_cnt > 1 ? 'products_added_to_cart' : 'product_added_to_cart'), $msg, 'S');

Hello,

You can set notice displaying time to 0 to achieve this .

Just go to Settings->Appearance and set Notice displaying time to 0 and its done.

Excellent, I thank .both of you for taking the time to answer. I tried Ankita's solution first and it worked!

Thanks again,

Don

Yes, it is also good solution, but note that this setting affects not only adding to cart pop-up, but also another notifications both in the admin panel and storefront.

Itsnt default is continue sopping and checkout options?

Yes, it is also good solution, but note that this setting affects not only adding to cart pop-up, but also another notifications both in the admin panel and storefront.

Thanks, that's good to know. I'll watch for problems like that but another good thing about this solution is that it doesn't require special attention when upgrading CSC which I plan to do after the holidays.

Itsnt default is continue sopping and checkout options?

I"m not quite sure what you're asking, but many of my clients are quite old and not computer literate and it takes them more time to read and understand what the pop-up says. The pop-up disappears before they're done.

If you use 'K' instead of 'S' then it will disappear if the customer navigates to a new page too. The 'S' option (working from my memory which shouldn't always be trusted) makes the dialog stay persistent regardless of whether they've navigated to a new location or not.

I would not change the default setting to 0 since the accumulation of dialogs can become rather annoying.

Default is continue shopping or checkout, how do you get view cart and checkout option ?

Default is continue shopping or checkout, how do you get view cart and checkout option ?

Where your screenshot has [Continue Shopping] mine has [View Cart].

[attachment=11899:AddToCart.png]

Maybe it's because my version is 4.3.6?

AddToCart.png

If you use 'K' instead of 'S' then it will disappear if the customer navigates to a new page too. The 'S' option (working from my memory which shouldn't always be trusted) makes the dialog stay persistent regardless of whether they've navigated to a new location or not.

I would not change the default setting to 0 since the accumulation of dialogs can become rather annoying.

Thanks, that is very good to know too! I wish everything didn't need to be this complicated :neutral:

Where your screenshot has [Continue Shopping] mine has [View Cart].
AddToCart.png

Maybe it's because my version is 4.3.6?


Screenshot is from cscart demo site. Cant remember ever seing anything else then continue shopping. Maybe some setting somewere i am missing. Want same finctionality.

Personally, I've always found this dialog to be annoying. I know I added the item to the cart because I clicked the button. If I want to checkout, I can simply click the cart icon and go to checkout or the cart. But from a merchant perspective, I want them to shop as long as possible before checking out. So the dialog should really just be [continue shopping]. But I don't even think the dialog is necessary. A regular notification of "Item added to cart" would be quite sufficient and it might encourage someone to quickly add more items versus either having to read the dialog or waiting for it to timeout (or click the X).

Maybe display of that whole dialog should be optional.

Screenshot is from cscart demo site. Cant remember ever seing anything else then continue shopping. Maybe some setting somewere i am missing. Want same finctionality.

Actually, I'm using a cloned "Responsive" theme. Is that what you're using? I was curious about why ours are different.

Searching the forums, the key is apparently in this file:

designs/themes/your-theme/templates/views/checkout/components/product_notification.tpl

I found that here: http://forum.cs-cart.com/topic/32422-how-to-add-continue-shopping-in-popup-window-when-add-to-cart-product/?view=findpost&p=179451. That post doesn't exactly solve this problem but it points us in the right direction. Actually, the change described in that post seems to have been applied to your template.

The 3rd line of that file in my theme shows how the View Cart button is implemented:

capture name="buttons"}
    
{include file="buttons/button.tpl" but_text=__("view_cart") but_meta="ty-btn__secondary" but_href="checkout.cart"}
So, examine that file in your theme to see how it differs.

Personally, I've always found this dialog to be annoying. I know I added the item to the cart because I clicked the button. If I want to checkout, I can simply click the cart icon and go to checkout or the cart. But from a merchant perspective, I want them to shop as long as possible before checking out. So the dialog should really just be [continue shopping]. But I don't even think the dialog is necessary. A regular notification of "Item added to cart" would be quite sufficient and it might encourage someone to quickly add more items versus either having to read the dialog or waiting for it to timeout (or click the X).

Maybe display of that whole dialog should be optional.

Judging from my emails, many of my users aren't sophisticated enough to realize that there is a cart icon in the upper right corner. When the pop-up disappears, they think something went haywire. Ideally for me, the "Item added to cart" notification would also add a floating "View Cart (3 items)" button that stays in view no matter where they've scrolled, with a real shopping cart icon.

Thanks Oleg and Tony - that worked like a charm. Also, as Tony mentioned, using "K" is the better option here.

I have issues with the responsiveness of this feature, with certain items in our store you get a few gifts, but this fills up the mobile page in a way that the user cant do anything anymore. He needs to press back or zoom out to make it usable again. Any suggestions on how to fix this?

See screenshot:

Isn't the duration controlled by the setting for how long notifications should automatically display (zero meaning continually)?

I have issues with the responsiveness of this feature, with certain items in our store you get a few gifts, but this fills up the mobile page in a way that the user cant do anything anymore. He needs to press back or zoom out to make it usable again. Any suggestions on how to fix this?

See screenshot:

I suggest you to make some CSS changes to reduce height of elements in this notification

Ok thanks, any suggestions on which css file this is in or which template file this is?