Exemple #1
0
 /**
  * Apply various selection filters to prepare the sales order grid collection.
  *
  * @return $this
  */
 protected function _prepareCollection()
 {
     $collection = $this->_collectionFactory->create()->addFieldToSelect('entity_id')->addFieldToSelect('increment_id')->addFieldToSelect('customer_id')->addFieldToSelect('created_at')->addFieldToSelect('grand_total')->addFieldToSelect('order_currency_code')->addFieldToSelect('store_id')->addFieldToSelect('billing_name')->addFieldToSelect('shipping_name')->addFieldToFilter('customer_id', $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID))->setIsCustomerMode(true);
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 protected function _prepareCollection()
 {
     $collection = $this->_collectionFactory->create()->addFieldToFilter('customer_id', $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID))->setIsCustomerMode(true);
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }