ZMObject
└─ZMWidget
└─ZMReservedQtyWidget
public class ZMReservedQtyWidget
extends ZMWidget
| Method Summary | |
|---|---|
| void | Create new instance. |
| protected array | getStats() Get stats. |
| string | {@inheritDoc} |
| Methods inherited from org.zenmagick.mvc.widgets\ZMWidget | |
|---|---|
| __construct, getDescription, getTitle, isEnabled, render, setDescription, setEnabled, setTitle | |
| Methods inherited from org.zenmagick.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton | |
public void __construct()
Create new instance.
protected array getStats()
Get stats.
public string render(ZMRequest request)
Get the HTML to render this widget.
Display reserved qty.
This widget relies on the fact that arbitrary properties can be set to
ZMObjectbased classes. The quick edit plugin does exactly that by setting the current product for each row. That, in turn, is then used to calculate the reserved quantity for the given product.