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
magento2-base
dev
tests
integration
testsuite
Magento
Paypal
_files
order_express_with_tax.php
Go to the documentation of this file.
1
<?php
7
use
Magento\Framework\ObjectManagerInterface
;
8
use
Magento\Sales\Model\OrderRepository
;
9
use
Magento\TestFramework\Helper\Bootstrap
;
10
11
require
__DIR__
.
'/order_express.php'
;
12
14
$objectManager
= Bootstrap::getObjectManager();
15
16
$subTotal
= 121;
17
$taxRate
= .0825;
18
$taxAmount
=
$subTotal
*
$taxRate
;
19
$shippingAmount
= 15;
20
$totalAmount
=
$subTotal
+
$taxAmount
+
$shippingAmount
;
21
22
$order
->setSubtotal(
$subTotal
);
23
$order
->setBaseSubtotal(
$subTotal
);
24
$order
->setGrandTotal(
$totalAmount
);
25
$order
->setBaseGrandTotal(
$totalAmount
);
26
$order
->setTaxAmount(
$taxAmount
);
27
29
$orderRepository
=
$objectManager
->get(OrderRepository::class);
30
$orderRepository
->save(
$order
);
$totalAmount
$totalAmount
Definition:
order_express_with_tax.php:20
$objectManager
$objectManager
Definition:
order_express_with_tax.php:14
$shippingAmount
$shippingAmount
Definition:
order_express_with_tax.php:19
Magento\TestFramework\Helper\Bootstrap
Definition:
Bootstrap.php:12
$taxAmount
$taxAmount
Definition:
order_express_with_tax.php:18
__DIR__
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition:
_bootstrap.php:60
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
$order
$order
Definition:
order.php:55
Magento\Sales\Model\OrderRepository
Definition:
OrderRepository.php:26
$subTotal
$subTotal
Definition:
order_express_with_tax.php:16
$taxRate
$taxRate
Definition:
order_express_with_tax.php:17
$orderRepository
$orderRepository
Definition:
order_express_with_tax.php:29