Updated refund with new product types
This commit is contained in:
parent
f8db35504c
commit
c8505d3fbc
|
|
@ -246,8 +246,14 @@
|
|||
<td>
|
||||
{{ $item->name }}
|
||||
|
||||
@if ($html = $item->getOptionDetailHtml())
|
||||
<p>{{ $html }}</p>
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
|
|
|
|||
|
|
@ -227,8 +227,14 @@
|
|||
<td>
|
||||
{{ $item->name }}
|
||||
|
||||
@if ($html = $item->getOptionDetailHtml())
|
||||
<p>{{ $html }}</p>
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
|
|
|
|||
|
|
@ -44,21 +44,4 @@ class RefundItem extends Model implements RefundItemContract
|
|||
{
|
||||
return $this->hasOne(RefundItemProxy::modelClass(), 'parent_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns configurable option html
|
||||
*/
|
||||
public function getOptionDetailHtml()
|
||||
{
|
||||
|
||||
if ($this->type == 'configurable' && isset($this->additional['attributes'])) {
|
||||
$labels = [];
|
||||
|
||||
foreach ($this->additional['attributes'] as $attribute) {
|
||||
$labels[] = $attribute['attribute_name'] . ' : ' . $attribute['option_label'];
|
||||
}
|
||||
|
||||
return implode(', ', $labels);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -110,11 +110,13 @@
|
|||
<tbody>
|
||||
@foreach ($order->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">{{ $item->getTypeInstance()->getOrderedItem($item)->sku }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->getTypeInstance()->getOrderedItem($item)->sku }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->name }}
|
||||
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
|
|
@ -126,10 +128,13 @@
|
|||
@endif
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">
|
||||
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">{{ $item->qty_ordered }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->qty_ordered }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -110,22 +110,31 @@
|
|||
<tbody>
|
||||
@foreach ($order->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">{{ $item->child ? $item->child->sku : $item->sku }}</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">{{ $item->name }}</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->child ? $item->child->sku : $item->sku }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">{{ $item->qty_canceled }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->name }}
|
||||
|
||||
@if ($html = $item->getOptionDetailHtml())
|
||||
<div style="">
|
||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||
{{ $html }}
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">
|
||||
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->qty_canceled }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Reference in New Issue