Help

Frequently asked questions and other useful tidbits.

Product

Updated on September 29th, 2009

product.id

Returns the id of a product.

product.name

Returns the name of a product.

product.permalink

Returns the permalink of a product.

product.url

Returns the URL of a product.

View <a href="{{ product.url }}">my product</a>

product.edit_url

Returns the URL to edit a product in the admin.

{% if store.logged_in %}<a href="{{ product.edit_url }}">Edit</a>{% endif %}

product.position

Returns the position of a product in your product list.

product.description

Returns the description of a product.

product.status

Returns the status of a product. “active”, “sold-out”, or “coming-soon”

product.categories

Returns all of the categories of a product.

<ul>
  {% for category in product.categories %}
  <li>{{ category | link_to }}</li>
  {% endfor %}
</ul>

product.artists

Returns all of the artists of a product. * record labels only

<ul>
  {% for artist in product.artists %}
  <li>{{ artist | link_to }}</li>
  {% endfor %}
</ul>

product.css_class

Returns the css_class of a product. “product”, “product sold”, “product soon”, or “product sale”

product.price

Returns the price of a product.

{{ product.price | money_with_sign }}

product.on_sale

Returns true of false based on whether the product is marked as on sale.

{% if product.on_sale %}
  On sale!
{% else %}
  Regular price.
{% end %}

product.tax *

Returns the tax of a product.
* DEPRECATED: now always returns 0.00

{{ product.tax | money_with_sign }}

product.has_default_option

Returns true of false based on whether the product has a default option.

{% unless product.has_default_option %}
  Please select your option
{% end %}

product.option

Returns the default option of a product.

product.options

Returns all of the options of a product whether they are sold out or not.

{% for option in product.options %}
  <p>{{ option.name }}</p>
{% endfor %}

product.options_in_stock

Returns all of the options of a product that are in stock. If you’re not using Big Cartel’s inventory tracking, then this is the same as calling product.options.

{% for option in product.options_in_stock %}
  <p>{{ option.name }}</p>
{% endfor %}

product.shipping

Returns all of the shipping areas of a product.

{% for area in product.shipping %}
  <p>{{ area | shipping_name }}</p>
{% endfor %}

product.image

Returns the default image of a product.

product.images

Returns all of the images of a product.

{% for image in product.images %}
  <img src="{{ image | product_image_url size:"thumb" }}" />
{% endfor %}

product.image_count

Returns the number of images a product has.

product.previous_product

Return the previous product in your list.

{{ product.previous_product | link_to: "< Back" }}

product.next_product

Return the next product in your list.

{{ product.next_product | link_to: "Next >" }}

products.all

Returns all of the products in your store.

{% for product in products.all %}
  <p>{{ product.name }}</p>
{% endfor %}

products.current

Returns all of the products for the current Products page.

{% for product in products.current %}
  <p>{{ product.name }}</p>
{% endfor %}

products.on_sale

Returns all of the products in your store that are marked “on sale”.

{% for product in products.on_sale %}
  <p>{{ product.name }}</p>
{% endfor %}

products.top_selling

Returns the top 5 selling products in your store

{% for product in products.top_selling %}
  <p>{{ product.name }}</p>
{% endfor %}

products.newest

Returns the 5 newest products in your store

{% for product in products.newest %}
  <p>{{ product.name }}</p>
{% endfor %}

products.permalink

Returns a specific product based on it’s permalink.

<a href="{{ products.new-cd.url }}">View our new cd</a>

Contact

Can’t find an answer to your question? No worries, we’re here to help.