htmlcsshideproductbigcartel

How can I hide the price of a product in Bigcartel?


I have a bigcartel site selling my products however some products I just want displayed as 'portfolio' pieces without a price (and possibly without 'sold out' or 'coming soon' etc). Is there a way to hide the price for those products? Could I categorize the products and make every product in a certain category have a different code?

I'm using the 'Luna' theme. Any help would be great.


Solution

  • Instead of having a ton of conditional statements to check against product names, you may just want to have your portfolio products added to a "Portfolio" category and only hide the price for products in that category.

    Add this to the top of Customize Design > Advanced > Product:

    {% for category in product.categories %}
      {% if category.name == 'Portfolio' %}
        {% assign hide_price = 1 %}
      {% endif %}
    {% endfor %}
    

    Next, change the line that displays the price to this:

    {% if hide_price != 1 %}<h3>{{ product.default_price | money_with_sign }}</h3>{% endif %}
    

    You could also use the same conditional statement above to hide the product status - like sold out, coming soon, etc.