Shopify themes, liquid, logos, and UX
Hello, is it possible in anyway to disable the property of 'default' linking in a .json template.
We are creating a phone case based webshop and through our cart flow you need to choose 'phone model' and afterwards 'case color' - to archive a fluid flow we have created a page for each iphone model (11 pages) which uses the same template, since it easier to edited them all this way - but each page have their owen product variant.
I am not able to edit the linking property so its specific for each page, since the linking default based.
Example:
On this page: https://officalorganicuniverse.myshopify.com/pages/iphone-12-pro - i need to link to our variant id's for 12 pro in green, pink, black etc.
And on this page: https://officalorganicuniverse.myshopify.com/pages/iphone-12-pro-max - i need to link to our variant id's for 12 pro max in green, pink, black etc.
Since both pages are using the same template, i cant assign a unique link.
I hope this makes sense and you guys have a solution.
As far as I know the only work around would be to create a template for each page... And then we loose the ability to change all 15 pages if we want to change the looks or anything.
Make use of page metafields. Then use that to pull the products.
You may have to update the template such that it pull data from metafield instead of from the customizer.
Sorry i am a newbie to coding. Could use please describe it mere in depth, since I am no expert in .json
Well Shopify have something called metafield which can store any extra values and can be retrieved where required. Hence we can make use of it. Generally a free app such as Metafield Guru will help you to get started on page metafield.
A metafield can be then access like this
{{ page.metafields.namespace.key }}
This value you can use in the code to render different aspect even having same template.
So suppose you want to get a product you can do something like
{{ all_products[page.metafields.namespace.key].title }}
You can access all the value of the product
page.metafields.namespace.key contains the product handle in the above example.
thaks will give it a try!
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024