From 54fa3419f304c7be8530cbc855df7296efb1ce76 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Wed, 26 Jun 2019 21:03:52 +0530 Subject: [PATCH] admin name for attribute --- packages/Webkul/Checkout/src/Cart.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index d5e023ae1..795d7557c 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -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);