# Programming (EN)

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

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

**Page:** 6

---

## [Backend Controller](https://forum.shopware.com/t/backend-controller/62084)

<div class="topic-metadata">

**Author:** [@ivanb](https://forum.shopware.com/u/ivanb)\
**Antworten:** 4\
**Zuletzt aktualisiert:** [23. Juni 2021 um 06:59 UTC](https://forum.shopware.com/t/backend-controller/62084 "2021-06-23T06:59:41Z")

</div>

How can I create a controller which is accessible only if admin is logged in? Or how can I determine if shop admin is logged in?

---

## [How to validate user input in plugin configuration](https://forum.shopware.com/t/how-to-validate-user-input-in-plugin-configuration/88429)

<div class="topic-metadata">

**Author:** [@bernhard.pszola](https://forum.shopware.com/u/bernhard.pszola)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [17. Juni 2021 um 20:16 UTC](https://forum.shopware.com/t/how-to-validate-user-input-in-plugin-configuration/88429 "2021-06-17T20:16:35Z")

</div>

for a payment handler we are using some parameters that should be entered by an admin user when installing the plugin. How can the submitted parameter values be checked to be valid (f. i. via an API to another applicatio…

---

## [How can we display products from a specific category on the "/checkout/cart" page?](https://forum.shopware.com/t/how-can-we-display-products-from-a-specific-category-on-the-checkout-cart-page/68649)

<div class="topic-metadata">

**Author:** [@spankracht](https://forum.shopware.com/u/spankracht)\
**Antworten:** 3\
**Zuletzt aktualisiert:** [15. Juni 2021 um 09:23 UTC](https://forum.shopware.com/t/how-can-we-display-products-from-a-specific-category-on-the-checkout-cart-page/68649 "2021-06-15T09:23:54Z")

</div>

Hello! Hopefully someone here can help us out with the following. What we want to achieve: Display some products from a specific productcategory below the shopping cart ({url}/checkout/cart). Our idea: Fetch the pro…

---

## [Minimal CMS block](https://forum.shopware.com/t/minimal-cms-block/72945)

<div class="topic-metadata">

**Author:** [@JoAnneWDT](https://forum.shopware.com/u/JoAnneWDT)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [13. Juni 2021 um 17:15 UTC](https://forum.shopware.com/t/minimal-cms-block/72945 "2021-06-13T17:15:22Z")

</div>

I try to create a custom CMS block to be dragged+dropped into a page. It shows in the intended manner as a preview in the list of CMS blocks, one of the text blocks. But when I try to drop it into a page, I get the er…

---

## [How to use MySQL functions in DAL in shopware6?](https://forum.shopware.com/t/how-to-use-mysql-functions-in-dal-in-shopware6/88170)

<div class="topic-metadata">

**Author:** [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [8. Juni 2021 um 06:58 UTC](https://forum.shopware.com/t/how-to-use-mysql-functions-in-dal-in-shopware6/88170 "2021-06-08T06:58:54Z")

</div>

How to use MySQL functions in DAL? For example how to do the following search in DAL? SELECT \* FROM customer\_address WHERE LCASE(first\_name)='abin'

---

## [Extending the Administration in Shopware 6.4](https://forum.shopware.com/t/extending-the-administration-in-shopware-6-4/87957)

<div class="topic-metadata">

**Author:** [@ninja](https://forum.shopware.com/u/ninja)\
**Antworten:** 2\
**Zuletzt aktualisiert:** [4. Juni 2021 um 11:10 UTC](https://forum.shopware.com/t/extending-the-administration-in-shopware-6-4/87957 "2021-06-04T11:10:56Z")

</div>

I created a Plugin which extended the backend administration of Shopware. In older Shopware versions it’s working without any problem. So the Backend looks like this: So I added some buttons which would lead you to a …

---

## [How to debug the scheduler tasks in Shopware 6](https://forum.shopware.com/t/how-to-debug-the-scheduler-tasks-in-shopware-6/87816)

<div class="topic-metadata">

**Author:** [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [21. Mai 2021 um 11:54 UTC](https://forum.shopware.com/t/how-to-debug-the-scheduler-tasks-in-shopware-6/87816 "2021-05-21T11:54:52Z")

</div>

Hi Is there any easy way to debug the scheduler tasks? it’s very difficult to test this. Sometimes the messenger:consume command doesn’t show the output.

---

## [Custom Product-Box - No data in the storefront](https://forum.shopware.com/t/custom-product-box-no-data-in-the-storefront/65583)

<div class="topic-metadata">

**Author:** [@thepixture](https://forum.shopware.com/u/thepixture)\
**Antworten:** 11\
**Zuletzt aktualisiert:** [20. Mai 2021 um 21:06 UTC](https://forum.shopware.com/t/custom-product-box-no-data-in-the-storefront/65583 "2021-05-20T21:06:30Z")

</div>

Based on the element “Product-Box” I created my own element and the corresponding storefront-template. I only changed the names in the index.js. In the backend, the data of the selected product is also correctly display…

---

## [How can i use custom images on my plugin?](https://forum.shopware.com/t/how-can-i-use-custom-images-on-my-plugin/67442)

<div class="topic-metadata">

**Author:** [@alphabetus](https://forum.shopware.com/u/alphabetus)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [20. Mai 2021 um 11:59 UTC](https://forum.shopware.com/t/how-can-i-use-custom-images-on-my-plugin/67442 "2021-05-20T11:59:28Z")

</div>

Im developing a plugin integrating an external API. As a response to the API calls i want to print some images into DOM. My question is: How can I serve custom images with my plugin into storefront? I have extended a…

---

## [How to make registration form for commercial account only](https://forum.shopware.com/t/how-to-make-registration-form-for-commercial-account-only/68423)

<div class="topic-metadata">

**Author:** [@coffeeman](https://forum.shopware.com/u/coffeeman)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [14. Mai 2021 um 07:17 UTC](https://forum.shopware.com/t/how-to-make-registration-form-for-commercial-account-only/68423 "2021-05-14T07:17:05Z")

</div>

I want to remove „I am\*“ field from registration form and make „commercial“ option default bacause I need VAT-ID field. How can I achieve this? Creating custom field is not an option because I’m using „VAT: Tax-free when…

---

## [I've created a shopware 6 admin API client library in the V programming language](https://forum.shopware.com/t/ive-created-a-shopware-6-admin-api-client-library-in-the-v-programming-language/87621)

<div class="topic-metadata">

**Author:** [@logTom](https://forum.shopware.com/u/logTom)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [12. Mai 2021 um 09:34 UTC](https://forum.shopware.com/t/ive-created-a-shopware-6-admin-api-client-library-in-the-v-programming-language/87621 "2021-05-12T09:34:36Z")

</div>

Feel free to ask any question about it here or on github as an issue.

---

## [How do I query the Admin API in a specific language](https://forum.shopware.com/t/how-do-i-query-the-admin-api-in-a-specific-language/65735)

<div class="topic-metadata">

**Author:** [@patchee500](https://forum.shopware.com/u/patchee500)\
**Antworten:** 6\
**Zuletzt aktualisiert:** [7. Mai 2021 um 12:21 UTC](https://forum.shopware.com/t/how-do-i-query-the-admin-api-in-a-specific-language/65735 "2021-05-07T12:21:44Z")

</div>

Or rather how is multilang supposed to work when qerying data from the Admin API in general? This is my specific usecase: Suppose I’m only using a single Storefront with multiple languages. I’d like to select certain…

---

## [Link in admin menu to plugin configuration](https://forum.shopware.com/t/link-in-admin-menu-to-plugin-configuration/65070)

<div class="topic-metadata">

**Author:** [@Pascal1988](https://forum.shopware.com/u/Pascal1988)\
**Antworten:** 2\
**Zuletzt aktualisiert:** [5. Mai 2021 um 22:17 UTC](https://forum.shopware.com/t/link-in-admin-menu-to-plugin-configuration/65070 "2021-05-05T22:17:26Z")

</div>

I have a custom module with a new entry in the administration menu. A suboption of that menu should go directly to the plugin options. I expected something like this to work: routes: { config: { component…

---

## [How to add user permissions for the new module on the admin side?](https://forum.shopware.com/t/how-to-add-user-permissions-for-the-new-module-on-the-admin-side/87353)

<div class="topic-metadata">

**Author:** [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [4. Mai 2021 um 05:57 UTC](https://forum.shopware.com/t/how-to-add-user-permissions-for-the-new-module-on-the-admin-side/87353 "2021-05-04T05:57:34Z")

</div>

Hi I have created a plugin. I have a backend listing. So I want to restrict some of the admin users from viewing my menu on the admin side. How to do this by Shopware user permissions by coding?

---

## [How to save state of the custom block while saving the product?](https://forum.shopware.com/t/how-to-save-state-of-the-custom-block-while-saving-the-product/87310)

<div class="topic-metadata">

**Author:** [@valeria.zaviriukha](https://forum.shopware.com/u/valeria.zaviriukha)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [30. April 2021 um 15:22 UTC](https://forum.shopware.com/t/how-to-save-state-of-the-custom-block-while-saving-the-product/87310 "2021-04-30T15:22:02Z")

</div>

Hi everyone! I will be grateful for your advice! I need to save state of the custom switch in the product. To the file sw-product-basic-form.html.twig i added this switch. When the state of the switch changes it shows …

---

## [How to get a product link for Qr-code?](https://forum.shopware.com/t/how-to-get-a-product-link-for-qr-code/87280)

<div class="topic-metadata">

**Author:** [@valeria.zaviriukha](https://forum.shopware.com/u/valeria.zaviriukha)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [29. April 2021 um 07:52 UTC](https://forum.shopware.com/t/how-to-get-a-product-link-for-qr-code/87280 "2021-04-29T07:52:33Z")

</div>

Hi! I am working on creating a plugin for generating Qr-code for product. The product link must be encrypted in this qr-code. The block with qr will be shown on the product page in the admin panel. The qr-code image chan…

---

## [Loading external stylesheet / script](https://forum.shopware.com/t/loading-external-stylesheet-script/87241)

<div class="topic-metadata">

**Author:** [@firemultimedia](https://forum.shopware.com/u/firemultimedia)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [28. April 2021 um 15:40 UTC](https://forum.shopware.com/t/loading-external-stylesheet-script/87241 "2021-04-28T15:40:38Z")

</div>

Hi all, I tried loading an external stylesheet from typekit, but I can’t seem to figure out how to do this in a custom theme. I’ve created a custom theme as mentioned in the shopware docs. But there is nowhere mention o…

---

## [Get all (featured) products in a category and all it's subcategories](https://forum.shopware.com/t/get-all-featured-products-in-a-category-and-all-its-subcategories/87131)

<div class="topic-metadata">

**Author:** [@AlexBS](https://forum.shopware.com/u/AlexBS)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [25. April 2021 um 22:15 UTC](https://forum.shopware.com/t/get-all-featured-products-in-a-category-and-all-its-subcategories/87131 "2021-04-25T22:15:09Z")

</div>

Hello, I have a CategoryEntity object and I want to search it and all subcategories for all products, that are featured. How do I look in the actual category and all subcategories How do I filter for the featured attr…

---

## [Custom icon](https://forum.shopware.com/t/custom-icon/62651)

<div class="topic-metadata">

**Author:** [@ivanb](https://forum.shopware.com/u/ivanb)\
**Antworten:** 7\
**Zuletzt aktualisiert:** [24. April 2021 um 15:02 UTC](https://forum.shopware.com/t/custom-icon/62651 "2021-04-24T15:02:33Z")

</div>

Hello, Is it possible to create a custom icon that will be used on the administration module, since I don’t want to use existing icons?

---

## [.. shipping costs according to the value of the shopping cart?](https://forum.shopware.com/t/shipping-costs-according-to-the-value-of-the-shopping-cart/87118)

<div class="topic-metadata">

**Author:** [@oern](https://forum.shopware.com/u/oern)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [24. April 2021 um 08:53 UTC](https://forum.shopware.com/t/shipping-costs-according-to-the-value-of-the-shopping-cart/87118 "2021-04-24T08:53:10Z")

</div>

Hello everyone, I would like to set the shipping costs according to the value of the shopping cart, for example 10% up to a total of 1000 €. Is something like that possible, I haven’t found a way yet and would be happy…

---

## [Console Adminstration build put files to wrong folder](https://forum.shopware.com/t/console-adminstration-build-put-files-to-wrong-folder/87059)

<div class="topic-metadata">

**Author:** [@towo1977](https://forum.shopware.com/u/towo1977)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [21. April 2021 um 19:50 UTC](https://forum.shopware.com/t/console-adminstration-build-put-files-to-wrong-folder/87059 "2021-04-21T19:50:27Z")

</div>

i´m doing the academy currently. the advanced developer there i´m extending the backend like told in the video. if i compille the administration the public files are copied to „towo“ and not „towobundle“ in the public…

---

## [Call a PUT Method inside a POST Route](https://forum.shopware.com/t/call-a-put-method-inside-a-post-route/86682)

<div class="topic-metadata">

**Author:** [@Rakowu](https://forum.shopware.com/u/Rakowu)\
**Antworten:** 2\
**Zuletzt aktualisiert:** [12. April 2021 um 11:43 UTC](https://forum.shopware.com/t/call-a-put-method-inside-a-post-route/86682 "2021-04-12T11:43:37Z")

</div>

Hey Everyonem, currently i’m trying to call a PUT Method inside a only allowed POST Controller. My plugin is just a Subscriber wich is attached to the Order Placement Event. From there i’m trying to call a Service with…

---

## [Access plugin configuration variables in Js file?](https://forum.shopware.com/t/access-plugin-configuration-variables-in-js-file/66814)

<div class="topic-metadata">

**Author:** [@SannNL](https://forum.shopware.com/u/SannNL)\
**Antworten:** 2\
**Zuletzt aktualisiert:** [9. April 2021 um 09:20 UTC](https://forum.shopware.com/t/access-plugin-configuration-variables-in-js-file/66814 "2021-04-09T09:20:58Z")

</div>

Hii so i access my plugin settings in a html.twig file trough this: {% if shopware.config.StickyHeader.config.activateStickyHeader %} But now i wanna access the same thing in a .js file but i cant figure out how. If i…

---

## [Passing variables to template in custom controller without GET/POST request params](https://forum.shopware.com/t/passing-variables-to-template-in-custom-controller-without-get-post-request-params/86750)

<div class="topic-metadata">

**Author:** [@renato.maretic](https://forum.shopware.com/u/renato.maretic)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [9. April 2021 um 08:42 UTC](https://forum.shopware.com/t/passing-variables-to-template-in-custom-controller-without-get-post-request-params/86750 "2021-04-09T08:42:32Z")

</div>

Hi there, I have a specific problem where I have to pass variable to template in custom controller, but I couldn’t use POST or GET request (reason being that function that’s doing redirect only sends GET request, and I …

---

## [Many To Many relationship with data in the association table](https://forum.shopware.com/t/many-to-many-relationship-with-data-in-the-association-table/86686)

<div class="topic-metadata">

**Author:** [@Miikro](https://forum.shopware.com/u/Miikro)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [6. April 2021 um 21:42 UTC](https://forum.shopware.com/t/many-to-many-relationship-with-data-in-the-association-table/86686 "2021-04-06T21:42:13Z")

</div>

Hi all, I am trying to make a bundle plugin with the possibility to add a quantity of products in the bundle. Bundle 1: Product 1 x X quantity Product 2 x Y quantity … I have created a bundle table, an association …

---

## [How to Access Parameters in the Body of POST Request in Controller](https://forum.shopware.com/t/how-to-access-parameters-in-the-body-of-post-request-in-controller/69160)

<div class="topic-metadata">

**Author:** [@coffeeman](https://forum.shopware.com/u/coffeeman)\
**Antworten:** 3\
**Zuletzt aktualisiert:** [29. März 2021 um 10:59 UTC](https://forum.shopware.com/t/how-to-access-parameters-in-the-body-of-post-request-in-controller/69160 "2021-03-29T10:59:38Z")

</div>

Hello, I built an API endpoint via controller that accepts POST requests. Here is my code:

---

## [How to append an image to a product](https://forum.shopware.com/t/how-to-append-an-image-to-a-product/85819)

<div class="topic-metadata">

**Author:** [@euroxid](https://forum.shopware.com/u/euroxid)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [23. März 2021 um 20:36 UTC](https://forum.shopware.com/t/how-to-append-an-image-to-a-product/85819 "2021-03-23T20:36:52Z")

</div>

I import products essentially by calling productrepository.upsert(\['name'=\>...\]); What is the established best practice to append product pictures, so that they get saved to disk and all the media\_\* tables get populated…

---

## [Search by orderNumber](https://forum.shopware.com/t/search-by-ordernumber/71222)

<div class="topic-metadata">

**Author:** [@Bitsiam](https://forum.shopware.com/u/Bitsiam)\
**Antworten:** 1\
**Zuletzt aktualisiert:** [22. März 2021 um 08:57 UTC](https://forum.shopware.com/t/search-by-ordernumber/71222 "2021-03-22T08:57:54Z")

</div>

Hi, I am trying to use the orderNumber instead of the orderId to search for orders. I tried something like $criteria-\>addFilter(new EqualsFilter('orderNumber', 10010)); $transactions = $this-\>orderRepository-\>search($…

---

## [How to assign categories to Product entity via DAL](https://forum.shopware.com/t/how-to-assign-categories-to-product-entity-via-dal/85747)

<div class="topic-metadata">

**Author:** [@dev](https://forum.shopware.com/u/dev)\
**Antworten:** 2\
**Zuletzt aktualisiert:** [19. März 2021 um 10:52 UTC](https://forum.shopware.com/t/how-to-assign-categories-to-product-entity-via-dal/85747 "2021-03-19T10:52:31Z")

</div>

Hi Guys! I’m starting with developing Shopware modules and probably I don’t understand everything yet, and because of that, I’ve stuck. Maybe someone will be able to help me. I’m trying to assign/unassign the product c…

---

## [Shopware Message Queue ignores Unrecoverable\[...\]Exception](https://forum.shopware.com/t/shopware-message-queue-ignores-unrecoverable-exception/86226)

<div class="topic-metadata">

**Author:** [@RafaelKr](https://forum.shopware.com/u/RafaelKr)\
**Antworten:** 0\
**Zuletzt aktualisiert:** [17. März 2021 um 17:34 UTC](https://forum.shopware.com/t/shopware-message-queue-ignores-unrecoverable-exception/86226 "2021-03-17T17:34:30Z")

</div>

I’m using the Shopware Message Queue. It says it’s based on the Symfony Messenger. In the docs for Symfony Messenger 4.4 (Shopware ist currently using 4.4.13) there is the possibility to avoid retrying of failed messages…

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

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