Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

165
Vistas
Change section background based on product variant Shopify

I want to change a specific section background based on selected variant in Shopify. I tried it in many ways, right now i was using this code with metafields:

{% assign variant.metafields.custom.product_color.value = "product_color" %}
    {% case product_color %}
   {% when product_color == 'olive' %}
   .product-page--top-panel {background: #b4b999;} 
   {% when product_color == 'pink' %}
     .product-page--top-panel {background: #e4b5bd;}
{% when product_color == 'light-blue' %}
     .product-page--top-panel {background: #aabac7;}
   {% endcase %}

The solution is not working as i want it to be since the class gets overwritten by the colors. I'm not familiar with jquery or javascript that much so i couldn't fix the problem.

How can i make this work?

over 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Asistente virtual