The main reason, the Object Manager directly is that direct use of the Object Manager causes the extension not to be installable in compiled production mode.
Never call the object manager directly because the Magento 2 Framework handles this automatically
By 2017, The Magento 2 Marketplace runs a compile and install test on all extensions by using properly Magento 2 Coding Standard. If your extension uses the Object Manager directly, it will fail these tests and be rejected from the Marketplace until you resolve this problem and reupload.
Magento 2 Logs having ecommerce store information records for the analysis purpose, as each functionality of ecommerce store either working fine or not, Its both status store in log files One of the most common examples of such events is the error log. Logs file store path
Step [4] – Create Controller Index.php file under your module Controller Index directory. Add below content in this file.
File Path=Mage2db/John/Controller/Index/Index.php
<?php
namespace Mage2db\John\Controller\Index;
class Index extends \Magento\Framework\App\Action\Action
{
public function execute()
{
echo 'Hello Mage2DB Magento 2 Learning & Knowledge & Troubleshooting';
exit();
}
}
All storefront controllers have to contain a public execute method. It is called when accessing the controller. The storefront controllers are inherited from \Magento\Framework\App\Action\Action class.
Magento 2 Standard, use of the echo & exit () is totally prohibited here we have used only for Testing Purpose.
Step [5] – Finally your custom controller has been created
Run the following below commands at your Magento 2 root directory
Tier prices are specific promotional technique to provide different set of discount on products, on the bases of product’s quantity, product’s discount applied.
Magento 2 store owner , apply this promotional technique , while customers are trying to purchase bulk products, normally this promotional technique for B2B business, on the special occasion B2C also apply to atrract more customers & generate more revenue
Example :: Here different set of discount applied of product (Affirm Water Bottle) as below
Step[1] – Tier Disocunt – 1
Buy 6 For $5.95 Each and Save 15%
Step[2] – Tier Disocunt – 2
Buy 12 For $5.60 Each and Save 20%
Step[3] – Tier Disocunt – 3
Buy 24 For $5.25 Each and Save 25%
Here three set of discount apply on the bases of quantity.