Hi all,
Checking to see if anyone can help me find a solution for what I’m after.
Currently I have liquid displaying a collection on the left and product on the right. However I would like to have Collection A on the left and Collection B on the right.
It’s currently in a grid arraignment which is working, however each time I try to duplicate the first Collection, save then go back to the Shopify visual editor to select a Collection it renders in both left and right of the grid.
The liquid code section is below:
{% liquid
assign product = all_products[section.settings.product]
assign contrast = section.settings.enable_contrast
assign full_width = section.settings.enable_full_width
assign current_variant = product.selected_or_first_available_variant
assign featured_media = product.selected_or_first_available_variant.featured_media | default: product.featured_media
assign collection = collections[section.settings.collection]
assign image_object = collection.image | default: collection.products.first.featured_media.preview_image
%}
{% schema %}
{
"name": "Collection product",
"class": "grid-section",
"settings": [
{
"type": "collection",
"id": "collection",
"label": "Collection"
},
{
"type": "text",
"id": "button",
"label": "Button text",
"default": "Shop the collection"
},
{
"type": "product",
"id": "product",
"label": "Product"
},
{
"type": "checkbox",
"id": "show_vendor",
"label": "Show vendor",
"default": false
},
{
"type": "checkbox",
"id": "show_swatches",
"label": "Show swatches",
"info": "Add swatch image files to your store's [files area](/admin/settings/files). Make sure the file names match the names of your color variants. For example, a variant called Blue would need a file called 'blue.png'",
"default": false
},
{
"type": "checkbox",
"id": "show_share_buttons",
"label": "Show social sharing buttons"
},
{
"type": "checkbox",
"id": "show_quantity_input",
"label": "Show quantity input",
"info": "If quantity inputs are hidden, quantities will default to 1.",
"default": true
},
{
"type": "checkbox",
"id": "enable_payment_button",
"label": "Show dynamic checkout button",
"info": "Lets customers check out directly using a familiar payment method. [Learn more](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)",
"default": true
},
{
"type": "header",
"content": "Style"
},
{
"id": "enable_contrast",
"type": "checkbox",
"label": "Enable contrast",
"info": "Configure Contrast section colors in Theme settings",
"default": false
},
{
"id": "enable_full_width",
"type": "checkbox",
"label": "Enable full width",
"info": "If enabled this section will span the entire width of the window",
"default": false
}
],
"presets": [
{
"name": "Featured Collection and Product",
"category": "Custom"
}
]
}
{% endschema %}
Many thanks in advance for any solutions/help.
Thanks,
Evan