-->

Custom attributes - Shopware

To add a new attribute, it must be within SHOPWARE.

Step 1 - Find the attribute

Go to Einstellungen > Freitextfeld-Verwaltung > Top right select Atrikel (_articles_attributes)’ from the drop-down menu.

This will show you all the attributes available. Pay attention to NAME & LABEL.

find the attribute

Step 2 - Create the line which needs to be added

This will give you the information to create the necessary line to edit the Doofinder feed body.

<LABEL>{$sArticle.NAME|escape}</LABEL>

If they had the attribute labeled as Farbe with name attr5 the line would go as follows:

<Farbe>{$sArticle.attr5|escape}</Farbe>

Step 3 - Adding to the Doofinder Feed

Marketing > Produktexport > Doofinder Feed> Click on the ‘pencil’ > Then click on the ‘Body’ tab. (see image).

adding a new attribute

Directly underneath the MPN line, add the new attribute line. E.g.

<Farbe>{$sArticle.attr5|escape}</Farbe>

If they have more than one attribute to be added, they’ll have to add each attribute on its own line.

Once finished it should look like this:

adding more than one attribute

Time to SAVE!

Step 4 - Indexing the new attribute

You may need to change the caching interval for immediate update. Marketing > Produktexport > Doofinder Feed > Click on the ‘pencil’ > caching interval > LIVE

With this you can go to Doofinder admin > Search Engines > Settings > Indices and click on 'Process Now'.

indexing new attribute

📌 Note: You’ve changed the caching interval to LIVE - I would recommend changing it back to whatever it was.

How to add price per unit to the feed:

Step 1 - Accessing the feed template

Marketing > Produktexport > Doofinder Feed > Click on the ‘pencil’ > Then click on the ‘Body’ tab. (see image).

adding a new attribute

Step 2 - Adding the line to the feed template

Above the brand line, create a new empty line and add the following:

< referenz-preis > {if $sArticle.purchaseunit}{round($sArticle.price/$sArticle.purchaseunit *$sArticle.referenceunit,2)|escape} EUR / {$sArticle.referenceunit} {$sArticle.unit}{/if} </ referenz-preis >

Save.

Step 3 - Updating the feed in Shopware

For immediate update to the feed you need to change the cache settings.

Marketing > Produktexport > Doofinder Feed > Click on the ‘pencil’ > Cache-Zeit / Methode: LIVE

Updating the feed in shopware

Then, save.

Step 4 - Indexing the data in Doofinder

With this you can go to Doofinder admin > Search Engines > Settings > Indices
and click on 'Process Now'.

Indexing the data

📌 Note:You’ve changed the caching interval to LIVE - I would recommend changing it back to whatever it was.

Adding a new attribute to the feed

Step 1 - Find the attribute

Does it exist as a Custom Field?

Find this in Shopware under:

Settings > System > Custom Fields Einstellungen > System > Zusatzfelder

Step 2 - Adding to the Doofinder Feed

Verkaufskanale > DF feed > Template tab > Produktzeile > Add the desired line.

adding to the feed

Step 3 - Indexing the new attribute

You may need to change the caching interval for immediate update. Verkaufskanäle > Doofinder Feed > Allgemein > Produktexport > Generierungsintervall > LIVE

With this you can go to Doofinder admin > Search Engines > Settings > Indices > and click on 'Process Now'.

📌 Note:You’ve changed the caching interval to LIVE - I would recommend changing it back to whatever it was.