Search code examples
phpshopifyliquidshopify-app

Update shopify cart with customized product image


I'm working on Shopify public app creation. I have customized a product image and store that image link in a meta field of that particular product.

I want to show the customized image I had created when adding the product to cart and other order product listing section without updating actual product image.

How can that possible? please help me


Solution

  • This is possible, you could modify the template so to use a URL stored in the metafield e.g.

    {% assign custom_images = product.metafields.custom_images %}
    {% assign key = 'url' %}
    
    <img src="{{ custom_images.url }}" />>