You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Through the admin dashboard, it should be possible to include custom fields of type price in exports.
Actual behaviour
An empty value is exported for that field.
How to reproduce
Create a new custom field set for product entities (Settings > System > Custom Fields)
Create one field of type Price
Set a value for this newly created field in any product
Create a new import/export profile for product entities
Add the field you just created to the export
First select translations.DEFAULT.customFields
Then translations.DEFAULT.customFields.<field-name>
Try to export using your newly created profile
Notice the values for your field are all empty
Step 3.i.b is probably the first sign something is wrong. As can be seen in the regular price field, there should be "sub fields" for each currency and for net/gross prices (price.DEFAULT.net or price.USD.gross), but there is none for this custom field.
Trying to manually type the value in doesn't allow saving. I also tried editing the mappings directly in the database to many different possibilities, none of them worked. The "closest" I got was translations.DEFAULT.customFields.<field-name>.<currencyId> but that just tried to export an object of type Shopware\Core\Framework\DataAbstractionLayer\Pricing\Price which fails serializing.
Doing some debugging and actually looking through the code I figured the issue in the end is probably in Shopware\Core\Content\ImportExport\DataAbstractionLayer\Serializer\Field\CustomFieldsSerializer where it doesn't take the same approach as PriceSerializer for custom fields of type price.
The text was updated successfully, but these errors were encountered:
PHP Version
8.1.13
Shopware Version
6.4.20.2
Expected behaviour
Through the admin dashboard, it should be possible to include custom fields of type price in exports.
Actual behaviour
An empty value is exported for that field.
How to reproduce
translations.DEFAULT.customFields
translations.DEFAULT.customFields.<field-name>
Step 3.i.b is probably the first sign something is wrong. As can be seen in the regular price field, there should be "sub fields" for each currency and for net/gross prices (
price.DEFAULT.net
orprice.USD.gross
), but there is none for this custom field.Trying to manually type the value in doesn't allow saving. I also tried editing the mappings directly in the database to many different possibilities, none of them worked. The "closest" I got was
translations.DEFAULT.customFields.<field-name>.<currencyId>
but that just tried to export an object of typeShopware\Core\Framework\DataAbstractionLayer\Pricing\Price
which fails serializing.Doing some debugging and actually looking through the code I figured the issue in the end is probably in
Shopware\Core\Content\ImportExport\DataAbstractionLayer\Serializer\Field\CustomFieldsSerializer
where it doesn't take the same approach asPriceSerializer
for custom fields of type price.The text was updated successfully, but these errors were encountered: