- @title = @product.browser_title - @breadcrumbs = @product.breadcrumbs - params[:sku] = nil # HACK: avoid issues with current_sku - content_for :head do - cache "#{@product.cache_key}/head", expires_in: 1.hour do %meta{ property: 'recent-view', content: recent_view_content(product_id: @product.id) } %meta{ property: 'global-id', content: @product.to_global_id.to_param } = append_partials('storefront.product_head', product: @product) %link{ href: product_path(@product), rel: 'canonical' } - unless @product.meta_description.blank? %meta{ name: :description, content: strip_tags(@product.meta_description) } %meta{ property: 'og:url', content: url_for } %meta{ property: 'og:title', content: @product.name } %meta{ property: 'og:type', content: 'product' } - @product.images.each do |image| %meta{ property: 'og:image', content: product_image_url(image, :detail) } - unless @product.meta_description.blank? %meta{ property: 'og:description', content: strip_tags(@product.meta_description) } - cache "#{@product.cache_key}/show", expires_in: 1.hour do .view .product-detail-container.product-detail-container--package{ itemscope: true, itemtype: 'http://schema.org/Product', data: { analytics: product_view_analytics_data(@product).to_json } } .product-details{ class: "product-details--#{@product.template}" } = render "workarea/storefront/products/templates/#{@product.template}", product: @product .product-detail-packaged-products{ class: "product-detail-packaged-products--#{@product.template}" } - @product.packaged_products.each do |product| .product-detail-packaged-products__container{ data: { packaged_product_id: product.id } } .product-details{ class: "product-details--#{product.template}", itemprop: 'isRelatedTo', itemscope: true, itemtype: 'http://schema.org/Product', data: { analytics: product_view_analytics_data(product).to_json } } = render "workarea/storefront/products/templates/#{product.template}", product: product - if @product.recommendations.any? %h2.recommendations__heading= t('workarea.storefront.recommendations.heading') .grid{ data: { analytics: product_list_analytics_data('Product Recommendations').to_json } } - @product.recommendations.each do |product| .grid__cell.grid__cell--50.grid__cell--33-at-medium.grid__cell--16-at-wide .product-summary.product-summary--small{ itemprop: 'isRelatedTo', itemscope: true, itemtype: 'http://schema.org/Product' } = render 'workarea/storefront/products/summary', product: product %div{ data: { recommendations_placeholder: recent_views_path } } = append_partials('storefront.product_show', product: @product)