Php – Shopware6: How to add a product to a cart?
TL;DR: how to create and add a LineItem from an existing product to the cart in a plugin? I'm trying to write a plugin to add a Product to a cart when it's not in it already, e.g. to always…
TL;DR: how to create and add a LineItem from an existing product to the cart in a plugin? I'm trying to write a plugin to add a Product to a cart when it's not in it already, e.g. to always…
Trying to extend property with one to many relation to be able to categorize each property group. I did the extension and the migrations. all Seems to be working fine except from saving the relation in the admin panel property…
I have a JS plugin in Shopware 6, that subscribes to two events of another JS plugin: One that fires after the user interacts with the page and one that fires at the end of init(). The latter does nothing.…
I'm working on a Shopware 6 plugin and encountering a warning related to accessing an array key that doesn't exist. Here's the relevant code snippet: $customFields = $order->getCustomFields(); $optin = null; if (array_key_exists('swag_product_reviews_optin', $customFields)) { $optin = $customFields['swag_product_reviews_optin']; } $text…
After successfully installing shopware on my machine, i was able to setup and open admin panel. but than if i open demo home page, this is what i see: what am i doing wrong here?
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.7.0. I would like to be able to…
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 scheduled task run…
I'm trying to add a custom dynamic SEO url, but when I save the entity in the administration I'm getting the error Route by name frontend.faq.category not found. The entity is saved, but the URL isn't generated. What am I…
I'm currently developing a Shopware 6 plugin called "SEO Friendly Pagination" that aims to make paginated URLs in product categories accessible to search engine crawlers. To achieve this, I have extended the pagination template to include invisible href elements for…
I am working on a shopware project that requires me setup a json of all orders that is processed. the json is stored in a directory which I have gotten out and passed to a variable fil. $filer = $order1->getOrderNumber()…