_product_grid partial - CrystalCommerce Liquid Documentation for Designers

_product_grid partial

File: _product_grid.liquid

Default Liquid Template

<div id="{{ product.row_id }}" class="product_grid{% if product.preorder? %} preorder{% endif %}">

  <div class="image">
    {% if product.main_photo != false %}
      <a id="thumb_{{ product.id }}" href="{{ product.large_photo }}" class="highslide thumbnail" onclick="return hs.expand(this)"><img src="{{ product.medium_photo }}" title="Click to enlarge" /></a>
      <div class="highslide-caption product_controls" id="caption-for-thumb{{ product.id }}">
        Use arrow keys to navigate.<br />
        <a href="{{ product.buylist_aware_url }}">View Details</a>
      </div>
    {% endif %}
  </div>

  <div class="description">
    <div class="name"><a href="{{ product.buylist_aware_url }}">{{ product.name }}</a></div>
    <div class="category_name">{{ product.category.name }}</div>

    {% if product.preorder? %}
      <div class="preorder_date">Preorder now! Available on {{ product.available_on }}</div>
    {% endif %}
    {% if product.domestic_only? %}
      <div class="domestic_only">Cannot be sold internationally.</div>
    {% endif %}

    {% if product.variants.size > 0 %}
      {% for variant in product.variants %}
        <div id="variant_{{ variant.id }}" class="variant_row {% cycle product.id: 'even', 'odd' %}">
          <span class="info">{{ variant.short_info }}</span>
          <div class="price_and_qty">
            <span class="price">
              {% unless product.buylist_mode? %}
                {% if product.msrp_to_f > variant.sell_price_to_f %}<span class="msrp price">{{ product.msrp | money }}</span> {% endif %}
              {% endunless %}
              {{ variant.price | money }}
            </span>
            {% unless variant.infinite_qty? %}
              <span class="qty">x {{ variant.qty }}</span>
            {% endunless %}
          </div>
          <span class="buy_button">
            {% if site.may_add_to_cart? %}
              {% if product.preorder? %}
                {{ "Preorder Now" | link_to_add_cart_with_qty: product, variant }}
              {% else %}
                {{ "Buy" | link_to_add_cart_with_qty: product, variant }}
              {% endif %}
            {% else %}
                Login to add to your cart.
            {% endif %}
          </span>
        </div>
      {% endfor %}
    {% elsif product.buylist_mode? %}
      <div class="not_on_buylist_product variant_row even">
        <span class="info">Not on our buylist.</span>
      </div>
    {% else %}
      <div class="wishlist_product variant_row even">
        <span class="info">No conditions in stock.</span>
        <span class="price">{{ product.sell_price | money }}</span>
        <span class="wishlist_button">{{ "Add to Wishlist" | link_to_add_wishlist: product }}</span>
      </div>
    {% endif %}
  </div>
</div>

Default Mobile Liquid Template

No default file found.