::use 'contractadmin/design.mtt'::

::_("Products")::

$$insert(::_("New product")::,/product/insert/::c.id::) ::_("Import from Excel/CSV"):: ::if !c._amap.hasTaxonomy():: ::_("Categories"):: ::end::

::if c.hasStockManagement():: ::end:: ::foreach p c.getProducts(false):: ::if p.active==false:: ::set opacity=0.4:: ::else:: ::set opacity=1:: ::end:: ::end::
::_("Product ID||id or reference of a product"):: ::_("Name"):: ::_("Price"):: ::_("Stock")::
$$nullSafe(::p.ref::) ::p.name:: ::if p._unitType!=null && p.qt!=null:: ::p.qt:: ::unit(p._unitType,false):: ::end:: ::if !c._amap.hasTaxonomy()::
::foreach c p.getCategories():: ::c.name:: ::end::
::else::
::p.getFullCategorization().join(" / ")::
::end::
::if p.organic ::::end:: ::if p.variablePrice ::::end::
::formatNum(p.price):: ::currency():: ::if c.hasStockManagement() :: ::if p.stock==null:: - ::else:: ::if p.stock <= 10:: ::p.stock:: ::else:: ::p.stock:: ::end:: ::end:: ::end::
$$edit(::_("Edit")::,/product/edit/::p.id::) ::_("Picture"):: $$delete(::_("Del.")::,/product/delete/::p.id::?token=::token::)

::_("Check all")::
::_("Enable"):: ::_("Disable")::

::end::