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?

Highlighted

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
Highlighted

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

 

Found something useful, "Kudos" and "Accept as Solution" for Token of Appreciation.

Magento Tutorials
Highlighted

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.

Highlighted

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

Highlighted

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.

Highlighted

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

Highlighted

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?

Highlighted

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

Highlighted

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

@rahul Gupta  Can i get complete code?

Highlighted

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