Merge pull request #75 from bagisto/jitendra

Issue fixed
This commit is contained in:
JItendra Singh 2018-10-25 15:25:51 +05:30 committed by GitHub
commit 710b3cb95d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 11 deletions

View File

@ -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,
];

View File

@ -55,7 +55,7 @@
<div class="summary">
{{ Cart::getItemAttributeOptionDetails($item)['html'] }}
{{ Cart::getProductAttributeOptionDetails($item->child->product)['html'] }}
</div>
@endif

View File

@ -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