Announcement

Collapse
No announcement yet.

Image Machine and Using Toolkit Functions to display an Image type

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

    #16
    Re: Image Machine and Using Toolkit Functions to display an Image type

    Hey Bill,

    I'm still having trouble with this, I feel like I'm using the wrong entity for the images url . . . because the frame for the image is popping up but the image for the product isn't showing. Here's the code I have so far, please tell me where I should tweak.

    The foreach for "newpoduct" is confusing me I think because I don't know what entities to place in the "img" tag, etc. and make it work with the customimagec toolkit and making those work together.

    Thanks for all of your help Bill . . . sorry I'm not understanding this . . . Please view my code below. Thanks.

    <mvt:item name="html_profile" />
    <head>
    <title>&mvt:store:name;: New Stuff</title>
    <base href="&mvt:global:basehref;" />
    <mvt:item name="head" param="css_list" />
    <mvt:item name="head" param="head_tag" />
    </head>
    <body class="newstuff">
    <div id="site-container">
    <div id="topBar"><mvt:item name="navbar" /></div>
    <header><mvt:item name="hdft" param="global_header" /></header>
    <div id="breadcrumbs"><mvt:item name="breadcrumbs" /></div>
    <div id="content-container">
    <aside><mvt:item name="category_tree" /></aside>
    <div id="main-content">
    <div id="page-header"><mvt:item name="hdft" param="header" /></div>
    <h1>New Stuff <span class="red">Bucket</span></h1>
    <mvt:item name="toolkit" param="last|pcount|30" />
    <mvt:if expr="pcount GT 0">
    <mvt:foreach iterator="newproduct" array="new">

    <mvt:item name="toolkit" param="customimagec|ipath|l.all_settings:newproduc t:code||150|150|" />
    <div class="product-item" style="width:25%">
    <div class="padding">
    <div class="product-details">

    <mvt:if expr="g.ipath AND (NOT ISNULL l.settings:toolkitadditionalimages[1]:generated:image)">

    <div class="product-thumbnail">
    <a href="&mvt:global:sessionurl;Screen=PROD&Product_C ode=&mvta:newproduct:code;&Store_Code=&mvta:store: code;" title="&mvte:newproduct:name;">
    <img src="&mvt:global:imageroot;&mvte:global:session:ca che:productimagecustomfields:productimage:imagedat a[1]:image:image;">
    </a>
    </div>
    </mvt:if>

    <div class="product-name">
    <a href="&mvt:global:sessionurl;Screen=PROD&Product_C ode=&mvta:newproduct:code;&Store_Code=&mvta:store: code;">&mvt:newproduct:name;</a></div>
    <div class="product-price">Price: <span class="bold">&mvt:newproduct:formatted_price;</span></div>

    <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :msrp">
    <mvt:item name="toolkit" param="math_subtract|difference|&mvt:category_list ing:products[1]:customfield_values:customfields:msrp;|l.all_setti ngs:product:price" />
    <mvt:item name="toolkit" param="currencyformat|formatted_savings|difference " />
    <div class="product-savings">Savings: &mvt:global:formatted_savings;&mvt:global:differen ce;</div>
    </mvt:if>

    <mvt:if expr="l.settings:product:inv_active">&mvt:product: inv_long;<br></mvt:if>

    <mvt:if expr="l.settings:product:quantity EQ 0">
    <mvt:else>
    <div class="product-quantity">Quantity in Basket:
    <span class="italic">&mvt:product:quantity;</span>
    </mvt:if>
    </div>


    </div>
    </div>
    </mvt:foreach>
    </mvt:if>

    <div id="page-footer"><mvt:item name="hdft" param="footer" /></div>
    </div>
    </div>
    <div id="bottom-wrap"></div>
    <mvt:item name="hdft" param="global_footer" />
    </div>
    </body>
    </html>

    Comment


      #17
      Re: Image Machine and Using Toolkit Functions to display an Image type

      If you look at the page source for the examples page you will see this.
      Code:
      <mvt:item name="toolkit" param="customimage|ipath|l.all_settings:key_product:id||42|42|" />
      <mvt:if expr="NOT ISNULL l.settings:toolkitadditionalimages[1]:generated:image">
      <img src="&mvt:global:imageroot;&mvte:toolkitadditionalimages[1]:generated:image;" border="1"><br>
      </mvt:if>
      Simply replace the customimage with customimagec. Then replace the key_product:id with newproduct:code. Replace the 42 with the image dimension you have your desired image set to.
      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


        #18
        Re: Image Machine and Using Toolkit Functions to display an Image type

        Hey Bill,

        The images are still not coming in . . . maybe I don't have an item or something active on the page? I'm not sure what's going on, any ideas thanks for all of your help so far . . . here's my code below:

        <mvt:item name="html_profile" />
        <head>
        <title>&mvt:store:name;: New Stuff</title>
        <base href="&mvt:global:basehref;" />
        <mvt:item name="head" param="css_list" />
        <mvt:item name="head" param="head_tag" />
        </head>
        <body class="newstuff">
        <div id="site-container">
        <div id="topBar"><mvt:item name="navbar" /></div>
        <header><mvt:item name="hdft" param="global_header" /></header>
        <div id="breadcrumbs"><mvt:item name="breadcrumbs" /></div>
        <div id="content-container">
        <aside><mvt:item name="category_tree" /></aside>
        <div id="main-content">
        <div id="page-header"><mvt:item name="hdft" param="header" /></div>
        <h1>New Stuff <span class="red">Bucket</span></h1>
        <mvt:item name="toolkit" param="last|pcount|30" />
        <mvt:if expr="pcount GT 0">
        <mvt:foreach iterator="newproduct" array="new">

        <div class="product-item" style="width:25%">
        <div class="padding">
        <div class="product-details">

        <div class="product-thumbnail">
        <a href="&mvt:global:sessionurl;Screen=PROD&Product_C ode=&mvta:newproduct:code;&Store_Code=&mvta:store: code;" title="&mvte:newproduct:name;"></a>
        <mvt:item name="toolkit" param="customimagec|ipath|l.all_settings:newproduc t:code||175|175|" />
        <mvt:if expr="NOT ISNULL l.settings:toolkitadditionalimages[1]:generated:image">
        <img src="&mvt:global:imageroot;&mvte:toolkitadditional images[1]:generated:image;" border="1">
        </mvt:if>
        </div>

        <div class="product-name">
        <a href="&mvt:global:sessionurl;Screen=PROD&Product_C ode=&mvta:newproduct:code;&Store_Code=&mvta:store: code;">&mvt:newproduct:name;</a></div>
        <div class="product-price">Price: <span class="bold">&mvt:newproduct:formatted_price;</span></div>

        <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :msrp">
        <mvt:item name="toolkit" param="math_subtract|difference|&mvt:category_list ing:products[1]:customfield_values:customfields:msrp;|l.all_setti ngs:product:price" />
        <mvt:item name="toolkit" param="currencyformat|formatted_savings|difference " />
        <div class="product-savings">Savings: &mvt:global:formatted_savings;&mvt:global:differen ce;</div>
        </mvt:if>

        <mvt:if expr="l.settings:product:inv_active">&mvt:product: inv_long;<br></mvt:if>

        <mvt:if expr="l.settings:product:quantity EQ 0">
        <mvt:else>
        <div class="product-quantity">Quantity in Basket:
        <span class="italic">&mvt:product:quantity;</span>
        </mvt:if>
        </div>


        </div>
        </div>
        </mvt:foreach>
        </mvt:if>

        <div id="page-footer"><mvt:item name="hdft" param="footer" /></div>
        </div>
        </div>
        <div id="bottom-wrap"></div>
        <mvt:item name="hdft" param="global_footer" />
        </div>
        </body>
        </html>
        Last edited by ThePen; 04-23-14, 10:40 AM.

        Comment


          #19
          Re: Image Machine and Using Toolkit Functions to display an Image type

          Hey Bill,

          I noticed after I submitted my previous post that the gap in this code

          <mvt:item name="toolkit" param="customimagec|ipath|l.all_settings:newproduc t:code||175|175|" />

          is not happening in my code editor, so the forum itself appears to be adding the gap between "newproduc t:code", so I don't think this is the issue. The images are not coming in . . . also here's the version of my toolkit module 5.2710.



          Thanks!

          Comment


            #20
            Re: Image Machine and Using Toolkit Functions to display an Image type

            View the page source and see what url (if any) is being generated. Ftp to the server and see if the 175 size even exists for the product in question.
            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


              #21
              Re: Image Machine and Using Toolkit Functions to display an Image type

              I checked the page source and the "img" tag isn't there on any of the listed products, I checked the Ftp server and the 175 size exists for all of the products I'm hoping to list with images.

              So, yes the 175 x 175 images are available and the "img" tag doesn't display at all, I'm assuming because of what's going on in the if statement?

              Comment


                #22
                Re: Image Machine and Using Toolkit Functions to display an Image type

                You'll probably need to hire someone to figure out what is going on with your code.
                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


                  #23
                  Re: Image Machine and Using Toolkit Functions to display an Image type

                  I just took 3 minutes to copy your code, eliminate a bunch of the divs so just the meat of the question is displayed and here is the page using an image of 150. http://www.emporiumplus.com/IGEN.html If you view the image by right clicking and loading in a new window you will see all of them have at least one side as 150.

                  Here is the source of the IGEN page template
                  Code:
                  <html>
                  <body>
                  <mvt:item name="toolkit" param="last|pcount|30" />
                  <mvt:if expr="pcount GT 0">
                  <mvt:foreach iterator="newproduct" array="new">
                  <hr>
                  &mvt:newproduct:name;<br>
                  <mvt:item name="toolkit" param="customimagec|ipath|l.all_settings:newproduct:code||150|150|" />
                  <mvt:if expr="NOT ISNULL l.settings:toolkitadditionalimages[1]:generated:image">
                  <img src="&mvt:global:imageroot;&mvte:toolkitadditionalimages[1]:generated:image;" border="1">
                  </mvt:if>
                  
                  </mvt:foreach>
                  </mvt:if>
                  </body>
                  </html>
                  Last edited by wcw; 04-23-14, 12:05 PM.
                  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


                    #24
                    Re: Image Machine and Using Toolkit Functions to display an Image type

                    Thanks for all of the time you took trying to help me out, I'll just have to use the old thumbnail area then to feed the images in for my custom pages . . . Thanks again : )

                    Comment


                      #25
                      Re: Image Machine and Using Toolkit Functions to display an Image type

                      Did you create a temp test page and use the code I just posted so you can see that it does work?
                      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


                        #26
                        Re: Image Machine and Using Toolkit Functions to display an Image type

                        Hey Bill,

                        I pasted in the code above and it works! I noticed some of my default images are different sizes and that's why all the images didn't appear properly, I'm going to have to comb through all of my code and rebuild it step by step and figure out what's wrong . . . . Thank you, Thank you, Thank you :).

                        At least I know now, I'm not going to be too far off on this one. : )

                        Comment


                          #27
                          Re: Image Machine and Using Toolkit Functions to display an Image type

                          Sometimes you have to break down the code to the simplest example to get it running. And then built on it from there. You are welcome.
                          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

                          Working...
                          X