Commit 17d0c5f5 by halweg

fix : fix thumb sort

parent 19449ca3
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace Joshine\Sales\Plugin; namespace Joshine\Sales\Plugin;
use \Magento\Catalog\Helper\Image as ImageHelper; use \Magento\Catalog\Helper\Image as ImageHelper;
use Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer;
class DefaultRendererPlugin { class DefaultRendererPlugin {
...@@ -40,4 +41,13 @@ class DefaultRendererPlugin { ...@@ -40,4 +41,13 @@ class DefaultRendererPlugin {
return $result; return $result;
} }
public function afterGetColumns(DefaultRenderer $subject, $result)
{
if (isset($result['image'])) {
unset($result['image']);
$result = array_merge(['image'=>'col-image'], $result);
}
return $result;
}
} }
\ No newline at end of file
<?php
namespace Joshine\Sales\Plugin;
use \Magento\Catalog\Helper\Image as ImageHelper;
use Magento\Sales\Block\Adminhtml\Order\View\Items;
class ItemsSortPlugin {
public function afterGetColumns(Items $subject, $result)
{
if (isset($result['image'])) {
unset($result['image']);
$result = array_merge(['image'=>'Product Image'], $result);
}
return $result;
}
}
...@@ -3,4 +3,7 @@ ...@@ -3,4 +3,7 @@
<type name="Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer"> <type name="Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer">
<plugin name="order-view-image" type="Joshine\Sales\Plugin\DefaultRendererPlugin" sortOrder="1" /> <plugin name="order-view-image" type="Joshine\Sales\Plugin\DefaultRendererPlugin" sortOrder="1" />
</type> </type>
<type name="\Magento\Sales\Block\Adminhtml\Order\View\Items">
<plugin name="order-item-sort" type="Joshine\Sales\Plugin\ItemsSortPlugin" sortOrder="1" />
</type>
</config> </config>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment