What's New

Instagram

About Me

Photo Profile
Meetanshi Architecture Designer

Meetanshi is found based on providing the best Magento Extensions and Customized eCommerce Business Solutions perfected to the users’ needs. Our Happy users make us Happy. Complete satisfaction to our clients is what drives and motivates us to work hard. Read More

Showing posts with label Magento 2 ecommerce. Show all posts
Showing posts with label Magento 2 ecommerce. Show all posts

Sunday, January 1, 2023

How to Remove Column from Admin Grid Dynamically in Magento 2

 


The Magento 2 CMS enables admin users to modify the built-in functionality to make managing orders and customers and administering the Magento 2 store easier.



The administrator might, for instance, add a unique column to the products grid.


What happens, then, if an administrator in Magento 2 wants to dynamically remove a column from the admin grid?


In Magento 2, it is possible that adding a custom column to the admin grid is necessary when creating a custom module. Additionally, it would be desirable to eliminate that custom column whenever the custom module is disabled.


Use the following solution in that situation to remove a column from the admin grid dynamically in Magento 2.


For more information, Visit : https://meetanshi.com/blog/remove-column-from-admin-grid-dynamically-in-magento-2/


Wednesday, December 28, 2022

How to Enable Merge CSS, Javascript in Magento 2

 Only those online retailers that can continue to provide the finest customer experience will be able to compete in today's industry.


The user experience now dominates store performance. There is no denying that one of Google's ranking variables is how quickly a page load.


Knowing how valuable even a single second maybe when it comes to the speed at which a website loads, one should take the time when trying to speed up a Magento 2 business.


And one method for doing so is to enable merging CSS, and javascript in Magento 2.


One of the causes of Magento 2's poor performance and lengthy loading times is the separation of CSS and javascript.


Merging removes pointless or redundant data, such as line breaks, from a resource without altering how the browser reads it. After integrating CSS and JavaScript, it restricts file alteration.


The store will load more quickly thanks to fewer calls made to the server due to the CSS and javascript merger.


And fortunately, the admin panel of our favorite CMS includes a default feature to enable the merging of CSS and javascript!


For more information, visit: https://meetanshi.com/blog/enable-merge-css-javascript-in-magento-2/


Monday, December 26, 2022

How to Add Custom Menu Item in Magento 2 Frontend

 A store's navigation menu makes it easier to move around the store from one place to another. It points website users in the right direction so they may quickly and easily find goods and services.


By default, when a category is added and its "Include in Menu" option is enabled, Magento 2 creates the menu link. But what if you need to add a custom menu item in the Magento 2 frontend instead of category links so that website visitors can find the link to a crucial page or form with ease?


For instance, you must display user information for customers who are logged in on the "My Profile" tab. You must add a custom menu item to the Magento 2 frontend so that clients may click it and view the profile information with ease.


For a detailed guide, Visit:  https://meetanshi.com/blog/add-custom-menu-item-in-magento-2-frontend/


How to Add Custom Field Below Apply Discount Code in Magento 2 Cart Page



The ability to customize Magento 2 makes it the CMS of choice for developers. Today, I'll share one such specially-made method to add a custom field below apply a discount code in Magento 2 cart page.






With this solution, you can utilize the cart page when a consumer is about to complete their purchase for a number of different purposes.


The customer is now practically certain to convert and is hence confident in your brand. Why not demand more of them?


For instance, if you are providing a discount code, you may encourage the user to click on a custom field underneath the discount code and invite them to review the benefits of the deal in greater detail or to sign up for a premium membership to receive additional savings.


Additionally, at this stage, you can include a unique link that guides visitors to your best-selling products. By doing this, you can raise the average order value and improve sales.


Additionally, if you allow product customization, you can include a unique button so that customers can begin customizing the product if they haven't already. Enhance the Magento 2 store's customer experience in this way.


Get more here: https://meetanshi.com/blog/add-custom-field-below-apply-discount-code-in-magento-2-cart-page/


How to Add New Column in Magento 2 Quote Table & Order Table

Magento 2, regardless of how highlight rich, misses the mark with regards to meeting the profoundly tweaked prerequisites of clients. Luckily, the adaptable stage permits the engineers to alter the code to finish the clients' necessities!

Here, the customization that I'm talking about is to add new column in Magento 2 Quote table & Order table.It very well may be any section that isn't in the default Magento 2 statement table and request table, however the information from the data set is required to have been gotten in these tables.


Follow the underneath strategy and you get tweaked Magento 2 statement table and request table!


For more information,visit  : https://meetanshi.com/blog/add-new-column-in-magento-2-quote-table-order-table/


How to Add Custom Phtml File in Magento 2 Admin

Need to Add Custom Phtml File in Magento 2 Admin? This is the way you can do that.


In the event that you are a Magento designer dealing with custom turn of events, you may frequently expect to change the format of the administrator board for adding new highlights and functionalities. In Magento 2, Phtml records are utilized by the web servers to create dynamic HTML documents in view of the PHP scripts and serve them to the clients, for example store administrators and clients. Consequently, to change whatever is shown on the administrator board, we want to add a custom Phtml document in Magento 2 administrator.


Prior, one of my partners showed a strategy to call a Phtml record in CMS static block in Magento 2. Today, I have thought of a strategy to embed a custom Phtml document in your Magento 2 administrator board through a module.


For more information,visit : https://meetanshi.com/blog/add-custom-phtml-file-in-magento-2-admin/


Sunday, December 25, 2022

Solved: Undefined Index: DirectiveName in SimpleDirective.php in Magento 2

Is your Magento 2 store not working as expected when an email should be set off? Indeed, this can be a direct result of a custom email layout. Follow me till the finish of this post to track down the arrangement. 🎯


In Magento 2, different email notices are shipped off the clients and administrators for different exercises. The vendors can redo the email layouts as per their necessities. In some cases these custom email layouts can make similarity issues after Magento overhauls. As of late, I experienced one such issue in our client's Magento store, which was newly moved up to Magento 2.3.4.


Magento was tossing blunder 500 when the messages should be sent through custom formats, for example new client enrollment, reset client secret word, request achievement, and so on.


The blunder log showed: "Unclear File: DirectiveName in vendor\magento\framework\Filter\DirectiveProcessor\Simple Directive.php in Magento 2".


This is a result of the limitations on the utilization of custom factors in Magento 2.3.4 (Adobe Business). It very well may be effortlessly tackled by following the custom email format relocation guide delivered by Magento.


How about  Magento 2 Undefined Index: DirectiveName in SimpleDirective.php.


For more information ,  visit : https://meetanshi.com/blog/undefined-index-directivename-in-simpledirective-php-in-magento-2/




Solved: Error in Compat.php While Installing Magento 2

Hi Magento Peeps,


Coincidentally found a surprising error in compact.php while installing Magento 2? 


We take care of you, likely!


As of late, I was introducing Magento 2 with XAMPP on a Windows PC of one of my partners and experienced a surprising blunder. The blunder read:


In compat.php line 1927:


This isn't carried out, as it is unimaginable to expect to execute Argon2i with OK execution in unadulterated PHP.


On additional examination, I observed that the blunder was tossed by Magento on the grounds that specific PHP augmentations were absent.


Assuming you are likewise confronting such a mistake while introducing Magento 2, you can follow this blog entry to tackle the issue.


For more information, visit : https://meetanshi.com/blog/error-in-compat-php-while-installing-magento-2/


Wednesday, December 21, 2022

How to Add Color Picker in Magento 2 Admin Configuration

 You may need to give the admin total authority over the front-end user interface while implementing an extension. Changing the UI involves altering the background and text colors, necessitating the inclusion of a color picker in the Magento 2 admin configuration.




