cancel
Showing results for 
Search instead for 
Did you mean: 

How to send order remainder to customer if order status "pending" more than 2 days?

Re: How to send order remainder to customer if order status "pending" more than 2 days?

@rahul Gupta   Okay, after saved below code as status.php in root folder then run www.website.com/status.php getting error.

<?php
public function getOrders()
{
if (!($customerId = $this->_customerSession->getCustomerId())) {
return false;
}
if (!$this->orders) {
$this->orders = $this->getOrderCollectionFactory()->create($customerId)->addFieldToSelect(
'*'
)->addFieldToFilter(
'status',
['in' => $this->_orderConfig->getVisibleOnFrontStatuses()]
)->setOrder(
'created_at',
'desc'
);
}
return $this->orders;
}
?>