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?

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

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

Any ways to remain customer about payment pending more than 2 days. If order status pending more than 2 days how to send custom mail.

10 REPLIES 10

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

Hello @Aveeva 

 

Found plugin for your requirements.

https://marketplace.magento.com/idnovate-idnovate-paymentreminder.html

 

Was my answer helpful? You can accept it as a solution.
200+ Premium Magento 2 Extensions Need help? Hire Magento Developer

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

@theMageComp  Thanks for your reply, I am looking only open source or coding based solution.

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

@Aveeva yes you can do this.

 

You can create a cron for a function which would run after every 2 days.

In that function you can check the order status and send email if the status is pending.

 

Thanks

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

@rahul Gupta  Okay, i know how to run cron, but how can i get the order pending last 2 days.

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

@Aveeva you can get the order collection filtered on the pending status and whose created date is 2 days before.

 

Thanks

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

@rahul Gupta  You mean filter status in sales -> order https://imgur.com/J9NaROB right?

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

@Aveeva no.

 

Please check the below code.

 

 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;
    }

Thanks

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

@rahul Gupta  Can i get complete code?

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

@Aveeva this is the code for getting all the orders having status pending.

 

Thanks