Hi, just start with prestashop.
Currently adapting my first module, named "PSWidget".
Module adds smarty function {pswidget} + custom html renderer.
Module description:
0. Install pswidget module
1. Navigate to Preferences - PSWidget
2. Add new pswidget item with name (i.e. "test") and text field filled
3. Modify your whatever-template.tpl, adding pswidget call
{pswidget action="text" id="test" cache=300}
4. Refresh page to see changes
Draft code available:
https://github.com/rustyJ4ck/pswidget/
Has some questions:
1.
How to change default selected value for radios: from No to Yes?
array(
'type' => 'radio',
'label' => $this->l('Raw:'),
'name' => 'raw',
'required' => false,
'is_bool' => true,
'class' => 't',
'values' => array(
array(
'id' => 'pswidget-b-2',
'value' => 1,
'label' => $this->l('Yes')
),
array(
'id' => 'pswidget-b-2',
'value' => 0,
'label' => $this->l('No')
)
)
),
2. How to implemet instant checkbox change in list view (like active=status)
'plain' => array(
'type' => 'bool',
'title' => $this->module->l('plain'),
'width' => 40,
'align' => 'center',
//? 'callback' => 'printPlainIcon'
),
Thx.