Closed X-Tender closed 4 weeks ago
I've encountered the same problem.
Add 'default' => 0, in the array _frontend_usergroup => config inside _Configuration/TCA/tx_cartproducts_domain_model_productquantitydiscount.php
'frontend_user_group' => [
'exclude' => 1,
'label' => $_LLL . ':tx_cartproducts_domain_model_product_quantitydiscount.frontend_user_group',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'readOnly' => 0,
'foreign_table' => 'fe_groups',
'size' => 1,
'items' => [
['', '0'],
],
'minitems' => 0,
'maxitems' => 1,
'default' => 0,
]
],
When having a zero as second value and the field is of type int(10) in the database, make sure to define the default value as well in TCA: 'default' => 0. Otherwise issues may arise e.g. with MySQL strict mode.
https://docs.typo3.org/m/typo3/reference-tca/master/en-us/ColumnsConfig/Type/selectSingle.html#items
Btw. this issue is fixed in pull request #64
Will close the ticket as it's closed as written above.
When I add one of the Options without setting a Frontend Group (Because I want that everybody get the option) then I get the following error in the Backend.
2: SQL error: 'Incorrect integer value: '' for column 'frontend_user_group' at row 1' (tx_cartproducts_domain_model_product_quantitydiscount:NEW5eea0288ed4dd577483646)
When I set a Frontend group everything works fine.