Giter Site home page Giter Site logo

docs's Introduction

Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads Crowdin License GitHub closed pull requests Slack

Shopware

Modern open source e-Commerce

Tweet

Shopware 6 is an open headless commerce platform powered by Symfony 7 and Vue.js 3 that is used by thousands of shops and supported by a huge, worldwide community of developers, agencies and merchants.

If you like Shopware 6, give us a ⭐️  on Github!

Table of contents

Project overview

To discover the features of Shopware and what sets us apart from other e-commerce systems, take the feature tour on the Shopware home page.

From a developer's perspective, here are some highlights that make Shopware easy and fun to work with:

Platform and Framework

Shopware itself is based mainly on Symfony and VueJS. It is a fully functional e-commerce platform, but it is also an e-commerce framework.

Shopware is:

Installation

Extending Shopware

There are already a lot of extensions available in the Shopware store.

After setting up Shopware locally for development, you can start with our extension guides in the documentation.

The preferred way of extending Shopware is through the App System. If the feature you want to implement needs direct access to the Shopware process and the database, you can also use the plugin system.
You can find an overview and differentiation in the documentation.

Production setup

The easiest way to run a Shopware shop is booking a commercial plan in the Shopware cloud, a fully managed setup, ready to use.

The recommended way for on-premise shops is installing Shopware through the flex template. To unlock the full potential Shopware has to offer, commercial plans are also available for on-premise.
These plans enrich your shop with unique functionality, giving you an additional advantage over your competition.

There is a list of hosting partners, who offer a pre-installed shop, making your start a lot faster.

We also provide a web-based installer, the documentation walks you through the necessary steps.

Code Contribution

If you have decided to contribute code to Shopware and become a member of the Shopware community, we appreciate your hard work and want to handle it with the most possible respect. To ensure the quality of our code and our products we have created a guideline we all should endorse to. It helps you and us to collaborate. Following these guidelines will help us to integrate your changes in our daily workflow.

Read more in our contribution guideline or in our short HowTo contribute code.

Contribution setup

There are multiple ways to get an installation running, the way with the fewest steps involved is using the contribute image from dockware, a community maintained docker setup by the Shopware agency dasistweb. More on this in the documentation.

The Shopware CLA

When submitting your code to Shopware you automatically need to sign our CLA (Contributor License Agreement). This CLA ensures that Shopware will stay an open and living product. In short, you give the explicit right to use your code in Shopware to shopware AG.

Authors & Contributors

Shopware is built with the help of our community.

You can find an overview of everyone who contributed to the platform repository in the official github overview. Additionally there are numerous people contributing to the ecosystem through activities not related to the codebase. Thank you all for being part of this!

License

Shopware 6 is completely free and released under the MIT License.

Bugs & Feedback

No software is perfect, Shopware is no exception. Should you spot a bug, please report it in our issue tracker.

If you want to suggest features or how certain parts of Shopware 6 work, we'd be happy to hear from you.

Reporting security issues

Please have a look at our security policy.

docs's People

Contributors

aydinhassan avatar bojanrajh avatar christian-rades avatar dfrancos-hub avatar dneustadt avatar dominik28111 avatar elkmod avatar example123 avatar fschmtt avatar github-actions[bot] avatar hoelshare avatar isengo1989 avatar joshuabehrens avatar keulinho avatar leichteckig avatar lernhart avatar marcelbrode avatar niklaslimberg avatar oliverskroblin avatar riconeitzel avatar runelaenen avatar schrank avatar sdenter avatar shyim avatar ssltg avatar sushmangupta avatar swsrmes avatar tinect avatar tobiasberge avatar wirduzen-felix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Admin API / range filters: time zone ignored in timestamp parameter

Description
Shopware version: 6.4.0.0

When POSTing search queries like the following one to /api/search/order:

{
  "filter": [
    {
      "type": "range",
      "field": "createdAt",
      "parameters": {
        "gte": "2021-05-11T05:00:00.000+02:00"
      }
    }
  ]
}

I noticed that the time zone +02:00 in "gte": "2021-05-11T05:00:00.000+02:00" seems to be ignored. Apparently, the parameter is always interpreted as UTC, regardless of the specified time zone.

Possible Solution
Please state this fact in the documentation and reject time zones != UTC, or honor the time zone in the parameter.

Browser Compatibility

