Magento 2.x Use of Helper File of Module

Magento 2 module helper file used to include common method those are using in multiple places of that module.

Create Helper.php under your module.

Add below content in this file.

File Path=app/code/VendorName/ModuleName/Helper/Data.php

VendorName=Mage2db and ModuleName=John

<?php
namespace  Mage2db\John\Helper;
use Magento\Store\Model\StoreManagerInterface;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
	protected $storeManager; 

	/**
     * @param \Magento\Framework\App\Helper\Context $context
     */
	public function __construct
	(
   \Magento\Framework\App\Helper\Context $context,   StoreManagerInterface $storeManager
	) 
	{
	    $this->storeManager = $storeManager;	
		parent::__construct($context);
	}
	  
	public function getStoreManagerData()
    {
          //return $storeUrl = $this->storeManager->getStore()->getBaseUrl();
         // get Store Url without index.php
        return $storeUrl = $this->storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_WEB);
           // get Link Url of store
          // $storeLinkUrl = $this->storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_DIRECT_LINK);
         // get media Base Url
        //  $storeMediaUrl = $this->storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
      // get Static content Url
      // $storeStaticUrl = $this->storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_STATIC);
    }
}

in above Helper/Data.php , we have defined getStoreManagerData()

By using below code, anywhere inside module we can use getStoreManagerData()

$this->helperData->getStoreManagerData();

Finally once all command method defined inside Helper/Data.php, we can use anywhere inside module.

Which Magento 2.x Database Tables Store Cart Price Rules

The following below Database Tables store Cart Price Rules

salesrule

salesrule_coupon

salesrule_coupon_aggregated

salesrule_coupon_aggregated_order

salesrule_coupon_aggregated_updated

salesrule_coupon_usage

salesrule_customer

salesrule_customer_group

salesrule_label

salesrule_product_attribute

salesrule_website

Magento 2 All Database Tables [500 & more Tables]


Which Magento 2 Database Tables Store Sales Order Data


Which Magento 2 Database Tables Store Sales Invoice Order Data


Which Magento 2 Database Tables Store Sales Tax and Its related Data


Which Magento 2 Database Tables Store Catalog Price Rules


Which Magento 2 Database Tables Store Shopping Cart Items


Which Magento 2 Database Table Store Sales Payment Transaction


Which Magento 2 Database Table store Sales Paypal Settlement Report


Which Magento 2 Database Table store Sales Paypal Payment Transaction

Which Magento 2.x Database Tables Store Catalog Price Rules

The following below Magento 2 database tables store Catalog Price Rules

catalogrule

catalogrule_customer_group

catalogrule_group_website

catalogrule_group_website_replica

catalogrule_product

catalogrule_product_price

catalogrule_product_price_replica

catalogrule_product_replica

catalogrule_website

Magento 2 All Database Tables [500 & more Tables]


Which Magento 2 Database Tables Store Sales Order Data


Which Magento 2 Database Tables Store Sales Invoice Order Data


Which Magento 2 Database Tables Store Sales Tax and Its related Data


Which Magento 2 Database Tables Store Cart Price Rules


Which Magento 2 Database Tables Store Shopping Cart Items


Which Magento 2 Database Table Store Sales Payment Transaction


Which Magento 2 Database Table store Sales Paypal Settlement Report


Which Magento 2 Database Table store Sales Paypal Payment Transaction

Which Magento 2.x Database Table Store Persistent Session

The following below Magento 2 Database Table store Persistent Session data.

persistent_session

Magento 2 All Database Tables [500 & more Tables]


Which Magento 2 database table store customer’s Email Data


Which Magento 2 Database Table Store Customer Newsletter Data


Which Magento 2 database table store customer’s shipping and billing address


How To Remove Sales Order Data & Customer Data in Magento 2


Which Magento 2 Database Tables Store Customer Rating


Which Magento 2 Database Tables Store Customer Review


Which Magento 2 Database Tables Store Customer Wishlist Products


Which Magento 2 Database Table Store Patches


Which Magento 2 Database Table Store Static Blocks & Its Details


Which Magento 2 Database Table Store CMS Pages & Its Details


Which Magento 2 Database Tables Having All URLs Storage


Which Magento 2 Database Tables Store Sales Order Data


Which Magento 2 Database Tables Store Sales Invoice Order Data


Which Magento 2 Database Tables Store Sales Tax and Its related Data


Which Magento 2 Database Tables Store Catalog Price Rules


Which Magento 2 Database Tables Store Cart Price Rules

Which Magento 2.x Database Table Store Products Special Discount Price

The following below Magento 2 database table store Products Special Discount Price.

catalog_product_entity_tier_price

Which Magento 2 Database Table Store Customer Group Price of products


Magento 2 Script To Add Multiple Section, Groups and Fields in Stores-Configuration


What is Declarative Schema in Magento 2


How To Add Customer Groups Dropdown in Magento 2 Admin Form and Grid By UI Component


How To Add Websites Dropdown in Magento 2 Admin Form and Grid By UI Component


Magento 2 Allowed memory size of XXXX bytes exhausted (tried to allocate XXXX bytes)

How To Set Multi Shipping Settings In Magento 2

Magento 2.x using Multiple Shipping Address to ship products in customer’s multiple address.

The Following below admin setting required to enable Multiple Shipping Address.

Step [1] – Go STORES > Configuration, redirects Configuration section.

Step [2] – Left panel, choose SALES > Shipping Settings.

Step [3] – Right panel, Expand the Origin section

There are following below two part

[a] – Allow Shipping to Multiple Addresses

To Enable select Yes, after uncheck use system value

[b] – Maximum Qty Allowed for Shipping to Multiple Addresses

Enter required quantity as per Store need.

Step [4] – Click on Save Config button & run CLI command Flush

Finally,  Multiple Shipping setting has been done.