![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-sales/Block/Adminhtml/Order/Create/Sidebar/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Sales\Block\Adminhtml\Order\Create\Sidebar; /** * Adminhtml sales order create sidebar compared block * * @api * @author Magento Core Team <[email protected]> * @since 100.0.2 */ class Compared extends \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar { /** * Constructor * * @return void */ protected function _construct() { parent::_construct(); $this->setId('sales_order_create_sidebar_compared'); $this->setDataId('compared'); } /** * Get header text * * @return \Magento\Framework\Phrase */ public function getHeaderText() { return __('Products in Comparison List'); } /** * Retrieve item collection * * @return mixed */ public function getItemCollection() { $collection = $this->getData('item_collection'); if ($collection === null) { if ($collection = $this->getCreateOrderModel()->getCustomerCompareList()) { $collection = $collection->getItemCollection() ->useProductItem() ->setStoreId($this->getQuote()->getStoreId()) ->addStoreFilter($this->getQuote()->getStoreId()) ->setCustomerId($this->getCustomerId()) ->addAttributeToSelect('name') ->addAttributeToSelect('price')->addAttributeToSelect('image') ->addAttributeToSelect('status') ->load(); } $this->setData('item_collection', $collection); } return $collection; } /** * Get item id * * @param \Magento\Framework\DataObject $item * @return int */ public function getItemId($item) { return $item->getCatalogCompareItemId(); } }