Announcement

Collapse
No announcement yet.

Read Custom Field breaking Image Machine

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

    Read Custom Field breaking Image Machine

    Has anybody seen this issue? I am properly reading in a product custom field on CTGY above my Image :

    <mvt:item name="customfields" param="Read_Product_Code( l.settings:product:code, 'numColors', l.settings:numColors )" />

    <img src="&mvte:product:imagetypes:main;" alt="&mvte:product:name;" class="img-responsive" />

    When I read the custom field above the the image, the image src does not load, resulting in a blank image. When I move the custom field below the image, the image loads just fine. I need to have some conditional logic above the img, which is why I need the custom field above the image.

    Any ideas?

    #2
    Re: Read Custom Field breaking Image Machine

    I don't see anything in your code that would cause that. The images are written to the page dynamically with JavaScript. Perhaps you have a JS error somewhere on the page?
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: Read Custom Field breaking Image Machine

      Thanks for looking brennan. There are no JS errors on the page. Here is more of code:

      <mvt:item name="customfields" param="Read_Product_Code( l.settings:product:code, 'numberOfColors', g.numberOfColors )" />
      <mvt:if expr="g.numberOfColors GT 1">
      <div class="product col-lg-3 col-md-3 col-xs-6 multicolors">
      <mvt:else>
      <div class="product col-lg-3 col-md-3 col-xs-6">
      </mvt:if>


      <div class="product-wrap">
      <div class="product-inner">
      <div class="product-image">


      <mvt:if expr="g.Category_Code EQ 'tops'">
      <a href="/Clothing/Tops/&mvt:product:code;"><img src="&mvte:product:imagetypes:main;" alt="&mvte:product:name;" class="img-responsive" /></a>
      <mvt:elseif expr="g.Category_Code EQ 'bottoms'">
      <a href="/Clothing/Bottoms/&mvt:product:code;"><img src="&mvte:product:imagetypes:main;" alt="&mvte:product:name;" class="img-responsive" /></a>
      <mvt:elseif expr="g.Category_Code EQ 'outerwear'">
      <a href="/Clothing/Outerwear/&mvt:product:code;"><img src="&mvte:product:imagetypes:main;" alt="&mvte:product:name;" class="img-responsive" /></a>
      <mvt:elseif expr="g.Category_Code EQ 'accessories'">
      <a href="/Clothing/Accessories/&mvt:product:code;"><img src="&mvte:product:imagetypes:main;" alt="&mvte:product:name;" class="img-responsive" /></a>
      </mvt:if>


      </div>


      <mvt:if expr="g.numberOfColors EQ 1">
      <p class="color-number">&mvt:global:numberOfColors; Color</p>
      <mvt:else>
      <p class="color-number">&mvt:global:numberOfColors; Colors</p>
      </mvt:if>

      http://shebeest.mivamerchant.net/clothing/bottoms

      Just strange that when I move the Read Custom Field below where the images are referenced, it works.

      Comment

      Working...
      X