0

I have started to create my eCommerce website and I have run into a road block. I have used a Shopify tutorial to create extra variants (excluding the variant options built in) to allow extra options (http://wiki.shopify.com/Line_Item_Properties). Shopify calls them line item properties. The problem I am running into is, this line property shows up for every product I add. Each product should have its one class of line properties.

Example:

Collection 'A' comes with choices 1, 2, and 3

Collection 'B' does not come with choices (but line property still shows on page)

Collection 'C' comes with choice 5, 6, and 7

Has anyone modified the products.liquid theme to allow such dynamics?

I have attached an image that represents my question. The image above is correct for the assigned product in the assigned collection. The image below should not have the line properties that are added in the product theme page. Is it possible to apply these line properties per product?

The red circle = error

error in red

MADPADGE
  • 113
  • 2
  • 12

1 Answers1

0

What you'll need to do is create alternate product templates for the different types of products you want to display. See the section on product template variations in the Line Item Properties article on the Shopify wiki:

It’s unlikely that every product of your shop needs to collect the same data when added to the cart. For this reason Shopify supports template variants. To access this feature, head over to the Template Editor. In the sidebar click “Add a new template”. Select your product.liquid and choose a name such as “monogram”. This adds a second copy of the product.liquid to your store called product.monogram.liquid. In this file you can add the form that you wanted. Once created you can go to your product page and you will see a new option in the sidebar where you can select which template to use for the product you are looking at. This allows you to design a series of forms for various kinds of products and associate them later to the products that need them.

Other useful links:

Steph Sharp
  • 11,462
  • 5
  • 44
  • 81