Sha256: 30ad1e544a224bde0e950dabbaaaa1f611b0729943f61cd28eddb82c807faf7d
Contents?: true
Size: 597 Bytes
Versions: 5
Compression:
Stored size: 597 Bytes
Contents
module Workarea decorate Storefront::ProductViewModel::ImageCollection, with: :browse_option do def primary @browse_option_primary ||= browse_option_image || super end private def browse_option_image unless @product.browses_by_option? && current_browse_option.present? return end @all.detect do |image| image.option&.optionize.in?( Array(current_browse_option).map(&:optionize) ) end end def current_browse_option @options[:option] || @options[@product.browse_option.optionize] end end end
Version data entries
5 entries across 5 versions & 1 rubygems