Top

Hide Elements on Donation Products

When you create a product to be designated for use with Donations Manager, there are often elements you don't want to show up. For example, you probably don't want the price, related products, bundles, etc. to appear.

To remove an element from the page if it's a donation product, follow these steps:

  1. From "Shopify Admin", select Online Store.

    Online Store 

  2. Select Actions.

    Select Actions 

  3. Select Edit code.

    Select Edit code 

  4. Under "Templates", select the template where you want to hide elements.

    Note: If your template contains sections, you will need to select the product-template.liquid section instead.

    select the template 

  5. Hide all price, related products, etc. (elements that shouldn't appear on a product page by wrapping them with this code:

    {% unless product.metafields.bold_donation.donation_key == 1 %}
    
    ...this is the existing code for stuff you want hidden...
    
    {% endunless %}

    wrap elements with this code 

  6. Select Save.

    select save 

That's it