Announcement

Collapse
No announcement yet.

Quicklist array and imagetypes

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

    Quicklist array and imagetypes

    Can someone help me with this code. For a long time, I wasn't using the default images in miva...we always used scene7 and now we are starting to use the images and image machine.

    We have legacy code that using the quick list array for the also bought section of our site

    Code:
    <mvt:item name="toolkit" param="vquick|pcount|l.all_settings:product:customfield_values:customfields:alsobought" />
        <mvt:if expr="pcount GT 0">
    <h2>Customers who bought &mvt:product:name; also bought these products</h2>
          <div>
          <mvt:foreach iterator="quicklist" array="quicklists">
           <article>
             <mvt:item name="toolkit" param="customc|temp_image|l.all_settings:quicklist:code|imageset" />
             <mvt:item name="toolkit" param="customc|temp_prid|l.all_settings:quicklist:code|prid" />
    <!--Here is the code that was displaying our image fine-->
    Code:
    <a href="/&mvta:quicklist:code;.html"><img src="//justhealthshops.scene7.com/is/image/JustHealthShops/&mvte:global:temp_image;?&wid=110&hei=110" border="0" alt="&mvta:quicklist:name;" /></a>
    Now, I want to display the image which is now in miva. We have some image types, one is called basket, so I tried this.
    Code:
    <mvt:if expr="NOT ISNULL l.settings:item:quicklist:imagetypes:basket">
    <img src="&mvt:quicklist:item:imagetypes:basket;" border="0" width="50" height="50" alt="&mvta:quicklist:name;">
    I also tried this:
    Code:
    <mvt:elseif expr="NOT ISNULL l.settings:quicklist:thumbnail">
     <img src="&mvt:quicklist:thumbnail;" border="0" width="50" height="50" alt="&mvta:quicklist:name;">
    Nothing seems to show. Any ideas?

    #2
    Re: Quicklist array and imagetypes

    I am willing to change how I do this. What is the best way to do the Customers also bought section of sites.

    Thanks!

    Comment


      #3
      Re: Quicklist array and imagetypes

      The additional images are not available in any 3rd party looks like the quicklist. You'll need to use the toolkit function customimage to pull in the image you need.
      Brennan Heyde
      VP Product
      Miva, Inc.
      [email protected]
      https://www.miva.com

      Comment


        #4
        Re: Quicklist array and imagetypes

        Ok. So I can see the code you speak of in the documentation.
        <mvt:item name="toolkit" param="customimage|big|l.all_settings:item:product _id|fullsize" />
        <mvt:if expr="g.big">
        <img src="&mvte:global:big;">
        </mvt:if>


        However, I cannot figure out how to insert the product_id of the quicklist array in this.
        This doesn't work: l.all_settings:item:quicklist:product_id|basket
        Neither do many other combinations. I suspect I need to put the quicklist product id in a variable and use that, but how?

        Alternatively, I am happy to use the default code
        <img src="&mvt:quicklist:thumbnail;" border="0" width="50" height="50">

        In order to do this, I would seem to need to do something special to have a thumbnail. I tried assigning one of my images as a thumbnail, but this also didn't work. Do I need to check "thumbnail" somewhere on the product display page?

        Comment


          #5
          Re: Quicklist array and imagetypes

          it would look like this:



          Code:
          <mvt:foreach iterator="quicklist" array="quicklists">
          
          
          	<mvt:item name="toolkit" param="customimage|big|l.all_settings:quicklist:id|fullsize" />
          	<mvt:if expr="g.big">
          	<img src="&mvte:global:big;">
          	</mvt:if>
          
          
          ....
          
          
          </mvt:foreach>
          This is assuming your image type on the image is "fullsize". You'll need to change this value to whatever image type you are trying to call in.
          Brennan Heyde
          VP Product
          Miva, Inc.
          [email protected]
          https://www.miva.com

          Comment

          Working...
          X