Disabling the Category: Go to Catalog > Categories in the Magento Admin Panel. Select the category you want to hide. Set “Is Active” to “No” in the category settings. Click Save to apply the changes. Setting Display Mode to “Static Block Only”: Navigate to Catalog > Categories in the Magento Admin Panel. Select the category… Continue reading How can I hide a category in Magento 2 without deleting it?
Author: Abin Devasia
What are the key differences between Magepow Speed Optimizer and Swissup Page Speed?
✅ Magepow Speed Optimizer: Focuses more on lazy loading and minification (HTML, CSS, JS). Offers regex-based exclusions for fine-tuning optimizations. Provides options for preloading images and setting placeholder images to maintain layout stability. Allows custom scripts & styles injection. ✅ Swissup Page Speed: More advanced resource preloading (rel=”preload”, DNS prefetch, preconnect). Supports Critical CSS to… Continue reading What are the key differences between Magepow Speed Optimizer and Swissup Page Speed?
How to Update Product Quantity in Magento 2 via API
Endpoint: PUT https://your-magento-site.com/rest/V1/products/SHE-211359BK/stockItems/2911 Headers: Authorization: Bearer {your_token} Content-Type: application/json Body: { “stock_item”: { “qty”: 50, “is_in_stock”: true, “manage_stock”: true, “use_config_manage_stock”: false } }
How can I get an admin token in Magento 2 using the REST API?
To authenticate and obtain an admin token in Magento 2, send a POST request to the endpoint: https://your-magento-site.com/rest/V1/integration/admin/token Request payload: { “username”: “your_admin_username”, “password”: “your_admin_password” } If the credentials are valid, Magento returns a token like this: “abcd1234abcd5678abcd90efgh” ✅ Use this token in your subsequent API requests by adding it to the Authorization header as:… Continue reading How can I get an admin token in Magento 2 using the REST API?
How can I show product flags in SwissUp ProLabels based on customer groups in Magento?
Log in to your Magento Admin Panel. Navigate to SwissUp > ProLabels. Select the label you want to edit. In the label settings, look for the Customer Groups option. Choose the specific customer groups you want the label to be visible for. Save the changes and clear the cache if necessary.
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?
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?*
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?
How do API calls differ between Vue 2 and Vue 3?
In Vue 2 and Vue 3, the approach to making API calls is similar in terms of using libraries like axios or fetch, but the structure of the code and how state is managed differs due to the changes in Vue 3’s architecture. Key Differences Between API Calls in Vue 2 and Vue 3: State… Continue reading How do API calls differ between Vue 2 and Vue 3?
What are composite API calls in Vue 3, and how do you implement them efficiently?
In Vue 3, composite API calls refer to the practice of combining multiple API requests into a single, orchestrated process. Instead of handling each API call separately, you coordinate them in a structured way, which simplifies your code and ensures dependencies between calls are handled correctly. How to Implement Composite API Calls in Vue 3… Continue reading What are composite API calls in Vue 3, and how do you implement them efficiently?