Happening now! Shopify Community AMA: Building a Marketing Budget with 2H Media | Ask your marketing budget questions now!

Dawn theme - product variant options/cart image to be amended desktop/mobile

Solved

Dawn theme - product variant options/cart image to be amended desktop/mobile

Ankita31
Pathfinder
148 0 25

Hi, I am wondering if someone can please help. I have 2 variant options on my products page and once you select an option, it shows that particular image but that image is also shown in the cart and on screen. Is there any way to show the main product image in the cart instead?

Ankita31_0-1724941748065.png

Ankita31_1-1724941772525.png

 

this is what I would like it to show (have used arrows - currently it shows the back of the hoop as that is what the two variants are - is there a way of having it show the main product image in the cart for this size and the larger one. 

Ankita31_2-1724941943124.png

 

Thank you in advance! 🙂

Accepted Solutions (2)
BSSCommerce-B2B
Shopify Partner
1972 564 567

This is an accepted solution.

@Ankita31,

Step 1. Go to Admin -> Online store -> Theme > Edit code

Step 2. Find the file "cart-notification-product.liquid"

BSSCommerceB2B_0-1725375289894.png

Step 3. Change the code i've marked here

BSSCommerceB2B_1-1725375320301.png

to

BSSCommerceB2B_2-1725375340683.png

This is the code, you can copy it:

src="{{ item.product.featured_image | image_url: width: 140 }}"
alt="{{ item.product.featured_image.alt | escape }}"

Result in my site: I selected the black variant, but the main product image is displayed instead

BSSCommerceB2B_3-1725375395199.png

Hope it helps 🙂

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

BSSCommerce-B2B
Shopify Partner
1972 564 567

This is an accepted solution.

@Ankita31,

1. Go to main-cart-items.liquid file

2. Search this code snippet below

BSSCommerceB2B_0-1727365152348.png

3. Change it to

 <img
                            src="{{ item.product.featured_image | image_url: width: 300}}"
                            alt="{{ item.product.featured_image.alt | escape }}"
                            class="cart-item__image"
                            loading="lazy"
                            width="150"
                            height="{{ 150 | divided_by: item.image.aspect_ratio | ceil }}"
                          >

You see it's quite the same before

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

Replies 7 (7)

DitalTek
Shopify Partner
864 103 121

@Ankita31 

- About to show main product image instead of variant image, you should be change variant image to same feature image (main product image), additionally if you want to show variant image when user choose options but on cart page you want to show main image product instead so you need customize it with code. So if you not familiar with code, you can ask help from Shopify expert,

Let me know if you have further question.

 

- You can please Like and Accepted Solution if my suggestion helpful.
- And you want to hire developer Theme or App Shopify => Feel free to send me a DM or contact to us via Email | WhatsApp
- Website: ditaltek.com

Ankita31
Pathfinder
148 0 25

@BSSCommerce-B2B Are you able to help with this please? Thanks so so much for all of your other help. Super kind of you! 🙂

BSSCommerce-B2B
Shopify Partner
1972 564 567

This is an accepted solution.

@Ankita31,

Step 1. Go to Admin -> Online store -> Theme > Edit code

Step 2. Find the file "cart-notification-product.liquid"

BSSCommerceB2B_0-1725375289894.png

Step 3. Change the code i've marked here

BSSCommerceB2B_1-1725375320301.png

to

BSSCommerceB2B_2-1725375340683.png

This is the code, you can copy it:

src="{{ item.product.featured_image | image_url: width: 140 }}"
alt="{{ item.product.featured_image.alt | escape }}"

Result in my site: I selected the black variant, but the main product image is displayed instead

BSSCommerceB2B_3-1725375395199.png

Hope it helps 🙂

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

Ankita31
Pathfinder
148 0 25

Again - you are incredible!!!!

Thank you for being the most helpful person on here and helping me with everything! So grateful! 

Ankita31
Pathfinder
148 0 25

Hey @BSSCommerce-B2B 

Are we also able to get the correct image here too (this is once you click onto the cart)

Ankita31_0-1727363820122.png

 

BSSCommerce-B2B
Shopify Partner
1972 564 567

This is an accepted solution.

@Ankita31,

1. Go to main-cart-items.liquid file

2. Search this code snippet below

BSSCommerceB2B_0-1727365152348.png

3. Change it to

 <img
                            src="{{ item.product.featured_image | image_url: width: 300}}"
                            alt="{{ item.product.featured_image.alt | escape }}"
                            class="cart-item__image"
                            loading="lazy"
                            width="150"
                            height="{{ 150 | divided_by: item.image.aspect_ratio | ceil }}"
                          >

You see it's quite the same before

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

Ankita31
Pathfinder
148 0 25

Superstar! Thank you so so much! 🙂