Taming Per-Unit Pricing: A Simple Fix for Selective Display on Shopify Products
Hey there, fellow store owners! It’s your friendly Shopify expert here, diving into another fantastic discussion from the Shopify Community forums. This time, we’re tackling a super common question that often trips up even seasoned merchants: how to selectively hide per-unit pricing on certain products.
The original thread kicked off with hannahoreilly1 asking for some CSS help. She wanted to generally display per-unit pricing, which is great for transparency, but found it unnecessary for products already sold as individual units. It’s a classic scenario, right? You want consistency, but sometimes a feature just doesn’t make sense for everything you sell.
The "Aha!" Moment: The Native Shopify Fix
What’s really cool about these community discussions is how quickly simple, elegant solutions often emerge. While some initial suggestions involved sharing store passwords (which, by the way, always be cautious about when getting help online!), hannahoreilly1 actually found the answer herself and shared it back with the community: it was much simpler than she thought!
As Ecom_swift_LLC later confirmed in the thread, the unit price only appears when a product's “Unit quantity” and “Measurement unit” fields are filled in. The native, correct fix? Just clear those fields! No complex code, no CSS wizardry needed.
Step-by-Step: Hiding Per-Unit Pricing on a Single Product
If you have just a few products where you want to hide this, it's a breeze:
- Go to your Shopify admin and navigate to Products.
- Click on the specific product you want to edit.
- Scroll down to the Pricing section.
- Look for the fields labeled "Unit quantity" and "Measurement unit".
- Clear any values in these fields. Make sure they are completely empty.
- Click Save.
And just like that, the per-unit pricing will vanish from that product's page! Super simple, right?
Bulk Editing for Many Products
Now, what if you have a whole catalog of products where you need to make this change? Doing it one by one would be a nightmare! Thankfully, Ecom_swift_LLC also highlighted the power of bulk editing, which is a lifesaver for situations like this:
- From your Shopify admin, go to Products.
- Select the products you want to modify by ticking the checkboxes next to them. You can filter your products first to make selection easier.
- Click the "Bulk edit" button that appears at the bottom of the screen.
- In the bulk editor, you’ll see a spreadsheet-like view. Click on "Add columns" (usually a button near the top right of the bulk editor).
- Find and select "Unit quantity" and "Measurement unit" from the list of available columns. Click "Done".
- Now, these columns will appear in your bulk editor. Go through the rows for your selected products and clear the values in the "Unit quantity" and "Measurement unit" columns. You can often drag to apply a blank value to multiple cells.
- Once you’ve cleared all the necessary fields, click "Save".
Boom! All those products updated in one go. This is truly the most efficient and robust way to handle it for multiple items.
Why the Native Fix is Better Than CSS
This discussion also brought up an important point about how we hide information on our stores. Ecom_swift_LLC correctly pointed out that relying on CSS to simply hide the unit price isn't the best approach. While CSS can make an element invisible to the eye, it doesn't remove it from the page's source code.
Why does this matter? Well, screen readers (used by visually impaired customers) and web scrapers can still pick up that information. This can lead to confusion for your customers or unintended data being scraped from your site. By clearing the fields natively, you ensure the data simply isn't rendered on the page at all, making it a more robust and accessible solution.
When You Might Need a More Advanced Approach (Liquid & Metafields)
While the native fix is fantastic for most scenarios, Steve_TopNewYork brought up a great point for more complex situations. If you have a very specific reason to keep the unit quantity/measurement data in your product fields (perhaps for internal tracking or an app integration) but still want to conditionally hide the display, a Liquid-based solution might be necessary.
This involves adding a product tag (e.g., hide-unit-price) or a metafield to your products. Then, you'd wrap the unit price output in your theme's Liquid code with a conditional statement. This tells Shopify, "Only show the unit price if this product doesn't have the 'hide-unit-price' tag (or metafield value)."
This method offers a lot of control and keeps your product data intact, but it does require diving into your theme's code. If you go this route, you'd typically look for the relevant Liquid file (often something like price.liquid or a section within main-product.liquid, depending on your theme like Dawn or another OS 2.0 theme) and add a conditional check around the code that renders the unit price.
For most of us, though, the simpler native fix of clearing those fields is usually all that's needed. It's a testament to how often the easiest solution is right under our noses in Shopify's powerful admin.
So, if you're wrestling with per-unit pricing, remember hannahoreilly1's journey: check those "Unit quantity" and "Measurement unit" fields first. It's usually the quickest, cleanest, and most accessible way to get your product pages looking exactly how you want them. Happy selling!