Hello,
We encountered a bug in with adding a variable product (SKU Options are not saving in data base)
2 Answers
Best Answer
Hello,
The issue is fixed now, its due to a bug in the latest Laravel update and we did a workaround to, please update the foundation module to 5.2
Best Regards.
It is working well now, Thank you
Please login or Register to submit your answer
Hello Mohammad, to be able to help please provide is with the following:
1) steps to reproduce the issue
2) screenshots of the errors
3) log file under storage/log/laravel.log
Thanks
nothing in log file
I think the error is in this function
Corals/modules/Ecommerce/Http/Controllers/SKUController.php
protected function createOptions($request, $sku)
{
$sku->options()->delete();
$options = [];
if (isset($request->options)) {
foreach ($request->options as $key => $value) {
if (is_array($value)) {
foreach ($value as $value_option) {
$options[] = [
‘attribute_id’ => $key,
‘value’ => $value_option
];
}
} else {
$options[] = [
‘attribute_id’ => $key,
‘value’ => $value
];
}
}
$sku->options()->createMany($options);
}
}
because there is no column called value