In the old documentation we used to mention browser compatibilities of our components Storefront & Admin as such:

Browser Compatibility Note:

Administration

All browsers in the latest version (Edge, (no IE), Chrome, Firefox, Safari, Opera)

Storefront

All browsers in the latest version and additionally IE 11


We should add that information to the respective concept page of the components Storefront, Admin & PWA.

@chrissor
@htkassner
@patzick

Update e2e testing section

I am sorry before hand if this sounds like a rant but I don't think this is a way how you get any pull requests merged that support the admin development. How do you onboard employees like that?

Imagine I have a pull request that changes something in the admin. I made a few in the past and I am writing this for the recent shopware/shopware#2604. I get the info I shall make some e2e tests due to a new e2e 100% policy. I am not new to cypress but the testing setup seems super complex. https://github.com/shopware/platform/runs/7350608959?check_suite_focus=true fails. In there is a composer run e2e:cypress. This just don't work out of the box. I have the MacOS cypress app installed. So I thought there are likely some docs. They are still using ./psh.phar so I have to learn how ever the new way is. The docs state about a target called e2e:init. This is no composer script but there is e2e:setup. That is not far away from init, right? I run it. I see that it joinks my complete database. Could annoy someone else. It also calls e2e:prepare. Now I am prepared. Now I can call composer run e2e:cypress. Command cypress not found. I have no idea why it is not found. I have it installed locally, right? Likely the docs of cypress help me. They say you can install as an npm dep. I found it used in tests/e2e. Why was there not a single hint on my way pointing towards this? Ok, maybe I just copied the wrong command from the failed pipeline. I see the step before runs composer run setup

image

Ok, well. I just run composer run setup it looks like it runs composer run init:e2e (which might be something different than e2e:setup and e2e:prepare), right? The rendering of Github Actions fooled me. Because they just stated the first command and the indention felt to me like it was triggering the others. So finally I came to the idea to run composer run init:e2e.

How can people work like this on their own? I like could have a less bad journey when I just swapped e2e:init to init:e2e and was on a good way. But these composer scripts have so many soft dependencies and the docs are outdated. I am not sure whether others have the same endurance to work out how they can even run tests before they abandon the pull request.

Adjust reading and writing data guides regarding ManyToMany issues

#19 (comment)

I like the comparison to show the pitfall. The scenario up front reads a bit colloquial but not totally made up. I just think it is not nice from the docs to tell the reader they "messed" up.
There is an other pitfall I like to have mentioned in the docs somehow. The product_category.repository can't be used to search as it is a MappingEntityDefinition and it will crash. From my POV I'd say: I can just iterate product_category and look for my entry/search for my entry and just update the category id. I don't want to state that you should say: you can't iterate over mapping entities by design. This can be a bit disappointing (hit me already). But you can mention that you can't update it e.g. by the following reason: When you call update you pass the primary key(s). In that case you have two. You can't update primary keys and thus you can't update the entry but have to delete and create it. Additionally you can suggest to iterate the categories from the product entity so they don't think of my iteration case.

TL;DR:
Mention that mapping entities can neither be read, nor written / updated.

style color for sw_icons don't work

I am using shopware 6.4.1.0 and just tried to insert an shopware icon to my theme like mentioned in:

shopware/docs/guides/plugins/themes/add-icons.md

Therfore the code

{% sw_icon 'shield' style {'color': 'white'} %}

is supposed to insert a white shield icon, but it is inserted with a grey color.

Document new/better way to add filters to the storefront

The current plugin guide portion on adding filters to the storefront recommends to overwrite-with-parent() the last filter provided by core (which happens to be, as of this writing, the "shipping-free" filter).

After platform pull request #2247 (which has been merged, but is not yet part of a release), this should be replaced with a recommendation to overwrite-with-parent() the new block block component_filter_panel_items, which is a more robust solution.

I am happy to roll a pull request for this doc change, but I am uncertain as to whether it is appropriate to do it right away - regardless of when the change will be released, the doc change should go only in the docs for the next major release 6.5 (because there are several 6.4 versions that do not contain the new block).

Inaccurate directory diagram for extended administration modules

In the section Creating your new component of the "Add tab to existing module" chapter, the following diagram is missing the second-level src folder under the administration root one:

