Variable product feature does not work

Variable product feature does not work

Laraship QuestionsCategory: TechnicalVariable product feature does not work
Mohammad sayed asked 2 months ago
Hello,
We encountered a bug in with adding a variable product (SKU Options are not saving in data base)
laraship
Staff replied 2 months ago

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

Mohammad sayed
replied 2 months ago

nothing in log file

Mohammad sayed
replied 2 months ago

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

2 Answers

Best Answer

laraship Staff answered 1 month ago
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.
 
Mohammad sayed
replied 1 month ago

It is working well now, Thank you

laraship Staff answered 1 month ago
Hello,
Our team is looking at, however regarding your note about column value, this variable is dynamic, see

public function setValueAttribute($value) 

at Corals/modules/Ecommerce/Models/SKUOption.php


BLACK FRIDAY

60% DISCOUNT ON OUR ENTIRE STORE
COUPON CODE : BLACK2020
GO TO STORE
LIMITED TIME OFFER
close-link
60% Off on all of LARASHIP platforms, plugins, and themes NO EXCLUSIONS
CODE: BLACK2020
close-image