amazon-archives / amazon-mcf-plugin-for-magento-2

Plugin code to enable Amazon MCF in Magento 2.
Apache License 2.0
11 stars 3 forks source link

Invoice is not created when order updated #10

Open lstellway opened 5 years ago

lstellway commented 5 years ago

Issue

An invoice is not created when the Amazon\MCF\Cron\GetOrderStatus::orderUpdate cron job is executed.

Result

This results in the order status not being updated to "Complete" when the order is saved after the shipment is created.

The reference for this is in the \Magento\Sales\Model\ResourceModel\Order\Handler\State::check() method called from \Magento\Sales\Model\ResourceModel\Order::save() when an order is saved.

lstellway commented 5 years ago

I lumped 2 updates in this pull request to avoid merge conflicts:

  1. Fixes the issue of the invoice not being created
  2. Adds the ShipmentSender to send customer email when a shipment is created