# Programming (EN)

**URL:** https://forum.shopware.com/c/shopware-6-english/programming-en/43.md?page=6

[Aktuelle](https://forum.shopware.com/latest.md) · [Kategorien](https://forum.shopware.com/categories.md) · [Schlagwörter](https://forum.shopware.com/tags.md)

**Page:** 7

---

## [How to create a product with variants like in Shopware5](https://forum.shopware.com/t/how-to-create-a-product-with-variants-like-in-shopware5/63299)

<div class="topic-metadata">

**Author:** [@Rydori](https://forum.shopware.com/u/Rydori)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [10. März 2021 um 21:27 UTC](https://forum.shopware.com/t/how-to-create-a-product-with-variants-like-in-shopware5/63299 "2021-03-10T21:27:57Z")

</div>

I’m currently Programming a Plugin in Shopware 6, and now I have the Problem, that I need to create a Product and I dont exactly how to to it in a Controller. In the generated Product following attributes must be set: p…

---

## [Creating product variants via DAL](https://forum.shopware.com/t/creating-product-variants-via-dal/85835)

<div class="topic-metadata">

**Author:** [@j.dionant](https://forum.shopware.com/u/j.dionant)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [9. März 2021 um 20:49 UTC](https://forum.shopware.com/t/creating-product-variants-via-dal/85835 "2021-03-09T20:49:06Z")

</div>

Hi, I am trying to add product variants via the DAL. I haven’t found any documentation via the documentation. Also via the code i can’t find a solution. Creating a simple product is no issue, but adding properties/varia…

---

## [How to safely update custom fields (keeping other custom field values)?](https://forum.shopware.com/t/how-to-safely-update-custom-fields-keeping-other-custom-field-values/72893)

<div class="topic-metadata">

**Author:** [@riddla](https://forum.shopware.com/u/riddla)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [28. Februar 2021 um 09:55 UTC](https://forum.shopware.com/t/how-to-safely-update-custom-fields-keeping-other-custom-field-values/72893 "2021-02-28T09:55:24Z")

</div>

We are updating some products custom fields via the productRepositorys upsert method: $productdata = \[// ... 'customFields' =\\\> \[ 'productLine' =\\\> 'foo', 'setConsists' =\\\> 'bar'\] // ... \];$this-\\\>productRepository-\\\>u…

---

## [why OrderTransactionStateHandler do not contain a method authorize](https://forum.shopware.com/t/why-ordertransactionstatehandler-do-not-contain-a-method-authorize/73051)

<div class="topic-metadata">

**Author:** [@lanea](https://forum.shopware.com/u/lanea)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [27. Februar 2021 um 18:41 UTC](https://forum.shopware.com/t/why-ordertransactionstatehandler-do-not-contain-a-method-authorize/73051 "2021-02-27T18:41:47Z")

</div>

I have a question to the developers of Shopware, why OrderTransactionStateHandler do not contain a method authorize This status exist in StateMachineTransitionActions /\\\*\\\* \\\* @throws InconsistentCriteriaIdsException …

---

## [How to redefine CalculatedPrice?](https://forum.shopware.com/t/how-to-redefine-calculatedprice/72999)

<div class="topic-metadata">

**Author:** [@DouglasMurrel](https://forum.shopware.com/u/DouglasMurrel)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [25. Februar 2021 um 11:35 UTC](https://forum.shopware.com/t/how-to-redefine-calculatedprice/72999 "2021-02-25T11:35:41Z")

</div>

I’m trying to write plugin in Shopware6, it must add some custom values (like deposit) to Product line item. So I wrote my class class DepositCalculatedPrice extends CalculatedPrice { /\*\* @var float $deposit \*/ …

---

## [Shopware scheduled tasks (cron) do not work](https://forum.shopware.com/t/shopware-scheduled-tasks-cron-do-not-work/68577)

<div class="topic-metadata">

**Author:** [@AnriKo](https://forum.shopware.com/u/AnriKo)\
**Antworten:** 2\
**Zuletzt aktualisiert:** [19. Februar 2021 um 22:04 UTC](https://forum.shopware.com/t/shopware-scheduled-tasks-cron-do-not-work/68577 "2021-02-19T22:04:58Z")

</div>

Hello everybody. Have question about shopware scheduled task (cron). I create ScheduledTask in my custom plugin, actived this plugin but this task not work. I check ScheduledTask in shopware database, there exist my tas…

---

## [Why we face the speed issue while go to some category in the site?](https://forum.shopware.com/t/why-we-face-the-speed-issue-while-go-to-some-category-in-the-site/72732)

<div class="topic-metadata">

**Author:** [@Puja](https://forum.shopware.com/u/Puja)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [12. Februar 2021 um 10:08 UTC](https://forum.shopware.com/t/why-we-face-the-speed-issue-while-go-to-some-category-in-the-site/72732 "2021-02-12T10:08:44Z")

</div>

The website link is https://wasserbetten-haase.de/. When we go in category https://wasserbetten-haase.de/Wasserbetten/Comfort/, the page is continous loading. It doen’t respond immedialtery or in a short time. We have…

---

## [Why we face the speed issue while go to some category in the site?](https://forum.shopware.com/t/why-we-face-the-speed-issue-while-go-to-some-category-in-the-site/72730)

<div class="topic-metadata">

**Author:** [@Puja](https://forum.shopware.com/u/Puja)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [12. Februar 2021 um 10:04 UTC](https://forum.shopware.com/t/why-we-face-the-speed-issue-while-go-to-some-category-in-the-site/72730 "2021-02-12T10:04:53Z")

</div>

We are facing the speed issue on the category page https://wasserbetten-haase.de/Wasserbetten/Comfor

---

## [How can I use php xmlrpc  in the shopware plugin to send data from shopware to odoo end.](https://forum.shopware.com/t/how-can-i-use-php-xmlrpc-in-the-shopware-plugin-to-send-data-from-shopware-to-odoo-end/72384)

<div class="topic-metadata">

**Author:** [@karan\_negx](https://forum.shopware.com/u/karan_negx)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [4. Februar 2021 um 22:51 UTC](https://forum.shopware.com/t/how-can-i-use-php-xmlrpc-in-the-shopware-plugin-to-send-data-from-shopware-to-odoo-end/72384 "2021-02-04T22:51:51Z")

</div>

I’ve tried the code in my custom shopware 6 plugin but it says “Uncaught Error: Class ‘Webkul\\Swerpsync\\Controller\\Api\\xmlrpc\_client’ not found”. I’ve attached the full response and the code as well. namespace Webkul\\…

---

## [Installed wrong version of Shopware on PROD ?](https://forum.shopware.com/t/installed-wrong-version-of-shopware-on-prod/71331)

<div class="topic-metadata">

**Author:** [@powolnymarcel](https://forum.shopware.com/u/powolnymarcel)\
**Antworten:** 4\
**Zuletzt aktualisiert:** [3. Februar 2021 um 16:13 UTC](https://forum.shopware.com/t/installed-wrong-version-of-shopware-on-prod/71331 "2021-02-03T16:13:11Z")

</div>

Hello, I think that I have made a big mistake, I deployed the dev version on prod env. How can I move the actual Shopware 6 shop to the stable channel (with all pictures, orders, clients, admins,…) ? Is it possible …

---

## [How to change the logo of Shopware in the login page of admin from plugin config, in Shopware 6?](https://forum.shopware.com/t/how-to-change-the-logo-of-shopware-in-the-login-page-of-admin-from-plugin-config-in-shopware-6/72459)

<div class="topic-metadata">

**Author:** [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [3. Februar 2021 um 15:56 UTC](https://forum.shopware.com/t/how-to-change-the-logo-of-shopware-in-the-login-page-of-admin-from-plugin-config-in-shopware-6/72459 "2021-02-03T15:56:48Z")

</div>

How to change the logo of Shopware in the login page of admin from plugin config, in Shopware 6?

---

## [Problem with getting product data via API](https://forum.shopware.com/t/problem-with-getting-product-data-via-api/72536)

<div class="topic-metadata">

**Author:** [@lukaszkrawczyk](https://forum.shopware.com/u/lukaszkrawczyk)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [3. Februar 2021 um 14:57 UTC](https://forum.shopware.com/t/problem-with-getting-product-data-via-api/72536 "2021-02-03T14:57:03Z")

</div>

Hi, I\`m developing integration using API. I need to get products data: Image url Unit Variants (colour, size) for ordered products Unfortunately I can’t find it in the documentation

---

## [dataa mapping with simple text-element for shoppingworld won't work](https://forum.shopware.com/t/dataa-mapping-with-simple-text-element-for-shoppingworld-wont-work/72299)

<div class="topic-metadata">

**Author:** [@tigerbit](https://forum.shopware.com/u/tigerbit)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [23. Januar 2021 um 18:40 UTC](https://forum.shopware.com/t/dataa-mapping-with-simple-text-element-for-shoppingworld-wont-work/72299 "2021-01-23T18:40:41Z")

</div>

Good evening, im trying to build an Element for the shopping worlds. My aim is to use the data-mapping to get the category.name and in the config part of the element to select h1, h2, h3, h4, h5, h6… The standard text…

---

## [Changing amount of orderline item along with price](https://forum.shopware.com/t/changing-amount-of-orderline-item-along-with-price/72251)

<div class="topic-metadata">

**Author:** [@FSA](https://forum.shopware.com/u/FSA)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [21. Januar 2021 um 15:37 UTC](https://forum.shopware.com/t/changing-amount-of-orderline-item-along-with-price/72251 "2021-01-21T15:37:57Z")

</div>

Hello, i want to change the amount of an order line item via script/DAL the order line item dataset has 4 columns related to the price and quantity ordered quantity / total\_price price\_definition price i created…

---

## [How can I fetch the media files of the products in Shopware 6 using Rest API?](https://forum.shopware.com/t/how-can-i-fetch-the-media-files-of-the-products-in-shopware-6-using-rest-api/72208)

<div class="topic-metadata">

**Author:** [@zan](https://forum.shopware.com/u/zan)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [20. Januar 2021 um 07:00 UTC](https://forum.shopware.com/t/how-can-i-fetch-the-media-files-of-the-products-in-shopware-6-using-rest-api/72208 "2021-01-20T07:00:25Z")

</div>

According to the documentation for REST API https://docs.shopware.com/en/shopware-platform-dev-en/how-to/working-with-the-api-and-an-http-client I can retrieve product data by calling the request function $this-\>restSe…

---

## [The essential composer.json file for the plugin was not in the expected folder](https://forum.shopware.com/t/the-essential-composer-json-file-for-the-plugin-was-not-in-the-expected-folder/71913)

<div class="topic-metadata">

**Author:** [@nnasir](https://forum.shopware.com/u/nnasir)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [6. Januar 2021 um 10:28 UTC](https://forum.shopware.com/t/the-essential-composer-json-file-for-the-plugin-was-not-in-the-expected-folder/71913 "2021-01-06T10:28:39Z")

</div>

When I submit the plugin in for review in thier store It was rejected saying the composer.json file is not in the expected folder. Although I have double checked the plugin files and their structure and the file is in th…

---

## [Adding extra filters to twig](https://forum.shopware.com/t/adding-extra-filters-to-twig/71899)

<div class="topic-metadata">

**Author:** [@hossain\_pu](https://forum.shopware.com/u/hossain_pu)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [5. Januar 2021 um 14:00 UTC](https://forum.shopware.com/t/adding-extra-filters-to-twig/71899 "2021-01-05T14:00:49Z")

</div>

Dear Guys, i need to extend twig to add some extra filters. may i know how to do it ? Many Thanks.

---

## [Dependency on a non-existent service.](https://forum.shopware.com/t/dependency-on-a-non-existent-service/71875)

<div class="topic-metadata">

**Author:** [@zan](https://forum.shopware.com/u/zan)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [5. Januar 2021 um 07:53 UTC](https://forum.shopware.com/t/dependency-on-a-non-existent-service/71875 "2021-01-05T07:53:58Z")

</div>

I have created a piugin named SwagMasterAPI. I have to get some products from different API. But when I try to add it to the service I am getting following error: The service "SwagMasterApi\\Service\\CarService" has a dep…

---

## [How to hide grid action button from "sw-entity-listing" listing in shopware 6?](https://forum.shopware.com/t/how-to-hide-grid-action-button-from-sw-entity-listing-listing-in-shopware-6/63699)

<div class="topic-metadata">

**Author:** [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Antworten:** 4\
**Zuletzt aktualisiert:** [15. Dezember 2020 um 06:27 UTC](https://forum.shopware.com/t/how-to-hide-grid-action-button-from-sw-entity-listing-listing-in-shopware-6/63699 "2020-12-15T06:27:28Z")

</div>

How to hide grid action buttons(Edit, Delete) from “sw-entity-listing” listing in shopware 6?

---

## [Session Handling Headless to Native](https://forum.shopware.com/t/session-handling-headless-to-native/67597)

<div class="topic-metadata">

**Author:** [@edinhobl](https://forum.shopware.com/u/edinhobl)\
**Antworten:** 10\
**Zuletzt aktualisiert:** [11. Dezember 2020 um 16:17 UTC](https://forum.shopware.com/t/session-handling-headless-to-native/67597 "2020-12-11T16:17:38Z")

</div>

I am tryin to implement a custom template based webshop I bought from the net. Currently I am accessing the API via Ajax. My template now handles the adding of products into the cart, removeing them and so on. But now wh…

---

## [How to change the default login/registration page](https://forum.shopware.com/t/how-to-change-the-default-login-registration-page/71389)

<div class="topic-metadata">

**Author:** [@DjLance](https://forum.shopware.com/u/DjLance)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [8. Dezember 2020 um 10:03 UTC](https://forum.shopware.com/t/how-to-change-the-default-login-registration-page/71389 "2020-12-08T10:03:18Z")

</div>

I want to remove some default form fields from the registration page. So far I did not find a correct solution to establish that. In the backoffice you can enable / disable some settings regarding the form fields but t…

---

## [Sort products by last creation date](https://forum.shopware.com/t/sort-products-by-last-creation-date/71349)

<div class="topic-metadata">

**Author:** [@powolnymarcel](https://forum.shopware.com/u/powolnymarcel)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [7. Dezember 2020 um 09:22 UTC](https://forum.shopware.com/t/sort-products-by-last-creation-date/71349 "2020-12-07T09:22:30Z")

</div>

Hello, Can someone teach me how to sort articles in listing so that they are sorted by last creation date. In order to see new products on first page This feature is in the latest Shopware version, but I have the dev…

---

## [Demystifying the StockUpdater](https://forum.shopware.com/t/demystifying-the-stockupdater/70474)

<div class="topic-metadata">

**Author:** [@juanitolaguna](https://forum.shopware.com/u/juanitolaguna)\
**Antworten:** 2\
**Zuletzt aktualisiert:** [3. Dezember 2020 um 18:51 UTC](https://forum.shopware.com/t/demystifying-the-stockupdater/70474 "2020-12-03T18:51:42Z")

</div>

Hello Devs, I am doing some Stock recalculations for a particular kind of products. That is, implementing my own StockUpdater. I am facing dificulties in two situations. Can’t update the available stock when the St…

---

## [How to extend the search on the storefront to search also custom fields?](https://forum.shopware.com/t/how-to-extend-the-search-on-the-storefront-to-search-also-custom-fields/70245)

<div class="topic-metadata">

**Author:** [@pinakbheed](https://forum.shopware.com/u/pinakbheed)\
**Antworten:** 3\
**Zuletzt aktualisiert:** [1. Dezember 2020 um 04:56 UTC](https://forum.shopware.com/t/how-to-extend-the-search-on-the-storefront-to-search-also-custom-fields/70245 "2020-12-01T04:56:12Z")

</div>

Hi All, I have a couple of custom fields associated with products. How can I extend the functionality of search so that it also searches if the query text is contained in the custom fields of any product. I need an OR r…

---

## [How to change cross-sell slider to 5 products](https://forum.shopware.com/t/how-to-change-cross-sell-slider-to-5-products/71137)

<div class="topic-metadata">

**Author:** [@SannNL](https://forum.shopware.com/u/SannNL)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [24. November 2020 um 16:31 UTC](https://forum.shopware.com/t/how-to-change-cross-sell-slider-to-5-products/71137 "2020-11-24T16:31:54Z")

</div>

Hello, I’m using the cross-sell feature on the product page. It makes a slider by default and it shows 4 items and the rest is hidden by the slider, is it possible to change it to 5 products shown? I did find that it’s t…

---

## [How to use snippets in frontend js files?](https://forum.shopware.com/t/how-to-use-snippets-in-frontend-js-files/71125)

<div class="topic-metadata">

**Author:** [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [24. November 2020 um 12:57 UTC](https://forum.shopware.com/t/how-to-use-snippets-in-frontend-js-files/71125 "2020-11-24T12:57:41Z")

</div>

How to use snippets in frontend js files?

---

## [updating / removing relation between produkt and image](https://forum.shopware.com/t/updating-removing-relation-between-produkt-and-image/70865)

<div class="topic-metadata">

**Author:** [@hagrim](https://forum.shopware.com/u/hagrim)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [12. November 2020 um 14:04 UTC](https://forum.shopware.com/t/updating-removing-relation-between-produkt-and-image/70865 "2020-11-12T14:04:28Z")

</div>

Hello, I’m programming an interface between our PIM system (JCatalog) and Shopware 6. I’m able to import new products using rest-api (json). Also I can create product images and create the relation between product and i…

---

## [How to install APP in shopware 6?](https://forum.shopware.com/t/how-to-install-app-in-shopware-6/70456)

<div class="topic-metadata">

**Author:** [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [27. Oktober 2020 um 07:53 UTC](https://forum.shopware.com/t/how-to-install-app-in-shopware-6/70456 "2020-10-27T07:53:56Z")

</div>

I am developing an App for my shop I have installed the app system plugin in my store. https://github.com/shopware/app-system And app installed using the command bin/console app:install --activate MyExampleApp Is th…

---

## [How to call a custom method in backend?](https://forum.shopware.com/t/how-to-call-a-custom-method-in-backend/70396)

<div class="topic-metadata">

**Author:** [@euroxid](https://forum.shopware.com/u/euroxid)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [22. Oktober 2020 um 18:09 UTC](https://forum.shopware.com/t/how-to-call-a-custom-method-in-backend/70396 "2020-10-22T18:09:21Z")

</div>

Most of the backend is centered around data manipulation. But how can I make a call that just executes a custom method (e.g. of a controller) and then outputs the returned HTML?

---

## [Debugging Twig files in PhpStorm](https://forum.shopware.com/t/debugging-twig-files-in-phpstorm/70381)

<div class="topic-metadata">

**Author:** [@halfpint\_utopia](https://forum.shopware.com/u/halfpint_utopia)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [22. Oktober 2020 um 12:26 UTC](https://forum.shopware.com/t/debugging-twig-files-in-phpstorm/70381 "2020-10-22T12:26:25Z")

</div>

Hi, I have installed Shopware 6 on Docker and wondered if anyone was successfully using the debugger with Twig files. I am trying to debug my plugin and using the plugin to create new elements, blocks and extend blocks, …

[Vorherige Seite](https://forum.shopware.com/c/shopware-6-english/programming-en/43.md?page=5)

[Nächste Seite](https://forum.shopware.com/c/shopware-6-english/programming-en/43.md?page=7)
