24/7 Support: 800.608.6482


Try our new AI assistant by clicking the chat icon in the lower right corner.


Videos | Template Based Feeds 2

In part 2 of this Template Based Feed series, we take a look at tailoring what information the feed outputs by editing the feed's template settings and code.
ver.9.6 and later

Video Transcript

In the previous video, we walked through the steps of setting up a feed in your Miva Merchant store. In this video we're going to take a look at configuring that feed’s template code to customize what the feed outputs. Let's go back into the Store Admin and then edit the feed by double-clicking on it, scroll down and then click on the “Edit Template” link. This will take you to a page template that was automatically created when we created the feed. Notice that we’re in an “Edit Page” screen for TEMPLATEFEED_ store-prods. In the template field there is the Template Feed Mivascript item already added and the controls for which, can be found down below in the Template-Based Feed Section. You can see it's already sent to Product Mode and by default it's working with all active products, but you can change that if you want the to feed to run, for instance, for all products in your store. You can also set it to just products that are “Available,” which means any products that don't belong to any Availability Groups. You can also have the feed focus on just products in a particular category. You just type in the Category Code here. Or “All Products” in a particular price group in a particular Availability Group or all products that are not in a specific category, not in a specific group, or not in a specific Availability Group.

You also have the option of controlling what type of delimiter to use. For this feed, either comma, tab or pipe. If you have any Price Groups or sales set up that modify the pricing, you can choose to include Predicted Product Discounts in your feed. If you have products that use Inventory Variants, you can choose to include the product variants in your feed as well. You have control over which Product Fields and Custom Fields you want included in your feed, so for instance, if I didn't want to include SKU if the products are taxable and how heavy the products were, I would just select SKU, Taxable and Weight and click on deselect to remove those fields and then click “Update.”

Lastly if you needed more precise control over the feed template, you can click into “Advanced Mode,” which gains you access to the header template and the iterator template. If you look closely, you can see the header template is outputting the product code for the first column and then the product name for the second column and the product price for the third column and so on and so forth. For each iterator it's going to load the record code for a product, the record name for a product and then the record price for product arranged so that each column in the iterator template lines up with the related column up in the header template. So for instance, if I wanted to build a feed that only includes the product name and the product price, I would add to that and I would make sure that the iterator template only pulls in the record name and the record price for each of my products. Now, when we go back to the product feed, we could see that it's just the product names and the product price and then it iterates through all of the products in my store. If you were saving this as a CSV file on your server or emailing it to yourself, let me save this as a. CSV, to show you what that would look like. It would look something like this, where the first column starts with product name, the second column is product price, then it iterates through all the products in my store. And that's a look at Template-Based Feeds in Miva Merchant.

Looking for Developer Docs?

We have a whole section for that, including: Developer Training Series, Template Language docs, Module Development tutorials and much, much more.

Head to the Developer Section

This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.


Copyright © 1997 – 2024 Miva®, Miva Merchant®, MivaPay®, MivaCon®, Camp Miva®, Miva Connect®, Miva, Inc. All Rights Reserved.