Skip to content

Commit

Permalink
Composer support
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarchenko committed Oct 28, 2024
1 parent fda417b commit 8949cc7
Show file tree
Hide file tree
Showing 32 changed files with 11 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Magento\Sales\Model\ResourceModel\Order\CollectionFactory as OrderCollectionFactory;
use Magento\Customer\Model\ResourceModel\Customer\CollectionFactory as CustomerCollectionFactory;
use Magento\Directory\Model\CountryFactory;
use Magento\Sales\Model\Order\StatusFactory;


class OrderRecent implements OrderRecentManagementInterface
Expand Down Expand Up @@ -90,6 +91,9 @@ class OrderRecent implements OrderRecentManagementInterface
/** @var Config */
protected $config;

/** @var StatusFactory */
protected $orderStatusFactory;

/**
* @param OrderRepositoryInterface $orderRepository
* @param OrderItemRepositoryInterface $orderItemRepository
Expand All @@ -110,6 +114,7 @@ class OrderRecent implements OrderRecentManagementInterface
* @param CustomerCollectionFactory $customerCollectionFactory
* @param CountryFactory $countryFactory
* @param Config $config
* @param StatusFactory $orderStatusFactory
*/
public function __construct(
OrderRepositoryInterface $orderRepository,
Expand All @@ -130,7 +135,8 @@ public function __construct(
OrderAddressRepositoryInterface $addressRepository,
CustomerCollectionFactory $customerCollectionFactory,
CountryFactory $countryFactory,
Config $config
Config $config,
StatusFactory $orderStatusFactory
) {
$this->orderRepository = $orderRepository;
$this->orderItemRepository = $orderItemRepository;
Expand All @@ -151,6 +157,7 @@ public function __construct(
$this->customerCollectionFactory = $customerCollectionFactory;
$this->countryFactory = $countryFactory;
$this->config = $config;
$this->orderStatusFactory = $orderStatusFactory;
}

/**
Expand Down Expand Up @@ -339,6 +346,7 @@ public function getInfo($email, $scope)
'phone' => $shippingAddress->getTelephone(),
];
}
$status = $this->orderStatusFactory->create()->load($order->getStatus());
$orderInfo[] = [
'url' => $this->urlBuilder->getUrl('md_freshdesk/index/redirect',
['id' => $order->getEntityId(), 'type' => RedirectType::ORDER_TYPE]),
Expand All @@ -354,7 +362,7 @@ public function getInfo($email, $scope)
'payment_method' => $order->getPayment()->getMethodInstance()->getTitle(),
'shipping_method' => $order->getShippingDescription(),
'shipping_tracking' => $this->prepareShippingTrackingForOrder($order),
'status' => $order->getStatusLabel(),
'status' => $status->getLabel(),
'state' => $order->getState(),
'totals' => [
'subtotal' => $isBaseCurrencyType ? $currency->toCurrency($order->getBaseSubtotal()) : $currency->toCurrency($order->getSubtotal()),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/code/Morfdev/Freshdesk/composer.json → composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "morfdev/module-freshdesk",
"description": "N/A",
"description": "The extension connect Magento 2 stores with Freshworks products (Freshdesk/Freshsales/Freshservice/Freshchat) via Magento 2 Connector app",
"type": "magento2-module",
"version": "1.0.4",
"license": [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8949cc7

Please sign in to comment.