administration
├── page
│   └── sw-product-detail
│       └── sw-product-detail
│           ├── index.js
│           └── sw-product-detail.html.twig
├── view
│   └── sw-product-detail-custom
└── main.js

This is in contrast with what's stated elsewhere in the same chapter. For example, within the reminder box towards the end of the "Prerequisites" section:

The main entry point to customize the administration via plugin is the main.js file. It has to be placed into a /src/Resources/app/administration/src directory in order to be found by Shopware 6.

Adding custom rules example doesn't add them to dynamic group rules

I just tested the Custom rules Example and it doesn't seem like this example also adds the rule to dynamic product groups. So i think there is a difference between these two components, but i can't find a doc article about adding custom 'dynamic product group rules' or at least an article about the system behind them.

MainProduct cannot be a variant?

Description
We try to import some products via repository that gets stuck on variants.
We have many products differ in colours. One colour is the mainProduct containing configuratorGroupConfig and configuratorSettings.
The variants relating ProductListingTest.php#L250 with options. These options in mainProduct are getting ignored.

While doing this, just the variants (with parentId) are displayed in storefront. In administration, we need to generate the missing color-variant, but this results in a new productNo - which is wrong.

Is this intended? I think, nobody wants to add pseudo-mainproducts :-)

Possible Solution

Additional context

Increment Storage / Number Ranges Documentation is missing dependency on shopware.cart.redis

When configuring the increment storage and number ranges to use redis as described in the documentation the shopware console generates the following error:

The service "Shopware\Core\System\NumberRange\ValueGenerator\Pattern\IncrementStorage\IncrementRedisStorage" has a dependency on a non-existent service "shopware.cart.redis"

I think the documentation should be expanded to also include that it is necessary to configure shopware.cart.redis_url as well.

It's possible that this is only a dependency for either the number_ranges or the increment storage.
I configured both simultaneously and the error message contains both parts in the mentioned path.
I did not investigate this further as everything seems to work after adding shopware.cart.redis_url as well.

https://github.com/shopware/docs/blob/master/guides/hosting/performance/number-ranges.md
https://github.com/shopware/docs/blob/master/guides/hosting/performance/increment.md

Bash examples contain ">" in front of command, resulting in overwriting the command

Hi, there is an issue with the bash examples, eg here:

https://developer.shopware.com/docs/guides/installation/docker

> ./psh.phar docker:start

The problem is that the > character in front of the command is also copied into clipboard if I click on the "copy code" button.
If I paste the command into terminal and execute it, the file ./psh.phar will be overwritten with nothing. The file is simply empty and I need to redownload psh.phar and make it executable again.

Solution would be: remove the > in front of the command or make it unselectable via css / script.
I just found it in the docker docs part but there might be more of these > characters inside the docs.

These docker instructions no longer work

I see these shopware install docs have been updated recently, with docker install supported. However, the only place in the Shopware repos I can find the requisite yml files for the docker command to function (https://github.com/shopwareLabs/shopware-docker), the repo hasn't been maintained for 3 years and the commands no longer work.

Can you clarify where the source repo is that work with the commands referenced?

Critera Instance with ids?

On this page on line 48 is "new Criteria()" mentioned:
docs/resources/references/core-reference/dal-reference/filters-reference.md

But Criteria needs an array of id's in the future.

Unclear documentation for read-only entity extension fields

I wanted to create an entity extension containing a "field without database" but got confused by the docs.
There are so many open questions and assumptions.

What are the field-types for? It seems to have no effect if I use a "BoolField", "StringField" or anything else.

What should I add as an extension? "Please note that its second parameter [...] has to be a struct" is too unspecific.

And what does the customString-value from the example do? Doesn't get used anywhere.

Also, the example doesn't add up it seems.

Here it gets defined as a StringField:

(new StringField('custom_string', 'customString'))->addFlags(new Runtime())

But later on, it gets assigned an ArrayStruct?

$productEntity->addExtension('custom_string', new ArrayEntity(['foo' => 'bar']));

When I follow it, it works but is confusing as hell, when I look at the dump of the entity:

#extensions: array:1 [
    "custom_string" => Shopware\Core\Framework\Struct\ArrayEntity {[#2836]()
      #data: array:1 [
        "foo" => "bar"
      ]
      #_entityName: "array-entity"
      #_uniqueIdentifier: null
      #versionId: null
      #translated: []
      #createdAt: null
      #updatedAt: null
      #extensions: []
      -_entityName: null
    }
  ]

