Author: admin

Type of session in Magento 2

Sessions refer to the mechanism used to manage and store user-specific information during their visit to an online store. Magento 2 uses sessions to store data such as shopping cart contents, customer login information and other user related data. There are several types of sessions in Magento 2: Type of session in Magento 2 File […]

Read More

Registry and Register in Magento 2

Registry and Register in Magento 2 Registry: The Registry in Magento 2 is an instance of \Magento\Framework\Registry class. It allows you to store and retrieve data using a key-based approach. Storing Data: use Magento\Framework\Registry; $registry = $objectManager->get(Registry::class); $registry->register(‘key_name’, $value); Retrieving Data: $data = $registry->registry(‘key_name’); Register: The Register in Magento 2 is an instance of \Magento\Framework\RegisterInterface […]

Read More

Magento 2 Rest API Authentication

Magento 2 Rest API Authentication Magento 2 Rest API Three types of API Authentication. Token based authentication OAUTH based authentication Session Based Authentication 1.Token based authentication Customer token : Base_Url/V1/integration/customer/token Method Type: POST Hit url by POSTMAN Body payload : raw { “username”:”test”, “password”:”test” } ——————————- Admin Token : /V1/integration/admin/token Method Type: POST Hit url […]

Read More

Custom rest api event observer confliction Magento2

Custom rest api event observer confliction Magento2 Custom rest api we need to define event and plugins under webapi_rest folder. In this way it will not conflict default features. Vendor/Module/etc/webapi_rest/events.xml <?xml version=”1.0″ ?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:Event/etc/events.xsd”> <event name=”sales_model_service_quote_submit_before”> <observer instance=”vendor\module\Observer\Order\Observerclass” name=”events_change”/> </event> </config> namespace vendor\module\Observer\Order; use Magento\Quote\Model\QuoteRepository; use Psr\Log\LoggerInterface; class Observerclass implements \Magento\Framework\Event\ObserverInterface { protected […]

Read More

Rest API Magento 2 Product list by Postman

Rest API Magento 2 Product list by Postman Get product list need to create simple module usign api,model,webapi.xml and di.xml Create method in api class. <?php namespace Vendor\Module\Api; /** * Interface ProductStockInterface */ interface ProductDataInterface { /** * get products. * * @return array */ public function getProData(); } Create webapi.xml under etc folder webapi.xml […]

Read More

Magento 2 Create cart by graphql

Magento 2 Create cart by graphql Setup Altair Graphql for browser. Create cart for Graphql Create empty cart like quote id and cart id. Add to cart with cart id. mutation { addSimpleProductsToCart( input: { cart_id: “VNUVFksjdu2SPsxgBl2Mdlqrum73PL” cart_items: [ { Remove coupon data: { quantity: 1 sku: “0768335” } } ] } ) { cart […]

Read More

How to Fix Magento 2.3.5-p1 Installation Error -Installation Incomplete

How to Fix Magento 2.3.5-p1 Installation Error -Installation Incomplete Magento installation for some versions sometimes we need to fix issue during installation. Magento Providing lot of eCommerce features and upgrade package timely. Find the bellow simple step you can run installation successfully. Find validateURLScheme function in vendor\magento\framework\Image\Adapter\Gd2.php file. at line 96. Replace function with this: […]

Read More

Magento 2 Multi-Vendor Marketplace Extensions

Best Magento 2 Multivendor Marketplace extensions which have greate features and flexiblity , Most of eccommerse store have multi vendors functionality user can add our Brand on store and updates all Data using personal accounts created and also get payments for separately. Check the below Magento 2 Multi-Vendor Marketplace Extensions Marketplace Extension: Landofcoder Landofcoder provides […]

Read More

Top 10+ Magento 2 Responsive Themes

Top 10+ Magento 2 Responsive Themes The ecommerce platform has great success fulfilling the needs of the ecommerce industry because which have great features and advanced functionalities that no many platform is providing. In that case, Magento 2 has had a great revolution which currently on boom ! and made great progress in recent years. […]

Read More

Create Magento 2 Custom theme

Create Magento 2 Custom theme Create Magento 2 Custom theme firstly we need to set mode as developer you know magento have three type mode: Default Mode Developer Mode Production Mode Run blow cammand set mode as developer php bin/magento deploy:mode:set developer Step 1 – Create theme.xml Create theme directory app/design/frontend/techdiv/techdivtheme app/design/frontend/techdiv/techdivtheme/etc/theme.xml <theme xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:Config/etc/theme.xsd”> […]

Read More