What's your biggest current challenge? Have your say in Community Polls along the right column.

Cross Link Products with Metafields or Metaobjects

Solved

Cross Link Products with Metafields or Metaobjects

Incivtus
Tourist
6 0 0

Hello everyone,

We run a POD store for clothes and need some logical help. Theme is Dawn.

Currently we have all our products set up as individual products with the sizes as variants. Since we have products with the same design but different color, we have used the Kings Products Variants app to make cross linking variants. However, we then have the problem that we have two pickers for the color (from the app and from Shopify). This is not possible otherwise due to our POD provider. If I now hide the first picker “Color” via Liquid File, it no longer shows the price.

The implementation with King Product Variants is simply not good and the Liquid code is not sustainable. A better option would be in Shopify directly. For this I looked at meta fields and objects.

 

Now to my question:

How is it possible to link different products via meta fields so that they are selectable as Color Swatches. I've already tested a few different variants, but haven't found the right way

 

Many thanks in advance

Accepted Solution (1)
sahilsharma9515
Shopify Partner
1264 163 243

This is an accepted solution.

Hi Bastian, Thanks for the explanation, I got your point, that you don't want the shopify color option to show by default.

 

Please add this code so that you can hide it from customers, and once you add the code it will hide the default shopify color option from the site.

 

<style>
variant-selects>fieldset:first-child {
    display: none !important;
}
</style>

 

Please follow the steps:

  1. Login in shopify admin.
  2. Click on the Online Store.
  3. Then click on the button next to Customize in live Theme.
  4. Click Edit Code.
  5. Search theme.liquid in the code in left hand side in your theme.
  6. Add the following code in the bottom of the file above </body> tag

Result:

sahilsharma9515_0-1729247859056.png

Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!

 

Best Regards

Sahil

 

- Your

 Coffee Tip 

can create magic in coding ❤️❤️

- Need a Shopify Developer? CHAT ON WHATSAPP or EMAIL ME !


- Hopefully the solution will help you. If yes then Please hit

 Like 

and

 Mark it as solution! ❤️


View solution in original post

Replies 5 (5)

sahilsharma9515
Shopify Partner
1264 163 243

Hi @Incivtus 

Can you please provide your store URL and password as well if applicable, so that I can understand the problem you are facing on your store and provide you solution that can work for your store.

 

Best regards

Sahil

- Your

 Coffee Tip 

can create magic in coding ❤️❤️

- Need a Shopify Developer? CHAT ON WHATSAPP or EMAIL ME !


- Hopefully the solution will help you. If yes then Please hit

 Like 

and

 Mark it as solution! ❤️


Incivtus
Tourist
6 0 0

Store is available under https://invictus-streetwear.com/
Password is not needed

 

Thank you in advance

Bastian

sahilsharma9515
Shopify Partner
1264 163 243

Hi @Incivtus Thanks for the URL, I have looked into your store and found what you need, you specifically need that all the products should have their different page and url but it will show in a bunch if their variants has open, You can achieve it with Metafield, but you need to change a lot of things in your store theme files.

 

I would suggest you to keep using the App, as it is free and fulfilling your needs.

 

I didn't get your point, when you are saying you need to hide color picker, Can you please explain that, so that if there is a workaround for this I can explain you that here itself.

 

Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!

 

Best Regards

Sahil

- Your

 Coffee Tip 

can create magic in coding ❤️❤️

- Need a Shopify Developer? CHAT ON WHATSAPP or EMAIL ME !


- Hopefully the solution will help you. If yes then Please hit

 Like 

and

 Mark it as solution! ❤️


Incivtus
Tourist
6 0 0

Hello, thanks for the answer!

 

Now there are two Color pickers on the Product page: 

Incivtus_0-1729109619093.png

The first Color Picker (Button) is from Shopify, because the Product has a option named color (it needs it because our POD Provider). The Second one (Swatches) are from our App that enables cross linking very complicated. We want to change it, because there are some disadvantages. For example it is very exhausting and time eating to get this running for every new product. Furthermore it is error-prone, because you have to take some steps and when doing it 2 hours its very exhausting.  Last but not least it is confusing for the customers to have to Color Pickers.

 

So we decided to comment the first Picker out in the Liquid code. But after commenting it out, the price above wasn´t working anymore. If you choose another Size of the product, the Price disappears. 

 

So we wanted to make a whole change in the shop, to have more efficiency and simpler for us to configure it for new products.

Best Regards

Bastian

sahilsharma9515
Shopify Partner
1264 163 243

This is an accepted solution.

Hi Bastian, Thanks for the explanation, I got your point, that you don't want the shopify color option to show by default.

 

Please add this code so that you can hide it from customers, and once you add the code it will hide the default shopify color option from the site.

 

<style>
variant-selects>fieldset:first-child {
    display: none !important;
}
</style>

 

Please follow the steps:

  1. Login in shopify admin.
  2. Click on the Online Store.
  3. Then click on the button next to Customize in live Theme.
  4. Click Edit Code.
  5. Search theme.liquid in the code in left hand side in your theme.
  6. Add the following code in the bottom of the file above </body> tag

Result:

sahilsharma9515_0-1729247859056.png

Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!

 

Best Regards

Sahil

 

- Your

 Coffee Tip 

can create magic in coding ❤️❤️

- Need a Shopify Developer? CHAT ON WHATSAPP or EMAIL ME !


- Hopefully the solution will help you. If yes then Please hit

 Like 

and

 Mark it as solution! ❤️