开发者

Js / show a popup link when there is a quantity typed and product not added to cart

I want to show an alert message when there is a quantity typed and the product is NOT added to cart with Magento.

It's t开发者_高级运维o prevent the user to quit the page (with clicking in other links) witout adding the product to cart

How can I do that ?

Thanks a lot :)


The only real way to stop the user from exiting a page when they attempt to leave is to use an onunload handler, which shows one of those terrible alert boxes where you click Ok or Cancel. These are considered to be poor practice, unless you are saving the user from losing a bunch of data, and even then the helpfulness is questionable.

Good manners on the internet dictate that the user be allowed to leave your page when they see fit, without being harangued by popups or error messages. If you want to capture some of that lost traffic, consider using a timer or something related to show an overlay on the page offering the customer something for staying (a coupon code, etc etc).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