GX-Bug #66280
geschlossenToo little feedback when adding a product to the cart from a category
0%
Der SildeOut Warenkorb im Malibu Theme wird nun angezeigt, wenn die Option "Soll nach Ablegen eines Artikels in den Warenkorb der Warenkorb angezeigt werden?" deaktiviert ist.
Beschreibung
Preconditions:
disable 'Display Cart After Adding a Product?' (Shop Settings > My Shop)
create a product which has not to be configured before being able to put it into the cart (normal product without attributes etc)
open the category with that product, switch the category view to product listing
add the product to the cart
expected result:
- there should be some strong feedback about putting products in the cart (compare the products detailed page's feedback)
actual result :
the only feedback is, that the displayed amount in the small cart increases
in my opinion this is too miniscule
Checkliste 0/0
Von Till Tepelmann vor mehr als 4 Jahren aktualisiert
I would suggest, to open the cart slide out, so the user sees that the product is in the cart and the slide out should close itself after a couple seconds (like 10 or 20 seconds)
Von Till Tepelmann vor mehr als 4 Jahren aktualisiert
I have talked to Marcus and we decided to open the slide out cart if a user put some product from the overview in the cart.
Von Till Tepelmann vor mehr als 4 Jahren aktualisiert
Possible Solution:
use the EVENT CART_DROPDOWN_OPEN, to active the slide out cart
function open_cart(e)
{
e.preventDefault();
if (!$("body").hasClass("show-cart")) {
window.scrollTo(0, 0);
$("#offcanvas-cart-overlay").css("display", "block");
setTimeout(function () {
$("body").addClass("show-cart");
}, 50);
} else {
$("body").removeClass("show-cart");
setTimeout(function () {
$("#offcanvas-cart-overlay").css("display", "none");
}, 500);
}
if(e.data.auto_close)
{
setTimeout(close_cart, 3000);
}
}
function close_cart()
{
$("body").removeClass("show-cart");
setTimeout(function () {
$("#offcanvas-cart-overlay").css("display", "none");
}, 500);
}
// Offcanvas Cart Toggle
$("[data-toggle=cart]").on("click", open_cart);
$("#offcanvas-cart-overlay").on("click", close_cart);
$('body').on("CART_DROPDOWN_OPEN",{ auto_close: true }, open_cart);