@bernhard Not sure if anyone else has seen this issue but on a fresh install RockGrid isn't detected.
Tracy shows this warning:
Fix:
<?php
// ...rest of module
// use product variations?
if (!wire()->modules->isInstalled('RockGrid')) {
$fs->add([
'type' => 'markup',
'value' => 'Product variations require RockGrid>=1.3.0. Please install RockGrid first.',
]);
} else {
// check if RockGrid is at least 1.3.0
if (version_compare(wire()->modules->get('RockGrid')->config->version, '1.3.0') < 0) { // Add ->config before accessing ->version property here
$fs->add([
'type' => 'markup',
'value' => 'Product variations require RockGrid>=1.3.0. Please update RockGrid to the latest version.',
]);
} else {
$fs->add([
'type' => 'checkbox',
'name' => 'useProductVariations',
'label' => 'Enable Product Variations',
'checked' => $this->useProductVariations ? 'checked' : '',
'columnWidth' => 100,
'notes' => 'When checked, RockGrid and all related fields will be installed.
Once installed, unchecking the box will not remove the module or fields, it will just not use them.',
]);
}
}
// ...rest of module
Works like a charm!