WooCommerce CSS class to body when cart is filled (contains items) – Sales Boost!
Woocommerce Add Body Class Cart Has Items Products Sales Boost

More sales with your WooCommerce shop? Conversions are the problem for most online shops. If a visitor has added something to the shopping cart, up to 80% usually forget that they still have to complete and finalize the purchase. They browse or continue surfing, and even after several visits to the shop, they do not buy. We have one of many solutions and aids for your WooCommerce shop.

To ensure that the user never loses sight of the shopping cart, we make it appear green as a signal color, no matter where they are and no matter what the layout is. This can lead to up to 20-30% more conversions (sales).

Our WooCommerce Hack: If product(s) are in the shopping cart = make icon and buttons appear green with an extra body CSS class

And it's incredibly simple:

Copy the code from the PDF file and paste it into the functions.php of the child theme.
Show PDF file with code

Our CSS code for the shopping cart and checkout in the WooCommerce template „Woodmart“:

/* CHECKOUT CART BOOST */
body.cart_has_items .woodmart-shopping-cart .woodmart-cart-wrapper .woodmart-cart-subtotal span, body.cart_has_items .woodmart-shopping-cart .woodmart-cart-icon, body.cart_has_items .woodmart-shopping-cart .woodmart-cart-icon::before { color: green; }
body.cart_has_items .woodmart-shopping-cart .woodmart-cart-wrapper { border-bottom: 3px solid green; }
body.cart_has_items .woocommerce-mini-cart__buttons .button { background: green !important; }
@media screen and (max-width:960px) { body.cart_has_items .woodmart-cart-number { background: green !important; color: white !important; } }
.checkout-button, button#place_order { background: green !important; padding: 20px 28px !important; font-size: 120% !important; }



Tip: By the way, you can buy the great template for WooCommerce here:

to the WoodMart WooCommerce Template*

Please note: For other templates, the CSS code must be adjusted.

Recommendation to avoid working directly in the template and code -> WordPress Plugin Code Snippets


Florian Ibe

Fragen zu und um WordPress/WooCommerce? Jetzt anfragen:

Become more visible on Google & Social Media?

In a free strategy consultation for data-driven online marketing, we uncover your untapped potential, review any existing ad accounts if necessary, examine your SEO ranking and visibility, and determine which strategy is appropriate for your budget and which active measures will lead to more inquiries or sales.

visible-online-marketing-seo-sea-social-media-optimization-consulting-advertising-web

✅ More visibility & perception through targeted placement
✅ More visitors > prospects > customers > revenue
✅ Reach target groups scalably with SEA
✅ Act and grow sustainably with SEO
🫵 Maximum success with our hybrid strategy

💪 More than 15 years of experience across industries in over 1,000+ projects demonstrable!

Request a marketing strategy consultation now

and become sustainably visible!

High Performer Europe Agency Logo
trusted shop partner qualified expert
Google Partner
Bing Ads Microsoft MSA Partner Badge Agency Pictibe
Meta Business Partner Social Media Ads Agency Badge
Seo Top 100
Wa Advertising Agency De

E-Mail: fi@vastcob.com

Florian Ibe

Woocommerce Add Body Class Cart Has Items Products Sales Boost

The 5 best tips for WordPress
Register now and secure these valuable free tips like 968 others!
Florian
Florian
has found his calling through passion. Fundamentally honest and direct, he advises everyone from sole proprietors to founders and startups, as well as business and management levels of SMEs. As a consultant, he understands how to reduce complex relationships to their essence and develop a direct message for customers and employees with a sustainable strategy and optimization.

Comments are closed.


Probably the newest best tool & software offers with a lifetime license

Our recommendation:

Screenshot of bit.ly

Pay once for software access & enjoy it for a lifetime