最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

woocommerce offtopic - How to show loading spinner after click on add to cart button

programmeradmin1浏览0评论
Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

WooCommerce has a known delay to add a product to cart.

Based on that, the official StoreFront Theme for WooCommerce has a “spinner” after clicking on the purchase button.

However, the same doesn’t happen with ShopIsle theme:

How to activate the spinner in ShopIsle?

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

WooCommerce has a known delay to add a product to cart.

Based on that, the official StoreFront Theme for WooCommerce has a “spinner” after clicking on the purchase button.

However, the same doesn’t happen with ShopIsle theme:

How to activate the spinner in ShopIsle?

Share Improve this question asked Jun 1, 2019 at 2:40 Rogério DecRogério Dec 1993 silver badges12 bronze badges 2
  • I just downloaded shopisle to have a look and its heavily modified do you happen to have a link to the site online anywhere so I can find where the code is you would need to change ? – Ben Casey Commented Jun 1, 2019 at 2:47
  • @BenCasey, sure: sandbox.rogeriodec.br/loja – Rogério Dec Commented Jun 1, 2019 at 2:52
Add a comment  | 

1 Answer 1

Reset to default 2

When the button is clicked it is given a class of loading which doesn't appear to be handled.

You will have to find an icon in an iconfont (preferebly already loaded in your site i think its loading glyphicons) to use and add some css like below (Not tested, modify to suit)

Let me know if that helps.

button.add_to_cart_button.loading:after{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    font-family:"Glyphicons Halflings";
    content: "\e031";
    background: rgba( 255, 255, 255, 0.7 );
    text-align:center;
    line-height:34px;
}
发布评论

评论列表(0)

  1. 暂无评论