Widget: add single-item-select shopping cart (Z#23131246) (#3633)

This commit is contained in:
Richard Schreiber
2023-10-16 10:56:00 +02:00
committed by GitHub
parent 7ee630928b
commit 3a26d6173e
5 changed files with 60 additions and 3 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

+18
View File
@@ -124,6 +124,24 @@ If you want to disable voucher input in the widget, you can pass the ``disable-v
<pretix-widget event="https://pretix.eu/demo/democon/" disable-vouchers></pretix-widget>
Enabling the button-style single item select
--------------------------------------------
By default, the widget uses a checkbox to select items, that can only be bought in quantities of one. If you want to match
the button-style of that checkbox with the one in the pretix shop, you can use the ``single-item-select`` attribute::
<pretix-widget event="https://pretix.eu/demo/democon/" single-item-select="button"></pretix-widget>
.. image:: img/widget_checkbox_button.png
:align: center
:class: screenshot
.. note::
Due to compatibilty with existing widget installations, the default value for ``single-item-select``
is ``checkbox``. This might change in the future, so make sure, to set the attribute to
``single-item-select="checkbox"`` if you need it.
Filtering products
------------------