In a Magento 2 extension, the settings are typically found under Stores -> Configuration, and this is where you add the color picker to enable changing the color in the frontend user interface. Here, I'll share easy steps to add color picker Magento 2 Admin Configuration!


Clear the cache after that and then go to the store's configuration. It will show the color picker option. Anywhere in Magento 2 that needs it, use this color picker with your own customized code!


For more information, Visit: https://meetanshi.com/blog/add-color-picker-in-magento-2-admin-configuration/


How to Get Customer Collection in Magento 2

 This is the answer for Magento 2 developers who occasionally need a list of clients.



 Magento 2 gets customer collection using the following solution. When you need to build features depending on customers or their attributes, you can use this code.


For instance, you might wish to provide unique discount codes depending on client segments or first-time user discounts for visitors who still need to order from your website.


Another option is to apply a condition based on the user's first and last name, date of birth, gender, etc. You must first collect client data in Magento 2 each time you want to perform such customization.


Check out the answer to the same.

https://meetanshi.com/blog/get-customer-collection-in-magento-2/


Tuesday, December 20, 2022

How to Get Current Store ID in Magento 2

E-commerce has altered how consumers conduct business and shop. A customer from France could buy something from an Indian store via online purchasing! The store owners attempt to provide a shopping platform that is suitable for their customers' native language, currency, etc. as the client base grows.


Therefore, Magento 2 enables having many storefronts to provide your clients with a convenient buying experience.


The store owner must configure multi stores in Magento 2 in order to manage multiple stores from a single administration. The requirement to get the current store id Magento 2 frequently arises when working in a multi-store setting.


particularly when the retailer requires customization specific to the store. For instance, the currency and merchandise prices in store A differ from that in-store B.


You must first obtain the store ID before implementing any such condition-based modification. If the store ID is equal to one, do not display a popup of discounted items or create a store-specific CSV; otherwise, do so.


For more information, Visit: https://meetanshi.com/blog/get-current-store-id-in-magento-2/


How to Add Custom Field in Invoice Totals in Magento 2 Invoice Email

 An invoice is a formal record that contains information about a purchase in great detail, such as the quantity, price, shipping charges, sales tax, total, etc.


When a customer places an order and completes their payments, Magento 2 enables setting invoice emails to send them a comprehensive invoice.




A bill sent via email makes the transaction reliable and lawful while also enhancing your store's brand identity. Additionally, it's an interactive way to improve user experience and prevent any future legal difficulties.


There are numerous choices available in the invoice email in Magento 2 by default. What would happen, though, if you wanted to include a custom field in the invoice email?


For instance, you have increased the price for packing or product customization. It even provided a discount based on the value of the store credit. The sum is now computed taking into account these extra fees or reductions.


However, the email invoice does not automatically add custom charges.


If the grand total on the invoice email differs from the quantity they paid, it may cause confusion for the clients.


Consequently, one must adhere to the following procedure in order to display the manually added charges add a custom field in invoice totals Magento 2 invoice email.


For a detailed guide, Visit: https://meetanshi.com/blog/add-custom-field-in-invoice-totals-in-magento-2-invoice-email/ 




Monday, December 19, 2022

How to Add Magento 2 Configurable Products Programmatically to Cart

 For developers who become bored, this is a quick way to examine the functionalities they've implemented.




As part of a module development effort, I had to test every feature using both a simple and configurable product. It was not possible to repeat the procedure of choosing the alternatives, adding them to the cart, and checking out every time.


As a result, I developed a method to automate the arduous operation to add configurable products programmatically to the cart in Magento 2.


Find more here,

https://meetanshi.com/blog/add-magento-2-configurable-products-to-cart/


[Fixed] Magento Logging Failed After Installing SUPEE 11086 Patch

 On March 26, 2019, Magento SUPEE 11086 was given access. The patch is designed to address vulnerabilities such as cross-site scripting (XSS), near remote code execution (RCE), cross-site request forgery (CSRF), and others.




