How to Exclude a Product from the Sitemap Feed
Collapse
X
-
Thanks for the suggestion. For now, I manually removed the 10 or so products from the generated xml file and will just have to remember to do that everytime. I will just hope that Miva adds the ability to exclude products & categories from it sorta like it does for pages.
-
There isn't a way to edit the built in xml site map. Best idea i can think of is to create a script that goes through and makes those marked product temporarily inactive. Run the site map. The run a script to set them back to active.
(Note: not sure why miva didn't make the template editable. Yes, it would be difficult as its XML, but a good developer wouldn't have much of an issue with that.
Leave a comment:
-
How can this be accomplished using the "Standard Sitemap Protocol Feed"? We just have some products that are only available as add-ons and don't want them to get indexed but they are showing in the sitemap.xml file. I don't see a place to edit a 'template' for this. We already have a custom field in place to use to exclude them.
Leave a comment:
-
Bruce - PhosphorMedia I figured you knew that. That was more for anyone who stumbled upon the thread.
Your suggestion of using custom fields helped greatly though.
I no longer have to add product codes to any of the feed templates (primarily our google shopping and facebook product feeds).
No more template tweaking!
Leave a comment:
-
yea, never use - in ANY variable. that was just a typo. personally, I tend to use camalCase cause...lazy.
Leave a comment:
-
Good call Bruce, way more efficient! Although that code didn't work.Originally posted by Bruce - PhosphorMedia View PostProbably a better way would be to use a custom field. Make it a checkbox and call it 'no_map', then use:
Be sure to assign that custom field to the site map template (its below the template text area).Code:<mvt:if expr="NOT(l.settings:record:record:customfield:no-map" /> Write out site map line </mvt:if>
I did get this to work though.
Good rule of thumb is to use underscores ( _ ) instead of hyphens (-) for any custom field codes.Code:<mvt:if expr="ISNULL l.settings:record:customfield:no_map"> Write out site map line </mvt:if>
You of course will have to make sure that custom field check box is indeed checked in the admin on the products you want excluded.
Leave a comment:
-
Probably a better way would be to use a custom field. Make it a checkbox and call it 'no_map', then use:
Be sure to assign that custom field to the site map template (its below the template text area).Code:<mvt:if expr="NOT(l.settings:record:record:customfield:no-map" /> Write out site map line </mvt:if>
Leave a comment:
-
Old thread but here is an example of how to take out certain products from the feed if you are using a template based feed.
You can use as many OR l.settings:record:code EQ 'PRODUCTCODE' statments as you need.Code:<mvt:if expr="l.settings:record:code EQ '[COLOR=#FF0000]PRODUCTCODE[/COLOR]' OR l.settings:record:code EQ '[COLOR=#FF0000]PRODUCTCODE[/COLOR]'"> <mvt:else> &mvt:record:code;,&mvt:record:name;,&mvt:record:descrip;,&mvt:record:inventory;,&mvt:record:price;,&mvt:record:url;,&mvt:record:customfield:main;&mvt:eol:crlf; </mvt:if>
Just make sure there is no record Iterator code between the <mvt: if and <mvt:else> Statements.
Leave a comment:
-
Miva's feed-based sitemap module works great but certain aspects of it are inflexible. I don't think there's necessarily a setting available to accomplish what you're trying to do. I imagine there may be at some point in the future though.
In the past, we've taken the sitemap module from Miva's limited source kit and customized it for any of our specific needs. In this case, it could be customized to look at a custom product field that identifies products that should be suppressed from the sitemap.
There may be a more roundabout approach that could get this working for you without the need to spin up your own module, but I can't think of it at the moment.
Leave a comment:
-
How to Exclude a Product from the Sitemap Feed
We have some products that are only available to certain price groups. When I run the Google Sitemap Feed, though, it adds these products to the sitemap xml file. If someone tries to go to these product pages, they will just get a Not Found Product Not Available error since the products are hidden unless logged into the price group. Right now I'm having to go in by hand and edit the sitemap xml file to remove these products. I know there is a Sitemap Exclude item, but it only works for Pages, not individual products. Is there a way I can mark individual products for exclusion from the Sitemap Feed?
Thanks!Tags: None
Leave a comment: