E-commerce tip: Shopware category on noindex
Reading time 3 min
In this article, we would like to give you some helpful tips and tricks for working with Shopware. If you have any further questions or need more information about creating an online shop with Shopware, we will be happy to assist you from the development to the support & monitoring of your online store.
CUSTOMIZATION IN THE BACKEND
The requirement is quite simple but cannot be implemented in Shopware by default. As an example, we would like to set the SALE category to noindex.
To do this, we first create a new free text field for the sub-item Categories under Settings -> Free text field management.
To do this, please select an "unconfigured field" from the list below and edit it as shown in the screenshot. For example, our field was attribute5.
CUSTOMIZATION IN THE THEME
Please create the file frontend/listing/header.tpl with the following content in your theme:
{extends file='parent:frontend/listing/header.tpl'} {block name='frontend_index_header_meta_robots'}{if $sCategoryContent.attribute.attribute5}{$sCategoryContent.attribute.attribute5}{else}{$smarty.block.parent}{/if}{/block}
Important: If you have not used attribute5 as we did above, you must adapt your source code accordingly, e.g. to attribute2, attribute3 ...
SETTINGS WITHIN THE CATEGORIES
Now you can easily define a separate value for the robots meta tag for each category.
In our example: noindex,follow
However, you could just as easily set noindex,nofollow and if you do not enter a value, the Shopware standard applies.
Shopware categories
In category management, you manage the category structure of your Shopware store and can organize your store pages and the service menu. The category structure in Shopware is displayed as a fold-out menu, which you can sort using drag & drop. You can also move a category to another category as a subcategory. The categories are also used for the footer navigation. You can use various Shopware plugins to deactivate categories, automatically expand the category filter and much more. Plugins are extensions for online stores that have both small and large functions, depending on the type. Shopware can be extended with countless plugins, allowing you to customize your online store according to your wishes.
For example, you can download our plugins Broken Image Finder (404), Amazon Order Number in Transaction Field and Tradedoubler Sale Tracking Pixel free of charge via the following link: https: //store.shopware.com/exwe-gmbh.html
The Amazon plugin imports the Amazon order numbers stored by Magnalister in the comments into the transaction column of Shopware and thus provides a better overview. The sBroken-Image plugin checks all images in the MediaManager for a correspondingly stored file on the server. The images listed in the MediaManager are not always available as a file on the server. This leads to images with 404 in the store.
If you have any questions, please contact us as always. We are at your side as a strong partner for all your questions about Shopware and e-commerce.
What is your project? If you want to tell us about it, we'll call you back!
Hello, my name is Meike. I take care of the EXWE back office and am responsible for our social media channels. All of our articles are meant to make your life easier and help you make decisions. Nevertheless, it can happen that something remains unclear, so: If you have questions about this article you can easily reach me at +49 231 93149827.
Interview with Johannes Meibers. The cookie banner in Shopware has a strong negative impact on tracking, e.g. in Google Analytics. With a solution!
Shopware with the new Google Analytics 4 Property - How to create Analytics 4 Property and the old Universal Analytics at the same time.
Our tip for Shopware invoices: Create an invoice correction without overwriting! Optimize processes in your online store quickly and easily.