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...
Announcement
Collapse
No announcement yet.
Image Paths in New Data Feed
Collapse
X
-
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>
Last edited by Brennan; 10-21-16, 08:24 AM.
-
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
-
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.
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
-
Hi, I tried this in both the header template and the top of Iterator template before the row series.
<mvt:if expr="NOT ISNULL l.settings:record:customfield:ei2">
<mvt:assign name="g.full_image_path" value="g.domain:base_url $ l.settings:record:customfield:ei2" />
<mvt:else>
<mvt:assign name="g.full_image_path" value="''" />
</mvt:if>
with: "&mvt:record:customfield:ei2;" in the Iterator template row but I'm not getting the base in the path. What did I do wrong?Last edited by mjstonez; 11-18-24, 01:44 PM.
Comment
Comment