Announcement

Collapse
No announcement yet.

Subcat Thumbnails display

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • lesliekirk
    replied
    Thanks that seems to have fixed it.



    Leave a comment:


  • Matt Zimmermann
    replied
    Hi Leslie,

    I'm not sure why you are seeing this. Maybe try changing the offset in the ProductList to 0 [ https://docs.miva.com/api-functions/...ffset_category ]

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by lesliekirk View Post

    Any product I put in the second position in the administrative portal (for the category that the products are assigned to) is what displays the thumbnail. I recall having this question before but I can't find the question or answer.
    This is still a problem - is there a "fix" for it yet?

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by Matt Zimmermann View Post
    Hi Leslie,

    I'm not sure why the second product would be selected. Is it possible that the second product displayed for the subcategory is actually the first product as far as the administration portal is concerned?
    Any product I put in the second position in the administrative portal (for the category that the products are assigned to) is what displays the thumbnail. I recall having this question before but I can't find the question or answer.

    Leave a comment:


  • Matt Zimmermann
    replied
    Hi Leslie,

    I'm not sure why the second product would be selected. Is it possible that the second product displayed for the subcategory is actually the first product as far as the administration portal is concerned?

    Leave a comment:


  • lesliekirk
    replied
    Wow, two years later and I need to come back to this. It seems that the thumbnail being pulled for this display is not the first product in the category but the second (and I swear I've asked this question before). How do I get the code to pull the first product image and not the second?

    Leave a comment:


  • lesliekirk
    replied
    It would seem that this little piece of awesome sauce is NOT from Iron & Wool but is from Levels (My extreme humble apologizes for insisting that it came from Iron & Wool). It does work well in Iron & Wool so you can use it in the CTGY > Content (subcategory_listing) field:

    Code:
    <mvt:if expr="l.settings:subcats GT 0">
        <div class="row bg-white main-content-row sub-category-layout">
            <mvt:foreach iterator="sub_category" array="subcats">
                <mvt:comment><!-- Load First Product From Sub Category & It's resized Main image --></mvt:comment>
                    <mvt:if expr="ISNULL l.settings:sub_category:image AND ISNULL l.settings:category:cf:category_hide_sub_category_images">
                        <mvt:do file="g.Module_Library_DB" name="l.result" value="Runtime_ProductList_Load_Offset_Category( l.settings:sub_category:id, 1, 1, l.settings:sub_category:sub_products:next_offset, l.settings:sub_category:sub_products:list )" />
                        <mvt:assign name="l.settings:sub_category:product" value="l.settings:sub_category:sub_products:list[1]" />
                        <mvt:do file="g.Module_Library_DB" name="l.settings:sub_category:product:image_count" value="ProductImageDataList_Load_Product(l.settings:sub_category:product:id, l.settings:sub_category:product:images)" />
                        <mvt:foreach iterator="image" array="sub_category:product:images">
                            <mvt:if expr="l.settings:image:imagetype:code EQ 'main'">
                                <mvt:assign name="l.settings:sub_category:product:main_image" value="l.settings:image" />
                                <mvt:foreachstop/>
                            </mvt:if>
                        </mvt:foreach>
                        <mvt:if expr="l.settings:sub_category:product:main_image:image:id">
                            <mvt:do file="g.Module_Library_DB" name="l.result" value="GeneratedImage_FindOrInsert_Image_Dimensions( l.settings:sub_category:product:main_image:image, '300', '200', l.settings:sub_category:product:main_image:generated )" />
                        </mvt:if>
                        <mvt:if expr="l.settings:sub_category:product:main_image:generated:id">
                            <mvt:assign name="l.settings:sub_category:image" value="l.settings:sub_category:product:main_image:generated:image" />
                        </mvt:if>
                    </mvt:if>
    
                <div class="column half medium-one-third sub-category uppercase">
                    <a href="&mvt:sub_category:link;" title="&mvt:sub_category:name;">
    
                        <mvt:if expr="l.settings:sub_category:image AND ISNULL l.settings:category:cf:category_hide_sub_category_images">
                            <img src="&mvt:sub_category:image;" alt="&mvt:sub_category:name;" title="&mvt:sub_category:name;" />
    
                        </mvt:if>
    
    
                        &mvt:sub_category:name;
                    </a>
                </div>
            </mvt:foreach>
        </div><!-- end sub-category listings -->
    </mvt:if>
    Leslie

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by Matt Zimmermann View Post
    Nothing that I am aware of.
    Ticket #WVN-633-48971 - I had it working pretty well in the dev site (not so much anymore).

    Leave a comment:


  • Matt Zimmermann
    replied
    Nothing that I am aware of.

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by Matt Zimmermann View Post
    If the production and development stores are on the same engines and version, I don't see why it would not work the same.
    That's my question too. The engine and Miva version are the same. The only thing I did different was to start with Iron & Wool ReadyTheme By Miva, Inc. Version 1.5.0 (Includes 9.0006 Template Changes) instead of Iron & Wool ReadyTheme By Miva, Inc. Version 1.4.0 (Includes 9.0005 Template Changes). Was there some subtle change that killed it?

    - I have a support ticket open

    Leave a comment:


  • Matt Zimmermann
    replied
    If the production and development stores are on the same engines and version, I don't see why it would not work the same.

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by Matt Zimmermann View Post
    The loop running there will only go to the subcategory level. Without having to use additional MVT:DO function to pull the sub-subcategories and perform the image search, the old-fashioned way would probably be best. Of course, you can always assign a category tree image to the categories to use that instead.
    Would you believe, that on a dev site I'm working it seems to be pulling from a sub-sub? At least for 4 of the 6. But now that I've moved the site live it stopped working. Was it a fluke that it worked in the dev environment? I may need to have you take a peek at it.

    Leave a comment:


  • Matt Zimmermann
    replied
    Hi Leslie,
    Unfortunately, randomizing would/could be a detriment to page load speed as scanning through all products in a category, selecting a random one, and pulling its image is not a quick function. It should be possible, but we wouldn't recommend it.

    Leave a comment:


  • lesliekirk
    replied
    I am really liking this new feature. Any chance of it being able to randomize the image it pulls in? Should I take this request to the wishlist?

    Leave a comment:


  • Matt Zimmermann
    replied
    The loop running there will only go to the subcategory level. Without having to use additional MVT:DO function to pull the sub-subcategories and perform the image search, the old-fashioned way would probably be best. Of course, you can always assign a category tree image to the categories to use that instead.

    Leave a comment:

Working...
X