Questions tagged [shopware]
Shopware is a PHP based eCommerce solution. It is open-source and is available free as well as with commercial licenses.
1,431
questions
0
votes
1
answer
13
views
Get Shopware 6 Current LoggedIn Customer or Guest
I would like to get the current logged in customer data into my Symfony/Shopware 6 service. How do I do it. What specific service/class do I inject?
For example:
class FreeShopping
{
public function ...
0
votes
0
answers
17
views
How Do I Create A Truly Global Variable In Symfony That Is Modifiable
I want a global Symfony PHP variable that can be accessed in all Services and events.
For example:
//can be accessed anywhere
$globalVar = 100;
//and can be modified
$globalVar = 1;
//the globalVar ...
1
vote
0
answers
22
views
Shopware 6 - Multiple Images and Variant Images how to get?
Some Products has multiple "main" images. But I see only one if I check the product with the API endpoint store-api/product/productid, is there a different endpoint for checking images ?
I ...
0
votes
0
answers
20
views
Shopware 6 EntitiyDefinition class name is null
What could be the reason for https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DependencyInjection/CompilerPass/EntityCompilerPass.php#L48 to return null ? I have a service like
<...
0
votes
0
answers
9
views
shopware watch problem. I can't run this command ./bin/watch-administration.sh
User
When I want to run this command ./bin/watch-administration.sh i get this error
Child
Time: 5165ms
Entrypoint storefront = css/storefront.css js/storefront.js
78 modules
Child
...
2
votes
1
answer
36
views
Translations for shopware 6 cms block
I have a custom cms block as the one from the tutorial https://developer.shopware.com/docs/guides/plugins/plugins/content/cms/add-cms-block.html
i would like the text from the slot named "left&...
0
votes
0
answers
12
views
Shopware 5: Uncaught Shopware\Components\CSRFTokenValidationException: The provided X-CSRF-Token for path is Invalid. Please go back and reload page
I have written the code in Community based Plugins as follows:
private function registerEvents()
{
$this->subscribeEvent
(
'...
1
vote
0
answers
25
views
Decorate a Shopware 6 core service without modifying the abstract class
After decorating a Shopware 6 core service and adding a new method, how do you use the call up the new method. I am not allowed to modify Shopware 6 bundle code base.
Example:
//abstract class begins
...
0
votes
0
answers
22
views
State.get(...) is undefined when overriding sw-order-create component
Customer request:
In the initial Modal window for creating a new order from administration, he already wants/needs to be able to add a customer comment, while creating the order. In default you can ...
1
vote
1
answer
35
views
How Do I Solve This Shopware Error The definition for Pugil/Core/System/NumberRange/ValueGenerator/Pattern/ValueGeneratorPatternLanguage has no class
How Do I Solve This Shopware Error The definition for "Pugil/Core/System/NumberRange/ValueGenerator/Pattern/ValueGeneratorPatternLanguage" has no class. If you intend to inject this service ...
1
vote
0
answers
20
views
Shopware 6 plugin: Constructor gets TraceableEventDispatcher type error
I have a Shopware 6 plugin with the following MailHelper service defined:
<service id="Swag\\ProductReviews\\Components\\MailHelper" public="true">
<argument type=&...
0
votes
0
answers
29
views
Extending the sw-entity-multi-id-select does not work
I am currently trying to extend an entity-multi-id-select field via JavaScript.
The code should only reduce the results to the order statuses
My code is this:
const { Component } = Shopware;
const { ...
0
votes
0
answers
5
views
Shopware 6 - useProductSearch in product detail page - manufacturer is null
I'm using the shopware Nuxt3 pwa to build an headless e-commerce. I am now building the product page inside the component. The product object within the page is inherited from the component, which ...
0
votes
1
answer
39
views
Same product showing multiple times in the product list page
We are currently experiencing an issue on the product listing page when using the Top Seller sorting option. The problem is that products are showing up multiple times on different pages.
For example, ...
0
votes
1
answer
33
views
How Is Shopware 6 Order Saved From The Frontend, The API appears to show nothing
I can't wrap my head on how the order data is saved from the storefront controller frontend.checkout.finish.order @ Shopware\vendor\shopware\storefront\Controller\CheckoutController.php
Below is the ...
-1
votes
0
answers
18
views
Display Variant Products Using The VueJS Variant Component
I am trying to display an array of products using the Shopware 6 variant component. Attached is the code from Shopware core. Here is the code in Github
{% block ...
1
vote
1
answer
28
views
Shopware block doesn't get registered
I started to learn how to create a custom block in shopware 6. To do this I setup a development environment using ddev. This wasn't as easy as it should've been, since I needed version 6.4.2.0 of ...
2
votes
0
answers
30
views
Shopware 6 Global Custom Field returning null for secondary language contexts
I have created a custom field set via plugin class.
$customFields = [
[
'name' => self::CUSTOM_FIELD_NAME,
'active' => true,
'global' => true,
...
2
votes
1
answer
47
views
Delay for message queue not available under Shopware 6.5?
I have a subscriber that passes a message to the message queue, this gets a delay and is set to the message queue normally.
Under Shopware 6.4 the delay is recognized, as soon as it expires the ...
1
vote
2
answers
56
views
Shopware 6: How to test against newly released Shopware versions without using dockware?
I am currently using dockware in my shell scripts to get Shopware docker images for testing. However, dockware takes some time to upload the latest Shopware versions after they are released, like 6.5....
0
votes
0
answers
49
views
Ignore set values for product quantityInformation
I try to ignore the set values on a product for quantityInformation and have created a CustomCartCollector in which my collect function looks like this:
public function collect(CartDataCollection $...
0
votes
1
answer
43
views
I am using ISP Config host, I just updated shopware 6.4.20 to 6.5.6 and dependencies require a PHP version ">= 8.1.0"
I am using ISP Config host, I just updated Shopware 6.4.20 to 6.5.6, for which I had to change PHP version so I changed it from host settings and it was shown in admin that its updated , but now bin/...
0
votes
0
answers
30
views
Shopware 6 calculate Promotion discounts on products
Im programming a Shopware 6 plugin right now to track prices of products including promotions. Is there a method or function to retrieve all products with their new prices that match a specific ...
2
votes
0
answers
40
views
Shopware 6 error when i run cypress tests [closed]
When i run cypress tests on my shopware 6.5.6.1 instance i get the following error:
cy.request() failed on:
http://localhost/cleanup
The response we received from your web server was:
> 404: Not ...
1
vote
0
answers
48
views
How to extend Data to product
I want to add data to a product, when adding this item to the cart. I am adding dynamic data as an extension, so that I am able to change the product price.
When setting the extension in the ...
2
votes
1
answer
34
views
Indexing-Loop of PaymentMethods in Shopware 6
Recently I encountered a strange problem when indexing payment methods in Shopware: it results in an endless loop of PaymentMethodIndexingMessages in the queue. After each handling of one message a ...
1
vote
1
answer
27
views
Remove error already added in error collection. The cart error isn't removed - shopware6
How to tackle this issue?
I add the error into the error collection, but every time a validation is done, I think $errorCollection is re-initialized, hence it's null. And previously added error are ...
2
votes
1
answer
42
views
Redirect Customer To Product Details Page After Login in Shopware 6
How do I redirect customers to the product details page after login.
I tried the following code
{% set redirectTo = "frontend.detail.page" %}
{% set redirectParameters = "...
1
vote
0
answers
22
views
Shopware 6 Api get product listing by category id with product properties
I want to fetch a product listing by category. The documentation says that I can also fetch the product properties: https://shopware.stoplight.io/docs/store-api/cf2592a37b40b-fetch-a-product-listing-...
0
votes
0
answers
8
views
Is it possible to bulk import snippets from a file?
We want to move our translations to Shopware backend. To make this a lot easier and safe I want to import these. I did find some documentation for Shopware 5 but not for Shopware 6.x.
0
votes
0
answers
36
views
Shopware 6.4 Cache tag "translator.error.VIOLATION::IS_BLANK_ERROR" contains reserved characters "{}()/\@:" Error
I want to create a register and login modal popup on the product details page on Shopware 6.4. When I include the login.html.twig template, everything works fine, but when I include the register.html....
1
vote
0
answers
49
views
Calculate shipping costs by weight outside of cart in Shopware 6
I try to show the customer the possible shipping costs dynamically on PDP in Shopware 6. I tried already something like this:
/**
* @Route("/shipping-cost", name="frontend....
0
votes
0
answers
48
views
Product Entity how to add properties asociacion
I am using cbax/modul-manufacturers plugin to get all products from the specific manufacturers on the product page. The problem is that I need product properties unfortunately this plugin during the ...
2
votes
3
answers
83
views
Shopware 6 How can make I create filter with custom field?
How can I create filter with customfields?
I update the Shopware 5 to Shopware 6 and some of my fields into customfields (eg: migration_ComuMess5_product_series, migration_ComuMess5_product_author, ...
3
votes
0
answers
36
views
Shopware 6 API - Is there any way to get the full exception in the response?
I am trying to get the full exceptions in API responses from the Admin-API of Shopware 6.
If the Shopware 6 Admin Api throws an exception, it's always truncated. No matter if in 'dev' Mode or 'prod' ...
1
vote
1
answer
43
views
EntityExtension ManyToMany via Store API
I wrote an EntityExtension for products:
class ProductExtension extends EntityExtension
{
public function extendFields(FieldCollection $collection): void
{
$collection->add(
...
1
vote
0
answers
27
views
How can I get the label of custom field in shopware 6?
I try to get the label of custom field in shopware 6. I already know how to get the technical name.
After various searches, I found this: https://developer.shopware.com/docs/resources/references/adr/...
1
vote
2
answers
71
views
Shopware 6 Plugin: How can I check wildcard emails against a blacklist
I have developed a Shopware 6 plugin that checks if an email is in a blacklist before allowing reviews. It works but currently does a database query for every email being checked. If I am in a ...
1
vote
0
answers
36
views
Product field not filled in Shopware 6.5
I added a own field by extending the product model. I also extended the templates, so the field is shown in the product edit detail view. If I enter some value into the field and save, it gets saved ...
3
votes
1
answer
55
views
Populate custom fields when creating an order through the Store API
We're using the store-api/checkout/order endpoint to create an order in Shopware. All working fine, but we also want to populate some customFields from the order. It seems the body can only contain:
{
...
0
votes
0
answers
35
views
Shopware 6, how to add custom logo to theme.json when creating new plugin?
I tried to do it with this url app/storefront/src/assets/logo.svg but it didn't work
and then I tried this url app/storefront/public/bundles/logo.svg and app/storefront/dist/assets/logo.svg and enter ...
3
votes
1
answer
33
views
How to reliably use a service from a Showpare 6 store plugin in my our plugin without issues
We have installed a plugin from the Shopware 6 store via composer.
For our own features, we want to use a service from the plugin.
Because plugins in shopware 6 can be uninstalled and/or deactivated, ...
0
votes
0
answers
21
views
Extending Plugin Template in a Child Theme
I have created a child theme to make some modifications to the existing design. Along with other changes, I am trying to extend the "amazon-pay-button.html.twig" template from the ...
0
votes
1
answer
31
views
Can’t install test app on self hosted Shopware 6 shop
I’m trying to install my custom app on self-hosted shopware 6 shop. I’m using shopware version 6.4.20.2.
I can’t understand why I can’t install test app. Look indo SW docs and it telling me, that app ...
0
votes
2
answers
52
views
How can I programatically hide specific payment method in Shopware 6
I am trying to hide certain payment method (a custom one, let's call it MyPaygate) on checkou/confirm page if certain currency is selected. I have tried several different aproaches, but nothing worked....
0
votes
0
answers
50
views
Event to catch submitting all forms in shopware 6
I am trying to add functionality that will save data from forms in the database. My problem is to detect the submission of all types of forms. I see there are some events like ContactFormEvent etc. ...
0
votes
1
answer
46
views
Shopware 6: Don't list products with no price rule for customer group
In Shopware 6 we have a Rule for each customer group. Products then have price rules for these customer groups.
Works all good so far, when I login the customer I can see the correct prices.
Problem: ...
2
votes
0
answers
28
views
How do I import npm package assets into my Shopware 6 plugin?
For my Shopware 6.4 plugin I added a npm packages as dependency.
I read the documetation about including NPM packages in plugins, but I cannot get it to work to add the images of the NPM package.
The ...
1
vote
0
answers
26
views
Resend activation link for inactive customer with double opt-in
When using the register endpoint with enabled double opt-in, the customer gets a registration link. If they do not use the link, the account will be inactive. When the user tries to login later, they ...
0
votes
1
answer
67
views
Shopware 6 plugin: Override styles not applying in component SCSS
I'm working on a Shopware 6 store and trying to override some default styles of the sw-extension-card-base component. I've created the following files:
My index.js looks like:
import template from './...