Here, custom_string is not the name of the field as expected, but of the extension? How can it be defined as a "StringField" but not return a string?

Reading plugin configuration in administration

is there a way to read the plugin configuration inside of an administration component?

I already found something to inject the 'systemConfigApiService', but all of my calls are responding with errors.

So when there is a way please document it :)

Reading config values without sales channel id

The documentation links to this project and shows the same code as in src/Subscriber/MySubscriber.php. Generally that was a good starting point for me to get a plugin with its own configuration running. But as we have more than one sales channel in our installation, the read values seem to be empty, if there is a value (vor any setting) on a sales channel, but not globally.

This is not even me failing here, there seem to be plugins expecting SystemConfigService->get() to automatically use the current sales channel for reading config values, leaving away the second argument.

Reading the code in SystemConfigService->load(), the settings are read from the global context instead, if the second parameter is left away. Is that right?

If yes, this should be stated clearly in the documentation, before many others scratch their head about their non working sales channel configuration.

Add a way to reference custom assets in admin modules CSS

Description
Documentation exists on how to use custom assets in our admin modules:
https://developer.shopware.com/docs/guides/plugins/plugins/administration/using-assets#use-custom-assets-in-the-administration

However, this documentation only explains how to USE these assets using the asset filter in TWIG templates.
If we want to reference custom fonts and other assets in our CSS files, we cannot use this filter.

This is a problem, because the path to these assets differs, whether or not you are using the webpack server in the dev environment (using psh.phar administration:watch) or you're using the prod environment.

Make understandable instructions and examples

Shopware documentation is very unclear and complicated.