However, it has the drawback of Magento Logging Fails After Installing SUPEE 11086 Patch!


The function that Magento added to check extensions in log files is what is causing the issue. If the log file does not yet exist, the readable() function throws an error.



Use the suggested fix to solve the Magento logging problem.

https://meetanshi.com/blog/magento-logging-failed-after-installing-supee-11086-patch/


Sunday, December 18, 2022

How to Add Custom Button in Magento 2 System Configuration

 You must adhere to a number of standards while creating a Magento 2 extension, and I'm sharing the solution to Add a Custom Button Magento 2 System Configuration



In order to implement custom functionality or carry out an operation, you should add a button in the Magento 2 system setup. Call a controller action or helper function, for instance.


As you can see, I’ve shared this technique to make the button that creates a CSV file for product attributes: https://meetanshi.com/blog/add-custom-button-in-magento-2-system-configuration/ 


How to Add Attachments with Email in Magento 2.3.x

The Zend Framework 2 is utilized by the Magento 2.3.x editions. Due to its refusal to use Zend Framework 1, certain functions are implemented differently than in prior iterations (ZF1).


The ability to send emails with attachments is one such feature. Adding attachments to emails was simple in earlier versions of Magento 2 thanks to the function createAttachment().



Use the shared code to add an attachment with Email Magento 2.3.x  if you are using the upgraded versions (I'm sure you care about security enough to use the most recent Magento 2.3.2).


Visit : https://meetanshi.com/blog/add-attachments-with-email-in-magento-2-3-x/ 


Thursday, December 15, 2022

How to Call Helper Function in phtml in Magento 2

 In Magento 2 stores, helper classes provide functionality for a variety of functions. The Helper can be invoked in controllers, models, views, and other helpers with Magento 2.


If you want helper data in a Magento 2 .phtml file, you can use the shared code.


Making changes to the core Magento 2 files is not advised, which is why the Magento 2 Helper class was created to replace them.


To add unique functionalities and improve shop features, use the programmatic way to invoke helper function in phtml Magento 2, By visiting: https://meetanshi.com/blog/call-helper-function-in-phtml-in-magento-2/ 


How to Add Multi Select Filter in Magento 2 Admin Grid

 Have you ever needed a Magento 2 admin grid that can be filtered by the values of additional columns, such as those found in multi select drop-down menus?



For instance, if you wish to export consumers into three different groups, you must choose a group three times and export the data for each group separately. However, because Magento 2 only permits applying one filter at a time by default, you are unable to filter all three of them at once.


The following approach can be useful if a business requirement calls for a mass action to be applied to products meeting multiple conditions.


Use the shared code to add multi-select filter to Magento 2 admin grid, Visit : https://meetanshi.com/blog/add-multi-select-filter-in-magento-2-admin-grid/ 


Wednesday, December 14, 2022

How To Remove Version Number In File Paths in Magento 2

 Static content signing is a functionality that Magento 2 gives to remove static resources from the browser's cache. It does this by including a deployment version in the fixed assets' URL.



However, the deployed version of these files is present in their URLs, resulting in the 404 error.


The answer is to remove version numbers in file paths Magento 2, and two techniques are shared, Visit now: https://meetanshi.com/blog/remove-version-number-in-file-paths-in-magento-2/


Solved – “Your session has expired” On Clicking Add To Cart In Magento 2.3 Localhost

 If you've spent too much time with Magento, like me, you've probably seen an error message that says "Your session has expired" when you click add to cart in Magento 2.3 localhost.



This can happen if you have a fresh Magento 2.3 installation and are testing product functionality by adding items to the cart.



To get rid of the expired session error, you must try the solution.


In order to find a solution, “Your Session Has Expired” On Clicking Add To Cart Magento 2.3 Localhost, Visit: https://meetanshi.com/blog/solution-your-session-has-expired-on-clicking-add-to-cart-in-magento-2-3-localhost/


Get more of our update !