Managing & Using Collections

Use Shopify collections with Nyla

Using Shopify Collections as a Source Collection within Nyla forms a key aspect of managing your site on Nyla, enabling you to: 
  1. Define the products, product order and page settings (handle, SEO) on product listing pages (PLPs) 
  2. Define a list of products to be used on your site (e.g in cross sells, upsells or elsewhere)
  3. Use source collection properties to create dynamic experiences 

This article covers: 


Managed on Nyla vs on Shopify

As is the case with Products, Nyla pulls collection data from Shopify to display on your site or use in conditional logic.
  •  On Shopify you manage: 
    • Your collections themselves, including what products are in the collection, and in what order they are in the collection
    • The product status within the collections, including whether or not they are visible to Nyla or not
  • On Nyla, you manage the pages your collections are featured on. Nyla pulls in collection data (source collection properties) that has been set in Shopify in order to use on these pages. 

Using Shopify Collections with Nyla

In order to use collections with Nyla, you need to: 

  1. Create the collection in Shopify
  2. Add the collection as a Source to your Nyla pages (either a page source, or a source: collection content item on a section)

To use Source Collections on Nyla, you should add either a collection either as a page source (if you are using the source collection on the entire page, like a PLP) or as a source collection content item within a section. You can then use collection properties 

Creating collections in Shopify

Before doing anything in Nyla, you first need to create your collection in Shopify. See how to do that here. You should add SEO title and description to the collection in Shopify as well as the handle that you would want it to show up as on your site so that those details can be referenced in your page settings when you use your collection as a page source.   

For collections to be available as a collection source in Nyla, they need to be available in the Nyla sales channel. 

 

Using Collections in Nyla

Once you have created your collection in Shopify, you can then use the collection as a source on Nyla on your site. Whilst an obvious use case is to create Collection Pages (PLPs), Collections can and are often used across in Nyla anywhere that a list of products is required. e.g Cross Sells and list of products for features like sampling in cart or upsells. 
  • If creating a collection page (PLP), we suggest to set your collection source as a page source 
  • If using elsewhere (e.g in cross sells, etc) then you would just use the source collection content item
When using collections on Nyla, Nyla will pull all the products in the collection according to the order in which they are set in Shopify by default. 

How to hide and show products in collections on Nyla

By default, Nyla will render the full list of products that are visible to Nyla that are included in the relevant collection source.
Therefore if you are not seeing a product in the collection when you expect it to be: 
  • Make sure the product is added to the collection in Shopify that corresponds with the collection source that is being used on the page
  • Make sure the product is visible to Nyla

If the product is not showing up after those two steps, it could be that the automated publishing trigger from Shopify has failed, so you should refresh the data on that collection page or force a rebuild or the site. 

If you are seeing a product show in a collection that you do not want to appear and want to remove it: 

Changing the order of items in a collection

Nyla pulls the products in the order in which they are set in Shopify. So, if you want to change the order of items in a collection, the best way is to re-order the products on Shopify itself and then publish your collection page(s) in question. 

You could use array filters to sort the products by a given property. 

Troubleshooting a 404 page from a collection link

If you are seeing a product link go to a 404 from a collection page, the following steps should help you to resolve it:
  • Check to see whether the product should be visible in the collection in the first place. If not, then follow the instructions on how to hide or remove a product from a collection page on Nyla in order to make sure it no longer appears in the collection. 
  • Check to see whether or not the destination page in Nyla has been created. If it does not have a page, then create and publish one following the steps in this article.
  • If there is an existing page in Nyla, you may need to publish your page 
  • If the page is published, then there may be an issue with the URL being linked to from the collection page. Check the URL of the page you expect to be linking to matches the link that was configured on your site