This page is an example howthe doc is written: https://developer.shopware.com/docs/guides/plugins/plugins/framework/data-handling/add-complex-data-to-existing-entities
To add one simple field to an entity you have to:

  • create plugin (go to other page)
  • create custom extension class
  • make dependency injection (go to other page)
  • learn about oneToOne association (go to other page)
  • create ExampleExtensionDefinition (what is that? is it an official name? you don't mention)
  • create new entity (go to other page)
  • register field in DI container (I guess it is 'dependency injector', nice that you do this unclear abbrevations)
  • create database table using database migration (go to other page)
  • learn about repositories and writting data (go to other page)

All these only to add one field to a product. And the way it is explained is very disorderly.

plugin:create nowhere to be seen in the "Plugin Base Guide"

The Plugin Base Guide explains how to manually create a plugin from scratch without relying on CLI's create command, seemingly suggesting by omission that there is no command for generating the plugin's skeleton.
For experienced readers, that may be obvious. But assuming the target audience is wider, explicitly mentioning plugin:create within the "Create the plugin" subsection would do no harm. Not least because the presence of blog posts like this one or this other one on the web about precisely the same subject clearly points to that omission being a significant gap in the official dev docs.
In the worst case scenario, if the reader happens to be aware of other commands such as theme:create, the assumption may be that you can only scaffold plugins automatically as initial themes, with the subsequent unnecessary bloating the theme-specific code introduces for something not meant to be a theme in the first place. This was my case.

Searching the documents in Github is more helpful than on the actual page

grafik
grafik

I was looking for the order of the indexing commands. I had a preview and immediately saw the infrastructure content preview in the Github search. On the actual documentation page the sidebar is quite stale and non-descriptive. It was the third hit I was looking for but how do I know that this order stays the same?

manifest.xml

Application Icon doesn't work in

meta...
Resources/icon.png
...meta

The path is correct. Have anyone a solution or another example?

Docs for EntityExtensions with OneToOneAssociationFields and EntityExtension inheritance

Please describe the feature you would like to see implemented.

Would be nice to have official documentation and an example for OneToOneAssociationFields.

I tried to expand the product entity with a OneToOneAssociationField and came across countless questions and problems.

Problems I have encountered:

  • If "autoload" is set to "true" in the product extension and my custom entity, shopware breaks totally and i get an HTTP-error 503 on most of the Endpoints. Is this a Bug?.
  • Inheritance does not seem to work properly if OneToOneAssociationFields are used to extend the product.

Mix between {code} and code fences

When reviewing I see a mix of {code}-tags and ``````-fences. Is this just personal preference or do they behave differently? Is this on purpose?

Document necessary step for testing in production template

This section provides guidance on how configure/run unit tests for plugins when using the production template.

As far as I can see, the section is incomplete because it does not outline the necessary steps to ensure that the plugin to be tested is loaded in the testing environment - this becomes an issue in particular if the tests rely on services defined by the plugin (and perhaps in other circumstances).

In the production template, one has to create a custom bootstrap file, like so (modeled on the TestBootstrap.php file in core:

<?php declare(strict_types=1);

namespace ...;

use Shopware\Core\TestBootstrapper;

(new TestBootstrapper())
    ->setPlatformEmbedded(false)
    ->addCallingPlugin()
    ->setForceInstallPlugins(true)
    ->bootstrap();

The important lines are the calls to addCallingPlugin() (ensuring that the plugin to be tested is active) and to setForceInstallPlugins()(because otherwise, the previous call is ignored if the test database exists already).

(In the development template, this is not necessary, since (I believe) ./psh.phar init-test-databases ensures that the plugin to be tested is active in the test database).)

As it stands, following the steps in the referenced section will lead to a faulty testing environment (unless you happen to execute for the first time when the test database does not exist yet), so I really think this should be documented.

Amend sample `phpunit.xml.dist` for plugins to ignore Symfony deprecations

The doc page on how to run unit tests for plugins includes a section with a recommended PHPUnit configuration file.

Using this as is, I get a deprecation notice triggered by Symfony:

 3x: Since symfony/framework-bundle 5.3: Accessing the "session" service directly from the container is deprecated, use dependency injection instead.
    2x in ClassesInstantiableTest::clearSessionAfter from ...
    1x in ClassesInstantiableTest::clearSessionBefore from ...

This notice has nothing to do with the tests I've written, the notices are instead triggered by the way Shopware\Core\Framework\Test\TestCaseBase\SessionTestBehaviour (used by the ubiquitousIntegrationTestBehaviour) is written.

The core phpunit.xml.dist supresses Symfony deprecations by setting

<env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled" />

I propose that the recommended PHPUnit configuration files for plugins do the same, to avoid confusion.

(In the process of fixing this, the schema version used by the recommended configuration file should probably be adjusted, as well - the version in the current docs uses 7.1, while core uses 9.5.)

Deployment with Deployer

The Deployment with Deployer Docs page is outdated and do not work with the latest version of shopware.
The article should be updated or provided with a note that this is outdated and only works up to version 6.3.*

Shopware is awesome 🛒💙

Probably missing docu only - Variants - Store API - How to filter to main variant or all variations and how to select a product based on selected options?

Description
This probably is already possible but in that case it is missing from the documentation.

List route

  • How do you limit that API to main variants only?
  • How do you limit that API to show only variants and exclude the main product.

If I understand this correctly the store api product listing response takes the Storefront presentation settings into account?

If so, this really should be documented. Also it shouldn't be called storefront presentation as it is also available in headless mode.

Detail route
It is nice that the route delivers the configurator settings and all options but how do you find the corresponding variants for that options? In storefront there is the route frontend.detail.switch but how do you do this easily with the store API? Sure I can do a search/list route call for this but somehow that does not seem like the best/easiest solution.

Maybe also just missing documentation.

NGINX Template prevents xml feeds from loading

The current NGINX Template prevents XML Feeds from loading as NGINX tries to serve them as static files. In case of the XML Feeds however they are generated by PHP and therefore NGINX only produces a HTTP 404

The location block: location ~* ^.+\.(?:css|cur|js|jpe?g|gif|ico|png|svg|webp|html|woff|woff2|xml)$ { needs to either not include xml files or you could add a try_files $uri /index.php$is_args$args; to fallback to php in case a file is not found

Missing "Edit page on Github"

Has the button been completely removed or has it been moved somewhere else?
Because I can't find the button anymore.

Regarding mistake on "Add CMS block" document of shopware 6

Hi,

On the "Add CMS block" documentation of shopware 6. There is a minor mistake in the documentation. The name of the scss file on the component folder is incorrect.

There is a line "create it now by adding the file sw-cms-block-image-text-reversed.scss to your component directory."

"my" word is missing on the scss file.

The correct file name should be "sw-cms-my-block-image-text-reversed.scss".
Screenshot_4

https://developer.shopware.com/docs/guides/plugins/plugins/content/cms/add-cms-block

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.