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
QuoteCreation.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\InstantPurchase\Model\QuoteManagement
;
7
8
use
Magento\Customer\Model\Address
;
9
use
Magento\Customer\Model\Customer
;
10
use
Magento\Framework\Exception\LocalizedException
;
11
use
Magento\Quote\Model\Quote
;
12
use Magento\Quote\Model\QuoteFactory;
13
use
Magento\Store\Model\Store
;
14
21
class
QuoteCreation
22
{
26
private
$quoteFactory;
27
32
public
function
__construct
(
33
QuoteFactory $quoteFactory
34
) {
35
$this->quoteFactory = $quoteFactory;
36
}
37
49
public
function
createQuote
(
50
Store
$store
,
51
Customer
$customer
,
52
Address
$shippingAddress
,
53
Address
$billingAddress
54
):
Quote
{
55
$quote
= $this->quoteFactory->create();
56
$quote
->setStoreId(
$store
->getId());
57
$quote
->setCustomer(
$customer
->getDataModel());
58
$quote
->setCustomerIsGuest(0);
59
$quote
->getShippingAddress()
60
->importCustomerAddressData(
$shippingAddress
->getDataModel());
61
$quote
->getBillingAddress()
62
->importCustomerAddressData(
$billingAddress
->getDataModel());
63
$quote
->setInventoryProcessed(
false
);
64
return
$quote
;
65
}
66
}
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\InstantPurchase\Model\QuoteManagement\QuoteCreation\__construct
__construct(QuoteFactory $quoteFactory)
Definition:
QuoteCreation.php:32
Magento\CatalogSearch\Model\Indexer\Fulltext\Store
Definition:
Store.php:17
Magento\InstantPurchase\Model\QuoteManagement\QuoteCreation
Definition:
QuoteCreation.php:21
$billingAddress
$billingAddress
Definition:
order.php:25
$customer
$customer
Definition:
customers.php:11
Magento\Customer\Model\Address
Definition:
AbstractAddress.php:7
Magento\InstantPurchase\Model\QuoteManagement\QuoteCreation\createQuote
createQuote(Store $store, Customer $customer, Address $shippingAddress, Address $billingAddress)
Definition:
QuoteCreation.php:49
Magento\InstantPurchase\Model\QuoteManagement
Definition:
PaymentConfiguration.php:6
$quote
$quote
Definition:
paypal_quote.php:17
$shippingAddress
$shippingAddress
Definition:
order.php:40
Magento\Customer\Model\Address
Definition:
Address.php:23
Magento\Customer\Model\Customer
Magento\Quote\Model\Quote
Definition:
AddressTest.php:6
Magento\Framework\DB\Platform\Quote
Definition:
Quote.php:13
$store
$store
Definition:
payment_configuration_rollback.php:33
Magento\Store\Model\Store
Definition:
Store.php:38
Magento\Customer\Model\Customer
Definition:
Customer.php:46