Possible to show products in a list?

Hello,

I want to show my products only in a listview with small images. 

Is there a possibility to reach this option via standart settings?

A very good standart view is whrer I can edit my shopping cart.

Hi,

you can change the behaviour on how products are listed in shopware for each shopping experience individually in the element of your listing.
Just navigate to "shopping experiences -> search for your category listing -> click on the element to configure it (upper right side of the element) and choose the layout type. 
In standard there are three types: Standard, Big image, Minimal content.
If you want to have more, you would need to add the layout types to the shopping experiences template e.g. within a plugin

Kind regards,
Tim 

Hello @sasclan .

As @timbrns said you have to extend the config files of the specific cms elements.
I also needed a list view for the category listing and I can give you, and for anyone looking for the same problem, a quick example of how you can achieve that.


First you have to extend the twig view of the „product-listing“ elements config:

yourPlugin/src/Resources/app/administration/src/module/sw-cms/elements/product-listing/config/sw-cms-el-config-product-listing.html.twig

{% block sw_cms_element_product_listing_config_layout_select_options %}
    {% parent %}
    <option value="list">
        {{ $tc('sw-cms.elements.productBox.config.label.layoutTypeList') }}
    </option>
{% endblock %}

After that you need to overwrite die JS Component of the elements config.

yourPlugin/src/Resources/app/administration/src/module/sw-cms/product-listing/image/index.js

import template from './config/sw-cms-el-config-product-listing.html.twig'
const { Component } = Shopware;

Component.override('sw-cms-el-config-product-listing', {
    template
});

For your changes to be applied you need to rebuild the administration with following console command.

./bin/build-administration.sh

To achieve visible changes you only need to customize the storefront views and create your own listing.

Best regards
Reinhard

1 „Gefällt mir“