admin name for attribute

This commit is contained in:
rahul shukla 2019-06-26 21:03:52 +05:30
parent 62cb90e014
commit 54fa3419f3
1 changed files with 2 additions and 2 deletions

View File

@ -635,12 +635,12 @@ class Cart {
$option = $attribute->options()->where('id', $product->{$attribute->code})->first();
$data['attributes'][$attribute->code] = [
'attribute_name' => $attribute->name,
'attribute_name' => $attribute->name ? $attribute->name : $attribute->admin_name,
'option_id' => $option->id,
'option_label' => $option->label,
];
$labels[] = $attribute->name . ' : ' . $option->label;
$labels[] = ($attribute->name ? $attribute->name : $attribute->admin_name) . ' : ' . $option->label;
}
$data['html'] = implode(', ', $labels);