Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-gift-message
Model
Plugin
QuoteItem.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\GiftMessage\Model\Plugin
;
7
8
use
Magento\Sales\Api\Data\OrderItemInterface
;
9
use
Magento\GiftMessage\Helper\Message
as MessageHelper;
10
use
Magento\Quote\Model\Quote\Item\ToOrderItem
;
11
use
Magento\Quote\Model\Quote\Item\AbstractItem
;
12
13
class
QuoteItem
14
{
18
protected
$_helper
;
19
23
public
function
__construct
(MessageHelper
$helper
)
24
{
25
$this->_helper =
$helper
;
26
}
27
38
public
function
afterConvert
(
39
ToOrderItem
$subject,
40
OrderItemInterface
$orderItem
,
41
AbstractItem
$item
,
42
$additional = []
43
) {
44
$isAvailable = $this->_helper->isMessagesAllowed(
'item'
,
$item
,
$item
->getStoreId());
45
46
$orderItem
->setGiftMessageId(
$item
->getGiftMessageId());
47
$orderItem
->setGiftMessageAvailable($isAvailable);
48
return
$orderItem
;
49
}
50
}
$helper
$helper
Definition:
iframe.phtml:13
Magento\Sales\Api\Data\OrderItemInterface
Definition:
OrderItemInterface.php:17
Magento\GiftMessage\Model\Plugin
Definition:
MergeQuoteItems.php:8
$orderItem
$orderItem
Definition:
order.php:30
Magento\GiftMessage\Model\Plugin\QuoteItem
Definition:
QuoteItem.php:13
Magento\GiftMessage\Model\Plugin\QuoteItem\$_helper
$_helper
Definition:
QuoteItem.php:18
$item
$item
Definition:
partial_invoice.php:27
Magento\Quote\Model\Quote\Item\ToOrderItem
Definition:
ToOrderItem.php:18
Magento\Quote\Model\Quote\Item\AbstractItem
Definition:
AbstractItem.php:50
Magento\GiftMessage\Model\Plugin\QuoteItem\__construct
__construct(MessageHelper $helper)
Definition:
QuoteItem.php:23
Magento\GiftMessage\Helper\Message
Definition:
Message.php:15
Magento\GiftMessage\Model\Plugin\QuoteItem\afterConvert
afterConvert(ToOrderItem $subject, OrderItemInterface $orderItem, AbstractItem $item, $additional=[])
Definition:
QuoteItem.php:38