I have an e-commerce website that reuses a snippet to render products on the category, search and cart pages (for the upsell area, and not the actual cart contents). The snippet uses the schema.org markup, and because it lets people interact with a product and buy it right away, I mark it up as Offer, not an ItemList or similar.
The issue is with the cart page, which is where I don't want the schema.org markup to appear. The first thing coming to mind is to have the snippet stop applying any markup when it recognises the cart page, but that will introduce lots of if-elses, and complicate the code.
If I wrap the products block into a <noindex></noindex> from the parent cart template, will that have any effect on these products appearing on other pages? They use the same sku and url values everywhere. Or am I better off adding noindex to the whole cart page?
My concern is this may send conflicting signals, and it generally feels wrong, similar to putting a heater into a freezer.
<noindex></noindex>tags.noindexis a meta tag that goes in the head of the page and prevents the entire page from getting indexed. It is hard to make search engines ignore part of a page. See Preventing robots from crawling specific part of a page – Stephen Ostermiller Mar 17 '21 at 09:32noindexthe whole cart page anyway – ᴍᴇʜᴏᴠ Mar 17 '21 at 14:57