In my app, spree/products/_thumbnails.html.erb has the line

<% if product.images.size > 1 || product.variant_images.size > 0 %>

with the intent that this will filter out any product with only one image,
but product.variant_images is defined to include the master variant, so any
product with one image will show the thumbnails. I'm overriding it for my
app, but is this something that should be changed in the source, or am I
reading it wrong?

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spree-user/-/vz5QCz_3ke4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Search Discussions

  • JDevine at Dec 31, 2012 at 4:45 am
    Sorry, the cut and paste screwed up the layout of the above post.

    The products/_thumbnails page seems to indicate that
    products.variant_images will include only images for variants other than
    the masters, but the relationship is defined with
    :through=>:variants_including_master. So the while the intent is that this
    will filter out any product with only one image, any product with one image
    will show the thumbnails.

    I'm overriding it for my app, but is this something that should be changed
    in the source, or am I reading it wrong?
    On Sunday, December 30, 2012 11:35:41 PM UTC-5, JDevine wrote:

    In my app, spree/products/_thumbnails.html.erb has the line

    <% if product.images.size > 1 || product.variant_images.size > 0 %>

    with the intent that this will filter out any product with only one image,
    but product.variant_images is defined to include the master variant, so any
    product with one image will show the thumbnails. I'm overriding it for my
    app, but is this something that should be changed in the source, or am I
    reading it wrong?
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/spree-user/-/P9poiDa2M4gJ.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
  • Michael Bianco at Jan 2, 2013 at 1:51 pm
    A fix for this in the products/_thumbnails partial was just pulled into
    master and 1-2-stable. It contains the code that will fix your issue:

    https://github.com/spree/spree/pull/2361

    - Mike
    On Sunday, December 30, 2012 11:35:41 PM UTC-5, JDevine wrote:

    In my app, spree/products/_thumbnails.html.erb has the line

    <% if product.images.size > 1 || product.variant_images.size > 0 %>

    with the intent that this will filter out any product with only one image,
    but product.variant_images is defined to include the master variant, so any
    product with one image will show the thumbnails. I'm overriding it for my
    app, but is this something that should be changed in the source, or am I
    reading it wrong?
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/spree-user/-/F2wKtUl3izoJ.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedDec 31, '12 at 4:35a
activeJan 2, '13 at 1:51p
posts3
users2
websitespreecommerce.com
irc#RubyOnRails

2 users in discussion

JDevine: 2 posts Michael Bianco: 1 post

People

Translate

site design / logo © 2023 Grokbase