Hiding Price and/or Cart Button

Posted by Michael Whitley on

For some products you may not want to display the 'Add to Cart' button.

In some cases you may not want to display the 'Price' and the 'Add to cart' button.

To choose the correct product page layout, select from the drop down menu on the right hand side from the Product page.

Further notes - changes to code

Template Changes

Product.liquid has been duplicated to:

  1. Product.liquid
  2. Product.nocartbutton.liquid
  3. Product.nopricce.liquid
In items 2 and 3 the product quantity has been hidden and the link to the 'product snippet' has been changed to the aplicable item below.  

Snippet Changes

Product.liquid has been duplicated to:

  1. Product.liquid
  2. Product.nocartbutton.liquid
  3. Product.noprice.liquid (Also no cart button)

In item 2 the follow changes have been made:

  • Line 100 - text added 'This product is only available in our Brunswick Street store.'
  • Line 103-113 - Comment tags added around the 'Add to cart wrapper' to hide it

In item 3, in addition to the item 2 changes are:

  • Line 28-37 - Comment tags added around the 'product price' to hide it

← Older Post Newer Post →



Leave a comment