Announcement

Collapse
No announcement yet.

Image Paths in New Data Feed

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

    Image Paths in New Data Feed

    Hi, In the new data feed template for product images we're not getting the full image path, only after /mm5/. I tried to hard code the base url in the feed template but then products that don't have extra images have a broken path (makes google shopping unhappy). How can we include the full path as we do in Weiland's template data feed to the main image and then the full path to the extra images when an extra image exists? Thank you...

    #2
    You can use something like this:

    Code:
    <mvt:if expr="NOT ISNULL l.settings:record:customfield:main">
        <mvt:assign name="g.full_image_path" value="g.domain:base_url $ l.settings:record:customfield:main" />
    <mvt:else>
        <mvt:assign name="g.full_image_path" value="''" />
    </mvt:if>
    Then you can use &mvt:global:full_image_path; wherever you want the full path to display
    Last edited by Brennan; 10-21-16, 08:24 AM.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Another alternative is to configure this using the Feed Rules in Google Merchant Center. Its pretty easy to set up, at least for your main image and one additional image. But while Google Shopping Feed supports multiple Additional Image Links, they don't differentiate them. They just have you use multiple Additional Image columns so trying to configure multiple Additional Image Columns doesn't seem to work in the Merchant Center Feed Rules, only the main image and one additional image.

      The above code works well for getting the full url of the main image generated by the Miva feed. It appears a separate conditional would need to be in place for each additional photo in the feed as well or is there a way to get a single conditional to work for all images?

      Which brings up the question of why isn't this configured to generate the full url out of the box considering this is a feed module? Just curious, it would make it much easier to configure, especially for multiple Additional Images and its already generating the full url for the &mvt:record:url; field.

      Comment


        #4
        Originally posted by mikel View Post

        Which brings up the question of why isn't this configured to generate the full url out of the box considering this is a feed module? Just curious, it would make it much easier to configure, especially for multiple Additional Images and its already generating the full url for the &mvt:record:url; field.
        One guess would be because some sites use a CDN network to serve resources like images...but that's just a guess.

        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment

        Working...
        X