Shopify Pro Tip: Hide Shipping Text on Specific Product Pages (Like Gift Cards!)

Ever found yourself scratching your head, wondering why your digital gift card product page insists on displaying 'shipping calculated at checkout'? You're not alone! It's one of those little user experience quirks that can make you go, 'Wait, what?' Our amazing Shopify community recently tackled this exact issue, and I wanted to share the insights from a thread that offered a super clean solution.

A store owner, jackdubl, was in just this predicament. They had a gift card product – a purely digital item – and that pesky 'shipping' text was showing up right under the 'Add to Cart' button. Naturally, this is confusing for customers! They wanted to hide this shipping language only for their gift card page, leaving it intact for all their physical products. They were using the Eclipse theme, which is a popular choice for many.

The Community's Targeted CSS Solution

This is where Ploqo, a helpful community member, stepped in with a brilliant, targeted CSS solution. The beauty of their approach is its precision: it allows you to hide specific elements on a product page without affecting any other products. No blanket changes, just surgical precision!

Before we dive into the 'how,' let's take a quick peek at the Before and After of what jackdubl was seeing:

Before: shipping text under Add to cart

Before: The unwanted shipping text under the Add to Cart button.

After: no shipping text on the gift card

After: Clean and clear, with no confusing shipping text!

Pretty neat, right? jackdubl confirmed that this solution worked great for them, which is always fantastic to see in the community!

Your Step-by-Step Guide to Hiding Shipping Text on Specific Products

Ready to implement this on your own store? Here’s how you can do it, following Ploqo’s excellent instructions. Remember, it's always a good idea to duplicate your theme before making any code changes, just in case!

1. Find Your Product ID

The trick to targeting just one product is its unique ID. To find this:

  • Go to your Shopify Admin.
  • Navigate to Products.
  • Click on the specific product (e.g., your gift card) whose shipping text you want to hide.
  • Look at the URL in your browser's address bar. It will look something like: https://your-store-name.myshopify.com/admin/products/1234567890123/edit. The number after /products/ is your product ID. Copy this number!

2. Access Your Theme's Custom CSS

Now, let's get into the theme editor:

  1. From your Shopify Admin, go to Online Store > Themes.
  2. On your current theme, click the Customize button. (Ploqo's image shows 'Edit theme' which leads to the code editor. However, the subsequent steps point to the Customizer's Theme settings. We'll stick to 'Customize' for consistency with the Theme settings path.) Edit theme
  3. In the theme editor, click the gear icon (Theme settings) on the left sidebar.
  4. Scroll down and click Custom CSS. Theme settings and Custom CSS

3. Add the Custom CSS Code

  1. In the Custom CSS box, paste the following code. If there's already code in there, simply paste this new snippet below it:
    product-block-buy-buttons:has(input[name="product-id"][value="YOUR_PRODUCT_ID_HERE"]) .product__policies { display: none; }

    Important: Remember to replace YOUR_PRODUCT_ID_HERE with the actual product ID you copied in step 1!

    Paste the code
  2. Click Save in the top right corner. Save

A Quick Word on the Code and Theme Compatibility

Let's break down that CSS snippet for a second. The magic happens with :has(input[name="product-id"][value="YOUR_PRODUCT_ID_HERE"]). This is a modern CSS selector that basically says, 'Find the product-block-buy-buttons element, but only if it has an input field within it that matches our specific product-id.' Then, .product__policies { display: none; } tells that specific product's shipping policy text to disappear.

Ploqo specifically tested this on an Eclipse 5.3.2 store, and it worked beautifully. While this code is likely to work on many modern Shopify themes, especially those built on Dawn or similar architectures, keep in mind that theme developers sometimes use different class names. If the code doesn't work for you, a quick inspection of your product page's HTML (right-click -> Inspect Element) might reveal a slightly different class name for the shipping text element. But for most, this should be a direct hit!

Why This Customization Matters for Your Store

In the world of e-commerce, every detail contributes to the customer experience. Irrelevant information, like shipping policies on a digital product, can cause confusion, increase bounce rates, and even lead to abandoned carts. By making these small, precise adjustments, you're not just 'hiding text'; you're refining your customer journey, building trust, and ensuring a smoother, more intuitive shopping experience. It's these kinds of thoughtful touches that can really set your Shopify store apart.

This community discussion is a fantastic example of how store owners can leverage each other's expertise to solve common challenges. Don't be afraid to dive into your theme's custom CSS – with a little guidance, you can make powerful changes that directly impact your store's performance and customer satisfaction. Happy customizing!

Share:

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools