Skip to content

Instantly share code, notes, and snippets.

@stephenprater
Created March 17, 2015 16:47
Show Gist options
  • Save stephenprater/9c25708434f2cbffc631 to your computer and use it in GitHub Desktop.
Save stephenprater/9c25708434f2cbffc631 to your computer and use it in GitHub Desktop.
- cache_if(caching_enabled?, Keysmith.product_list_item(product, 'desktop')) do
%li.product{ class: product.grid_li_class,
itemscope: true,
itemtype: "http://schema.org/Product"}
- if product.sold_out?
%span.soldout Sold Out
- if product.show_quicklook?
%a.quicklook{ product.quicklook_link_options } Quicklook
%a{ product.grid_link_options }
- if product.is_exclusive?
%span.banner.exclusive Exclusive
- if product.is_new?
%span.banner.black.new New
%span.image{ product.image_options }
%span.description
- if Settings.display_prices_in_catalog_grid?
%span{ product.price_display_optiones }
- if product.on_sale?
%span.msrp= product.msrp.to_html
%span.price{ itemprop: "price" }= product.price.to_html
%span.manufacturer{ itemprop: "manufacturer" }= product.grid_manufacturer_name
%span.name{ itemprop: "name" }= product.name
- product.color_swatches do |color|
%span.color_warning This product is available in multiple colors.
%ul.color-swatches
%li
%a.color-swatch{
href: quicklook_product_path(style_group_product),
style: "background-color: #{ProductColorSwatch.new(color).hex_color};",
data:{
trigger: 'modal',
style: 'modal-quicklook',
content: 'modal-placeholder'}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment