Text box next to price

Topic summary

A user wants to add a text badge (“Closure Sale”) next to product prices on their Shopify store using the Symmetry theme.

Two solutions were provided:

  1. Direct theme.liquid editing - Adding CSS code above the </body> tag to display the badge, but this approach complicates future theme updates.

  2. Custom CSS/Custom Liquid approach (recommended) - Initially suggested using the “Custom CSS” setting, but this encountered validation errors due to restrictions on the content property. The working solution uses a “Custom liquid” block with embedded <style> tags:

    • Displays badge only on products actually on sale
    • Can be conditionally applied using product tags (e.g., “final-sale”)
    • Avoids theme update conflicts

Resolution: The Custom Liquid solution successfully implemented the desired badge.

Additional request: The user also asked about creating a product reviews section. Recommendation was to install a free review app (EasyReviews or TrustShop) and position the widget block through the Customizer.

The discussion concluded with a reminder to mark the correct solution for other users’ reference.

Summarized with AI on October 26. AI used: claude-sonnet-4-5-20250929.

Hi! I would love to create a text box net to the price, like the textbox on the image I’ve circeled

I’m using the symmetry theme. www.ciara-boutique.com

Looking forward hearing from you.

2 Likes

Hey @Rickyxane

Follow these Steps:

  1. Go to Online Store
  2. Edit Code
  3. Find theme.liquid file
  4. Add the following code in the bottom of the file above </ body> tag
{% if template contains 'product' %}
<style>
span.price__current::after {
    content: "Closure Sale";
    background: #28c48c !important;
    color: white !important;
    font-size: 15px;
    margin-left: 15px;
    padding: 5px 15px !important;
    bottom: 5px !important;
    position: relative;
}
.price__default {
    display: flex !important;
    flex-flow: row-reverse !important;
    gap: 0.5em !important;
    justify-content: start !important;
}
</style>
{% endif %}

RESULT

If I managed to help you then a Like would be truly appreciated.

Best,
Moeed

1 Like

Ok, here is the solution which does not require editing theme code (as it will make future theme updates problematic).

Use the following code in the “Custom CSS” setting of main product page section:

.product-form .price--on-sale .price__default:after{
  content: "Closure Sale!";
  display: inline-block;
  margin: 0 0.5rem;
  background: var(--product-label-overlay-reduction-bg);
  color: var(--header-bg-col);
  padding: 0 0.5rem;
}

This will show the badge for every variant which is actually on sale and leave others without:

The code will apply to every product which uses the same template.

If you want to apply the code only to some products, you’d need a different approach:
Create a “Custom liquid” block (or a section if there is no such block) and use code like this:

{% if product.tags contains "final-sale" %}
  <style>
    .product-form .price--on-sale .price__default:after{
      content: "Closure Sale!";
      display: inline-block;
      margin: 0 0.5rem;
      background: var(--product-label-overlay-reduction-bg);
      color: var(--header-bg-col);
      padding: 0 0.5rem;
    }
  </style>
{% endif %}

This code will show the badge only for products which has tag final-sale.
You can use a different condition.

Also, my code applies only to main product on the product page and does not affect the " Combine & save an extra 10%!" section.

Thank you!
It gives me this error, could you please have a look?

When I use the code in the custom CSS, I can’t publish the edits because it gives an error.

1 Like

Ok “Custom CSS” seems to be overly picky and does not allow content: ""; rule. Will reach out to Shopify about this.

Pity, but you can still use “Custom liquid” section approach, leave <style>...</style> part to apply to all products, like this:

<style>
.product-form .price--on-sale .price__default:after{
  content: "Closure Sale!";
  display: inline-block;
  margin: 0 0.5rem;
  background: var(--product-label-overlay-reduction-bg);
  color: var(--header-bg-col);
  padding: 0 0.5rem;
}
</style>
1 Like

That one works! Awesome.

And, could you have a look at this?


Is it possible to create a section like that?

Well, proper way is to install a Review app, some have free tier, like
EasyReviews ‑ Product Reviews or TrustShop: Product Reviews

Then position app widget block where you want it in Customizer.

Also, can you mark proper solution to not confuse other forum users?