Solved

Production options with comma in text

drock111
Shopify Partner
11 0 14

I have a product variant that I would like to set the size attribute to:

 

Size: "EFC-1 (Fits F-1, HTM-1, G-4 Fenders)"

 

but when I try to add this to the product options it breaks it up on the commas and tries to add several attributes. Is the comma character a special character not allowed in product options text? Is there a way or a trick to include commas?

Accepted Solution (1)

made4Uo
Shopify Partner
3803 713 1114

This is an accepted solution.

Hi @drock111

 

Yes, since the code detects that this is another options. If you really need comma on this. You cant write the options as follow. Replace the comma with "/"

EFC-1 (Fits F-1/ HTM-1/ G-4 Fenders)

 

Depending on your theme, you have to change the value of the variant like below. 

NOTE: You need to change the section product, the cart and the notification. 

{{ value | replace: "/", "," }}

 

This is the Shopify 2.0 FREE themes main-product.liquid

made4Uo_0-1658364530783.png

 

Volunteering to assist you!  Likes and Accept as Solution  is highly appreciated.✌
Coffee fuels my dedication. If helpful, a small Coffee Tip would be greatly appreciated.
Need EXPERIENCED Shopify developer without breaking the bank?
Hire us at Made4Uo.com for quick replies.
Stay in control and maintain your security by avoiding unnecessary store access!

View solution in original post

Replies 3 (3)

made4Uo
Shopify Partner
3803 713 1114

This is an accepted solution.

Hi @drock111

 

Yes, since the code detects that this is another options. If you really need comma on this. You cant write the options as follow. Replace the comma with "/"

EFC-1 (Fits F-1/ HTM-1/ G-4 Fenders)

 

Depending on your theme, you have to change the value of the variant like below. 

NOTE: You need to change the section product, the cart and the notification. 

{{ value | replace: "/", "," }}

 

This is the Shopify 2.0 FREE themes main-product.liquid

made4Uo_0-1658364530783.png

 

Volunteering to assist you!  Likes and Accept as Solution  is highly appreciated.✌
Coffee fuels my dedication. If helpful, a small Coffee Tip would be greatly appreciated.
Need EXPERIENCED Shopify developer without breaking the bank?
Hire us at Made4Uo.com for quick replies.
Stay in control and maintain your security by avoiding unnecessary store access!
bham123
Tourist
4 0 1

Hello, is there any update on this please? Shopify won't let me add this code anywhere (Theme - Impulse)

made4Uo
Shopify Partner
3803 713 1114

You need to open another question. The code does not apply to impact theme 

Volunteering to assist you!  Likes and Accept as Solution  is highly appreciated.✌
Coffee fuels my dedication. If helpful, a small Coffee Tip would be greatly appreciated.
Need EXPERIENCED Shopify developer without breaking the bank?
Hire us at Made4Uo.com for quick replies.
Stay in control and maintain your security by avoiding unnecessary store access!