Strike through sold out sizes in dawn theme - pillar variant

Topic summary

A Dawn theme user needs help implementing strikethrough styling for sold-out size variants displayed as pills on product pages.

Current Problem:

  • Attempted to use an existing solution code
  • Code successfully strikes through sold-out sizes
  • However, it breaks functionality: customers cannot select ANY sizes, even available ones
  • Temporarily switched to dropdown menu format as a workaround

Desired Outcome:

  • Display size variants as clickable pills
  • Show sold-out sizes with strikethrough styling
  • Maintain full functionality for available sizes
  • Provided example product URL and screenshot showing the desired pill-style variant display

Status: Issue remains unresolved; seeking technical assistance to fix the code implementation.

Summarized with AI on November 18. AI used: claude-sonnet-4-5-20250929.

Hi,

I really need help with striking through sold out sizes variants on a product page. Im using dawn theme.

I added the code from this solution:

But what that did was to strik through sold out size variants (check), but it also caused that you couldn’t choose any sizes even. if the products werent sould out (and not striked through).

Right now im have changed the zise variants to be shown i a dropdown menu, but hope someone in here can help me with the size variants be shows as Pills and with sold out sizes being striked through.

Shop:https://sarth.life
Product url example: https://sarth.life/products/surface-project-square-2?variant=42685559308477

This is what I would like:

Bests,
Anne Rosa