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-instant-purchase
Model
QuoteManagement
QuoteFilling.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\InstantPurchase\Model\QuoteManagement
;
7
8
use
Magento\Catalog\Model\Product
;
9
use
Magento\Framework\DataObject
;
10
use
Magento\Framework\Exception\LocalizedException
;
11
use
Magento\Quote\Model\Quote
;
12
19
class
QuoteFilling
20
{
31
public
function
fillQuote
(
32
Quote
$quote
,
33
Product
$product
,
34
array $productRequest
35
):
Quote
{
36
$normalizedProductRequest = array_merge(
37
[
'qty'
=> 1],
38
$productRequest
39
);
40
$result
=
$quote
->addProduct(
41
$product
,
42
new
DataObject
($normalizedProductRequest)
43
);
44
45
if
(is_string(
$result
)) {
46
throw
new
LocalizedException
(
__
(
$result
));
47
}
48
return
$quote
;
49
}
50
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\InstantPurchase\Model\QuoteManagement
Definition:
PaymentConfiguration.php:6
$quote
$quote
Definition:
paypal_quote.php:17
__
__()
Definition:
__.php:13
Magento\Framework\DataObject
Definition:
DataObject.php:15
Magento\InstantPurchase\Model\QuoteManagement\QuoteFilling\fillQuote
fillQuote(Quote $quote, Product $product, array $productRequest)
Definition:
QuoteFilling.php:31
Magento\Catalog\Model\Product
Definition:
Product.php:42
Magento\Catalog\Model\Product
Definition:
ActionTest.php:6
Magento\Quote\Model\Quote
Definition:
AddressTest.php:6
Magento\Framework\DB\Platform\Quote
Definition:
Quote.php:13
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\InstantPurchase\Model\QuoteManagement\QuoteFilling
Definition:
QuoteFilling.php:19
Magento\Framework\DataObject
Definition:
Cache.php:6