News - CrystalCommerce Liquid Documentation for Designers

News

Added `in-stock` keyword to tagged_with block

Apr 3, 2012 Added `in-stock` keyword to tagged_with block

Added the in-stock keyword to tagged_with. If used, only products that are in stock will be shown in the tagged_with block.

{% tagged_with 'Hot Seller' do products in-stock %}
  <table border="0" class="invisible-table" width="100%">
    {% include 'product' with products %}
  </table>
{% endtagged_with %}

Checkout Custom Stylesheets

Mar 22, 2012 Checkout Custom Stylesheets

Added the current_date drop to all templates. It responds to day, month, year, day_of_week, sunday?, monday?, tuesday?, wednesday?, thursday?, friday?, and saturday?. For example, you can do:

{% if current_date.thursday? %}
It is Thursday! Come party with us!!
{% endif %}

Parse category description as liquid

Mar 14, 2012 Parse category description as liquid

The category's description (from the admin) is now rendered using the same liquid context as the page the drop was called from. This means that if the description is rendered from the category browse page, you'll have access to all the same variables and filters that the category browse page has access to.


Template Filename

Mar 12, 2012 Template Filename

Added the template_filename to return the name of the primary template being rendered (ie ‘advanced_search’ or ‘category_browse’).



Domestic Only Products

Mar 5, 2012 Domestic Only Products

The product drop now has a domestic_only? attribute. The default theme now displays a warning when the product you are looking at is domestic only.


Category breadcrumbs

Mar 4, 2012 Category breadcrumbs

The category browse and parent category templates have now been updated with links for breadcrumbs.


Credit Logs Page

Mar 2, 2012 Credit Logs Page

There is now an optional page under the customer’s account for their credit log. This page displays all the store credits they have been awarded.


Contact Us Form

Feb 21, 2012 Contact Us Form

There is now a customizable contact form. Will update when a more sensible default is in place after designers take a look at it.


Variant descriptor names and values

Feb 19, 2012 Variant descriptor names and values

You can now get the product’s variant descriptor names and the variant’s descriptor values from their Drops.

<tr>
  {% for name in product.variant_descriptor_names %}
  <th>{{ name }}</th>
  {% endfor %}
</tr>
{% for variant in product.variants %}
<tr>
  {% for value in variant.descriptor_values %}
  <td>{{ value }}</td>
  {% endfor %}
</tr>
{% endfor %}

Will render (for a product with a NM, LP and Damaged variant):

<tr>
  <th>Condition</th>
  <th>Language</th>
</tr>
<tr>
  <td>Near Mint</td>
  <td>English</td>
</tr>
<tr>
  <td>Lightly Played</td>
  <td>English</td>
</tr>
<tr>
  <td>Damaged</td>
  <td>English</td>
</tr>