Product options with checkbox field
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Product options with checkbox field
Hello,
is there a way to configure a custom options field as a checkbox on the product detail page?
On the demo page: http://typo3.demo.aimeos.org/demo/detai ... article/0/
there is a dropdown, a text, an integer and a date field. How can I create a checkbox?
Claudia
is there a way to configure a custom options field as a checkbox on the product detail page?
On the demo page: http://typo3.demo.aimeos.org/demo/detai ... article/0/
there is a dropdown, a text, an integer and a date field. How can I create a checkbox?
Claudia
Re: Product options with checkbox field
Use "client/html/catalog/attribute/type/<code>" -> "input"
Code: https://github.com/aimeos/ai-client-htm ... #L103-L125
Code: https://github.com/aimeos/ai-client-htm ... #L103-L125
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Product options with checkbox field
Hi,
thank you. I checked the code. In case of a custom attribute, the lines starting from 156 are relevant, not the ones which you highlighted.
So, only three types are accepted, currently: price, date and text (which is default).
I added a case for the checkbox:
Works like a charm.
Claudia
thank you. I checked the code. In case of a custom attribute, the lines starting from 156 are relevant, not the ones which you highlighted.
So, only three types are accepted, currently: price, date and text (which is default).
I added a case for the checkbox:
Code: Select all
<?php break; case 'checkbox': ?>
<input class="form-control" type="checkbox" name="<?= $enc->attr( $this->formparam( array( 'b_prod', 0, 'attrcustid', $id ) ) ); ?>" />
Claudia