Announcement

Collapse
No announcement yet.

Power Search and Image Types

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

    Power Search and Image Types

    I apologize as this has been partially covered before but for the life of me I can't figure out how to accomplish this.

    Currently I am designing a brand new CSSUI store and have implemented Power Search in the store. Power Search is working correctly and returning the proper search data however it returns no images. I have tried modifying the original code to use my current imagetypes:thumbcat and I have also tried modifying the default Miva Four Across Search Layout to use the imagetype I want.

    I am about a month behind and need help with this. I have posted the code below "without" an image link below. Thanks in advance for any help with this.

    Code:
    <div class="expanded">
        <mvt:foreach iterator="product" array="search_results:products">
        <div class="product-item" style="width:50%">
            <div class="padding">
                <div class="product-details">
                    <div class="product-name">
                    <a href="&mvt:global:sessionurl;Screen=PROD&Product_Code=&mvta:product:code;&Store_Code=&mvta:store:code;&search=&mvta:global:search;&searchoffset=&mvta:global:searchoffset;&filter_cat=&mvta:global:filter_cat;&PowerSearch_Begin_Only=&mvta:global:PowerSearch_Begin_Only;&sort=&mvta:global:sort;&range_low=&mvta:global:range_low;&range_high=&mvta:global:range_high;&mvt:powersearch:field_url;">
                    &mvt:product:name;</a>
                    </div>
                    <div class="product-code">Code: <span class="bold">&mvt:product:code;</span></div>
                    <div class="product-price">Price: <span class="bold">&mvt:product:formatted_price;</span></div>
                    <mvt:if expr="l.settings:product:inv_active">
                    &mvt:product:inv_long;<br />
                    </mvt:if>
                    <div class="product-quantity">Quantity in Basket:
                        <mvt:if expr="l.settings:product:quantity EQ 0">
                        <span class="italic">none</span>
                        <mvt:else>
                        <span class="italic">&mvt:product:quantity;</span>
                        </mvt:if>
                    </div>
                </div>
                <div class="purchase-buttons">
                    <form method="post" action="&mvt:global:sessionurl;Screen=BASK">
                    <input type="hidden" name="Old_Screen" value="&mvte:global:Screen;" />
                    <input type="hidden" name="Old_Search" value="&mvte:global:Search;" />
                    <input type="hidden" name="Action" value="ADPR" />
                    <input type="hidden" name="Quantity" value="1" />
                    <input type="hidden" name="Attributes" value="Yes" />
                    <input type="hidden" name="Store_Code" value="&mvte:store:code;" />
                    <input type="hidden" name="Offset" value="&mvte:global:SearchOffset;" />
                    <input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;" />
                    <input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" />
                    <input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;" />
                    <input type="hidden" name="SearchOffset" value="&mvte:global:SearchOffset;" />
                    <input type="hidden" name="Product_Code" value="&mvte:product:code;" />
                    <input type="hidden" name="Current_Product_Code" value="&mvte:global:Product_Code;" />
                    <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;" />
                    <!-- begin additional inputs //-->
                    <input type="hidden" name="Search" value="&mvte:global:Search;" />
                    <input type="hidden" name="filter_cat" value="&mvte:global:filter_cat;" />
                    <input type="hidden" name="PowerSearch_Begin_Only" value="&mvte:global:PowerSearch_Begin_Only;" />
                    <input type="hidden" name="sort" value="&mvte:global:sort;" />
                    <input type="hidden" name="range_low" value="&mvte:global:range_low;" />
                    <input type="hidden" name="range_high" value="&mvte:global:range_high;" />
                    <mvt:foreach iterator="fields" array="powersearch_fields">
                    <input type="hidden" name="&mvte:fields;" value="1" />
                    </mvt:foreach>
                    <!-- end additional inputs //-->
                    <mvt:item name="buttons" param="AddToBasketE" />
                    </form>
                    <form method="post" action="&mvt:global:secure_sessionurl;Screen=OINF">
                    <input type="hidden" name="Old_Screen" value="&mvte:global:Screen;" />
                    <input type="hidden" name="Old_Search" value="&mvte:global:Search;" />
                    <input type="hidden" name="Action" value="ADPR" />
                    <input type="hidden" name="Offset" value="&mvte:global:SearchOffset;" />
                    <input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;" />
                    <input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" />
                    <input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;" />
                    <input type="hidden" name="SearchOffset" value="&mvte:global:SearchOffset;" />
                    <input type="hidden" name="Product_Code" value="&mvt:product:code;" />
                    <input type="hidden" name="Quantity" value="1" />
                    <input type="hidden" name="Attributes" value="Yes" />
                    <input type="hidden" name="Store_Code" value="&mvte:store:code;" />
                    <mvt:item name="buttons" param="BuyNowE" />
                    </form>
                </div>
            </div>
        </div>
        </mvt:foreach>
        <div class="clear"></div>
        <mvt:if expr="g.SearchOffset OR g.SearchNextOffset">
        <div class="next-previous">
            <mvt:if expr="g.SearchOffset GT 0">
            <div class="previous-button">
                <form method="post" action="&mvt:global:sessionurl;">
                <input type="hidden" name="Screen" value="&mvte:global:Screen;" />
                <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" />
                <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;" />
                <input type="hidden" name="Product_Code" value="&mvte:global:Product_Code;" />
                <input type="hidden" name="Search" value="&mvte:global:Search;" />
                <input type="hidden" name="Offset" value="&mvte:global:SearchPrevOffset;" />
                <input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" />
                <input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;" />
                <input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;" />
                <input type="hidden" name="SearchOffset" value="&mvte:global:SearchPrevOffset;" />
                <!-- begin additional inputs //-->
                <input type="hidden" name="filter_cat" value="&mvte:global:filter_cat;">
                <input type="hidden" name="PowerSearch_Begin_Only" value="&mvte:global:PowerSearch_Begin_Only;">
                <input type="hidden" name="sort" value="&mvte:global:sort;">
                <input type="hidden" name="range_low" value="&mvte:global:range_low;">
                <input type="hidden" name="range_high" value="&mvte:global:range_high;">
                <mvt:foreach iterator="fields" array="powersearch_fields">
                <input type="hidden" name="&mvte:fields;" value="1">
                </mvt:foreach>
                <!-- end additional inputs //-->
                <mvt:item name="buttons" param="Previous" />
                </form>
            </div>
            </mvt:if>
            <mvt:if expr="g.SearchNextOffset GT 0">
            <div class="next-button">
                <form method="post" action="&mvt:global:sessionurl;">
                <input type="hidden" name="Screen" value="&mvte:global:Screen;" />
                <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" />
                <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;" />
                <input type="hidden" name="Product_Code" value="&mvte:global:Product_Code;" />
                <input type="hidden" name="Search" value="&mvte:global:Search;" />
                <input type="hidden" name="Offset" value="&mvte:global:SearchNextOffset;" />
                <input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" />
                <input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;" />
                <input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;" />
                <input type="hidden" name="SearchOffset" value="&mvte:global:SearchNextOffset;" />
                <!-- begin additional inputs //-->
                <input type="hidden" name="filter_cat" value="&mvte:global:filter_cat;">
                <input type="hidden" name="PowerSearch_Begin_Only" value="&mvte:global:PowerSearch_Begin_Only;">
                <input type="hidden" name="sort" value="&mvte:global:sort;">
                <input type="hidden" name="range_low" value="&mvte:global:range_low;">
                <input type="hidden" name="range_high" value="&mvte:global:range_high;">
                <mvt:foreach iterator="fields" array="powersearch_fields">
                <input type="hidden" name="&mvte:fields;" value="1">
                </mvt:foreach>
                <!-- end additional inputs //-->
                <mvt:item name="buttons" param="Next" />
                </form>
            </div>
            </mvt:if>
        </div>
        </mvt:if>
    </div>
    Last edited by slabar; 07-04-13, 07:54 PM.
    Sincerely,

    Stephen M. LaBar, Jr.
    (770) 441-9447
    The Martial Arts Store

    Please Visit Our Site At:
    http://www.themartialartsstore.com

    #2
    Re: Power Search and Image Types

    There's a Q&A in the FAQ section of http://www.emporiumplus.com/v5/powrsrch.htm that discusses custom product images.
    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
    Facebook http://www.facebook.com/EmporiumPlus
    Twitter http://twitter.com/emporiumplus

    Comment


      #3
      Re: Power Search and Image Types

      Bill,

      Thanks for the fast reply. In all honesty, because I was getting extremely frustrated with not being able to get it to work, after I re-read the FAQ this morning I noticed that the error in my code was 100% my fault. I was entering 150 for my images and it should have been 125, DUH!

      I need to stop being so stubborn sometimes and take a step back.
      Sincerely,

      Stephen M. LaBar, Jr.
      (770) 441-9447
      The Martial Arts Store

      Please Visit Our Site At:
      http://www.themartialartsstore.com

      Comment


        #4
        Re: Power Search and Image Types

        Bill,

        I have one more question on image types and Power Search. I have everything working now the way I want it to except I noticed one small hiccup when it comes to images and will explain it the best I can.

        As you know you can have multiple images in the products under additional images and you can select which image you wish to display depending on the image types. All of my category display images use thumbcat image type with a 125x125 ratio. They work perfect in the standard miva setup displaying which ever image I select as thumbcat (see example 1). However in Power Search if any image other than the first image (see example #2) is set to display thumbcat then no image appears in the search results. In example two I moved the Type Selector to the first image to get an image to appear (not the image I wanted though).

        Example #1 [Doesn't Work]
        graphics/tc/tc-50-41r.png
        graphics/tc/tc-50-41r-1.png
        graphics/tc/tc-50-41p.png [thumbcat | Category Thumbnail]
        graphics/tc/tc-50-41p-1.png

        Example #1 [Works]
        graphics/tc/tc-50-80k.png [thumbcat | Category Thumbnail]
        graphics/tc/tc-50-80r.png
        graphics/tc/tc-50-80u.png
        Sincerely,

        Stephen M. LaBar, Jr.
        (770) 441-9447
        The Martial Arts Store

        Please Visit Our Site At:
        http://www.themartialartsstore.com

        Comment


          #5
          Re: Power Search and Image Types

          What is the token you used in the product display layout for the image?
          Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
          Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
          Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
          Facebook http://www.facebook.com/EmporiumPlus
          Twitter http://twitter.com/emporiumplus

          Comment


            #6
            Re: Power Search and Image Types

            Code:
            <mvt:item name="powrsrch" param="customimage|big|l.all_settings:product:id||125|125|" />
            <mvt:if expr="g.big AND (NOT ISNULL l.settings:toolkitadditionalimages[1]:generated:image)">
            <a href="&mvt:global:sessionurl;Screen=PROD&Product_Code=&mvta:product:code;&Store_Code=&mvta:store:code;&search=&mvta:global:search;&searchoffset=&mvta:global:searchoffset;&filter_cat=&mvta:global:filter_cat;&PowerSearch_Begin_Only=&mvta:global:PowerSearch_Begin_Only;&sort=&mvta:global:sort;&range_low=&mvta:global:range_low;&range_high=&mvta:global:range_high;&mvt:powersearch:field_url;">
            <img src="&mvte:toolkitadditionalimages[1]:generated:image;" alt="&mvte:product:name;">
            </a>
            </mvt:if>
            Sincerely,

            Stephen M. LaBar, Jr.
            (770) 441-9447
            The Martial Arts Store

            Please Visit Our Site At:
            http://www.themartialartsstore.com

            Comment


              #7
              Re: Power Search and Image Types

              From the FAQ examples use
              Code:
              <mvt:item name="powrsrch" param="customimage|big|l.all_settings:product:id|thumbcat" />
              <mvt:if expr="g.big">
              <img src="&mvt:global:imageroot;&mvte:global:big;">
              </mvt:if>
              You chose to use the example which shows the first image of a specific size and not related to the type. Since you want a specific type, forget the size example and use the type example.
              Last edited by wcw; 07-07-13, 11:23 AM.
              Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
              Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
              Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
              Facebook http://www.facebook.com/EmporiumPlus
              Twitter http://twitter.com/emporiumplus

              Comment


                #8
                Re: Power Search and Image Types

                Bill,

                Thanks that worked. I had to add width and height to get them resized to 125.
                Sincerely,

                Stephen M. LaBar, Jr.
                (770) 441-9447
                The Martial Arts Store

                Please Visit Our Site At:
                http://www.themartialartsstore.com

                Comment


                  #9
                  Re: Power Search and Image Types

                  Is there a way to pinpoint the thumbnail size for the image type as my image are not all the same. I didn't want to force the width and height via image attribute tag as some images may slow down the page load.

                  Comment

                  Working...
                  X