Color Swatch metafield stop working after theme change

Color Swatch metafield stop working after theme change

Raymenheng
Visitor
2 0 0

I was using the Kalles theme v 4.3.6, color swatch was working perfectly fine. Then I am trying to update the theme to v 4.3.7.1, the color swatches stop fetching from the metafields that I set up. I crawl through all of the setting, I just can't find out why. Then I switch to an older Ella theme, color was work fine before, now it stop working too! Does anyone have any idea how I can fix this? Thank you so much!

 

Old theme:

old.png

 

 

New theme

 

new.png

Replies 4 (4)

MustafA16
Tourist
64 6 7

hey @Raymenheng  if you feel comfortable then try this one to solved your problem 
https://youtu.be/vk8KUZN0hrI?si=o_mbaHYoNl_mnIH-
and if this is helpfull for you then don't forget to like and mark it solution 

Dotsquares
Shopify Partner
126 4 12

Hello @Raymenheng 
It seems the recent theme update have affected color swatches to retrieve data from metafields in a different way.
Follow these simple steps to check and resolve the issue:

Check Metafield Settings – Ensure that metafield keys and namespace are correctly set under Settings > Custom Data in Shopify since theme updates can have the risk of resetting or altering metafield relationships.


Verify Theme Code Updates – If the update changed the theme code in how it loads swatch data, look for version-to-version differences in relevant files such as product-form.liquid, variant-picker.liquid, or theme.js.

Re-save Metafields – Try re-saving the metafields or rearranging them in your product settings to refresh the connection.


Clear Cache & Test in Incognito – Some updates might not be immediately visible due to caching. Test the store in an incognito browser or clear your Shopify theme cache.

Rollback to a Previous Version – If the issue persists, consider rolling back to an earlier working version of the Kalles theme while still troubleshooting.

Dotsquares Ltd


Problem Solved? ✔ Accept and Like solution to help future merchants.


Shopify Partner Directory | Trustpilot | Portfolio

Easify-Jolie
Shopify Partner
199 7 17

Hi @Raymenheng 

If you're open to using an app, Easify Product Options makes it simple to set up color swatches without any coding. It works seamlessly across different themes, so you won’t have to worry about compatibility issues when updating or switching themes. Plus, your product options are available in the free plan, so you can try it out at no cost. Here's how it works:

  • This is the result:

EasifyJolie_0-1741938539614.png

  • This is the app setting:

EasifyJolie_1-1741938578426.png

 

Easify is a hassle-free solution, and I think you’ll love it. Reach out to Easify if you need any help with the setup! 🤗

Easify Product Options: Any product options app can help you create custom options, but Easify turns those options into sales and conversions!
Easify Inventory Sync: Automate inventory syncing for Bundles, Duplicates, and Raw Materials. Say goodbye to manual tracking headaches.
Easify Product Attachments: Enrich your store with downloadable content. Easily add PDFs and other files to product or any page.
>>> Try Apps for Free | 24/7 Live Chat Support

Raymenheng
Visitor
2 0 0

So I found the fix for it myself, it's the theme.css, I copied the the these part from 4.3.6 to 4.3.7, then it worked!

In 4.3.6 (working one)
[class*=' bg_color_'] {
font-size: 0;
--t4s-bg-color: #e5e5e5;
background-color: var(--swatch--background, var(--t4s-bg-color));
}

4.3.7

    [class*=' bg_color_'] {
        font-size: 0;
        --t4s-bg-color: #e5e5e5;
        background-color: var(--t4s-bg-color);
        background-image: var(--swatch--background);
    }