Quote:
Originally Posted by gior_08
|
Hi there.
I am assuming you are referring to a Yes/No button.
If so, you should make the following change to the module.
1. View/FormModel/Product/Info.php
Add the following line
Code:
$schema['default']['myMessage'] = [
'label' => static::t('My message'),
+ 'type' => 'XLite\View\FormModel\Type\SwitcherType',
'position' => 900,
];
2. Model/Product.php
Change from
Code:
@Column (type="string")
to
Code:
@Column (type="boolean")
That's pretty much it.
If you already have the demo module installed in your store, don't forget to drop the existing 'myMessage' column from the database before re-deploying. Otherwise it will most likely produce an error that data format is incorrect.