Magento Show only tier prices for Level Customer- No promotional prices

<?php /**  * Copyright © Magento, Inc. All rights reserved.  * See COPYING.txt for license details.  */ use MagentoFrameworkPricingAmountAmountFactory; ?> <?php /** @var MagentoCatalogPricingRenderFinalPriceBox $block */ /** ex: MagentoCatalogPricingPriceRegularPrice */ /** @var MagentoFrameworkPricingPricePriceInterface $priceModel */ $priceModel = $block->getPriceType(‘regular_price’); /** ex: MagentoCatalogPricingPriceFinalPrice */ /** @var MagentoFrameworkPricingPricePriceInterface $finalPriceModel */ $finalPriceModel = $block->getPriceType(‘final_price’); $idSuffix = $block->getIdSuffix() ? $block->getIdSuffix()… Continue reading Magento Show only tier prices for Level Customer- No promotional prices

How can I block access to a specific category in Magento 2 for users who are not logged in or belong to a specific customer group using an observer?

Add an Observer for Category Restriction 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=”controller_action_predispatch_catalog_category_view”>         <observer name=”restrict_category_access_observer”                   instance=”JJRestrictPageObserverRestrictCategoryAccess”/>     </event> </config> Implement the Observer to Block the Category RestrictCategoryAccess.php <?php namespace JJRestrictPageObserver; use MagentoFrameworkEventObserver; use MagentoFrameworkEventObserverInterface;… Continue reading How can I block access to a specific category in Magento 2 for users who are not logged in or belong to a specific customer group using an observer?

Published
Categorized as Magento

How to remove a category from being displayed in Magento 2 for users who are not logged in or belong to a specific customer group using an observer?*

Step 1: Define the Event Observer <?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=”catalog_category_collection_load_after”>         <observer name=”restrict_category_observer”                   instance=”JJRestrictPageObserverRestrictCategory”/>     </event> </config> Step 2: Implement the Observer <?php namespace JJRestrictPageObserver; use MagentoFrameworkEventObserver; use MagentoFrameworkEventObserverInterface; use MagentoCustomerModelSession as CustomerSession;… Continue reading How to remove a category from being displayed in Magento 2 for users who are not logged in or belong to a specific customer group using an observer?*

Published
Categorized as Magento

How can I remove a specific navigation link (e.g., ‘Hot Sale’) for guest users and for logged-in users who are not in a specific customer group, by overriding the Swissup NavigationPro template in Magento 2?

Step 1: Create the Override Directory Swissup’s menu.phtml is located at: vendor/swissup/module-navigationpro/view/frontend/templates/menu.phtml To override it in your custom theme (JJ), create the required directory: mkdir -p szco/app/design/frontend/JJ/Swissup_Navigationpro/templates/ Step 2: Copy the menu.phtml File Copy the original menu.phtml from the module to your theme: cp szco/vendor/swissup/module-navigationpro/view/frontend/templates/menu.phtml szco/app/design/frontend/JJ/Swissup_Navigationpro/templates/menu.phtml Step 3: Modify menu.phtml to Remove “Hot Sale” for… Continue reading How can I remove a specific navigation link (e.g., ‘Hot Sale’) for guest users and for logged-in users who are not in a specific customer group, by overriding the Swissup NavigationPro template in Magento 2?

Published
Categorized as Magento

Creating a Magento 2 Order Invoice in NetSuite Connector

You can create an invoice in Magento 2 when a fulfillment syncs from NetSuite Connector. To create an invoice in Magento 2 from NetSuite Connector: Log in to app.farapp.com. Select the Magento 2 connector and the relevant account. Go to Settings > Orders. The Order Settings page opens. Click Advanced Options. Check the Trigger Magento to Create Invoices… Continue reading Creating a Magento 2 Order Invoice in NetSuite Connector

Published
Categorized as Magento

Create a Cart Price Rule programmatically via Magento 2’s REST API

1. API Endpoint Use the following endpoint to create a cart price rule: bash Copy code POST /V1/salesRules 2. Request Payload Here’s an example of the JSON payload to create a cart price rule: json Copy code { “rule”: { “name”: “Buy 3 Get Discount”, “description”: “Discount applied when purchasing 3 specific items”, “is_active”: true,… Continue reading Create a Cart Price Rule programmatically via Magento 2’s REST API

Published
Categorized as Magento

How to set a discount in Magento2

Step 1: Create a New Shopping Cart Price Rule Log in to the Magento 2 Admin Panel. Go to Marketing > Promotions > Cart Price Rules. Click Add New Rule. Step 2: Configure Rule Information Rule Information: Rule Name: Enter a descriptive name (e.g., “Buy 3 Get Discount”). Description: Optionally, describe the rule for internal… Continue reading How to set a discount in Magento2

Published
Categorized as Magento