Erstgespräch

Ratgeber · Store bauen · 2 Min.

One template insteadof ever moreconditions in code

Maria Ducos · aktualisiert October 2026

kurz gesagt

/ Kurz gesagt

A group of trade customers was to see new products without a discount notice. Instead of another condition in code, they got a separate product template the client maintains themselves.

In short

A specific group of trade customers was to see new products, but on exactly those products a discount notice that stays everywhere else had to disappear. The obvious fix would have been to add yet another condition to the code. Instead, we created a separate product template. It’s cleaner, and the client has maintained it themselves ever since.

The case

A B2B merchant has customer groups with different terms. One group sees a notice about its discount on every product page. Then a new product line was added: displays for retailers. The discount didn’t apply to those, so the notice couldn’t appear there. On all other products it was to stay.

Why “just delete it” would have been wrong

Removing the notice from the code would have removed it from all products. Another condition in the code (“if product is from line X, don’t show it”) would have worked, but every new exception would have needed a developer again. After a few years, a template like that is a knot of special cases nobody understands anymore.

The fix: a separate product template

Shopify allows multiple templates for product pages. We created a “Displays” template that looks exactly like the normal one, just without the discount notice. All existing display products were assigned this template.

The real win: when a new display is added, the merchant’s team simply selects the “Displays” template in the admin. No developer, no code, no ticket.

Important: the template only controls what is displayed. Who can see which products and buy them at what price is still handled by the B2B catalogs.

Your takeaways

  • Not every special behavior needs more code. Often it just needs the right template.
  • Your team can maintain good solutions themselves. With every customization, ask: who does this next time?
  • Display and permissions are two layers. What someone sees and what someone is allowed to do belong in different places.
  • Custom templates exist for products, collections and pages. Special products, one-offs or campaign pages often don’t need a rebuild, just their own template.

Is your theme getting more complicated with every exception? We clean it up and build it so your team can maintain it themselves.

Weiterlesen · Store bauen

Maria Ducos
Maria DucosDesign & Marke
Pascal Hippmann
Pascal HippmannSales & Conversion

Erstgespräch · 20 Minuten · kostenlos

20 Minuten.
Dann weißt du's.

Du erzählst, wo dein Store steht und wohin er soll. Wir sagen, ob wir passen, und was es kostet. Ehrlich und unverbindlich.

Worum geht's?

BerlinDeutsch oder EnglischMaria oder Pascal, keine Juniors