commit
710b3cb95d
|
|
@ -659,17 +659,18 @@ class Cart {
|
|||
*
|
||||
* @return Mixed
|
||||
*/
|
||||
public function getItemAttributeOptionDetails($item)
|
||||
public function getProductAttributeOptionDetails($product)
|
||||
{
|
||||
$data = [];
|
||||
|
||||
$labels = [];
|
||||
|
||||
foreach($item->product->super_attributes as $attribute) {
|
||||
$option = $attribute->options()->where('id', $item->child->product->{$attribute->code})->first();
|
||||
foreach($product->parent->super_attributes as $attribute) {
|
||||
$option = $attribute->options()->where('id', $product->{$attribute->code})->first();
|
||||
|
||||
$data['attributes'][$attribute->code] = [
|
||||
'attribute_name' => $attribute->name,
|
||||
'option_id' => $option->id,
|
||||
'option_label' => $option->label,
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
<div class="summary">
|
||||
|
||||
{{ Cart::getItemAttributeOptionDetails($item)['html'] }}
|
||||
{{ Cart::getProductAttributeOptionDetails($item->child->product)['html'] }}
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
|
||||
<div class="summary" >
|
||||
|
||||
{{ Cart::getItemAttributeOptionDetails($item)['html'] }}
|
||||
{{ Cart::getProductAttributeOptionDetails($item->child->product)['html'] }}
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue