Magento Expert Forum - Improve your Magento experience
-
How to Remove Disable Product from Cart in Magento 2
Hello, Magento Folks,
Last time we have learned how you can Change MyAccount navigation links title dynamically in Magento 2. Today we are going to learn how you can remove disable products from the cart. So, without further talks, let’s get started.
Now the era of the e-commerce world is up and running, and developers are expanding their coding capabilities to make CMS smarter and flexible. With this view, we are coming up and developing new codes to fulfill the function that any store owner like you require.
There are times when you require to remove disabled products from the cart. These disabled products are of no use to anyone, so it is better to remove them from the cart. To achieve this, we need to create a custom extension and test module to use the below code.
Create a Test Module, in which create these files,
Create file app/code/Vendor/Extension/etc/frontend/event.xml
Use the below code,
--------------------------- for code visit: https://magecomp.com/blog/how-to-rem...-in-magento-2/
Now, Create file app/code/Vendor/Extension/Observer/
Update cart after customer login at Observer.php
View more threads in the same category:
- buy a USA/UK passport online( https://legitcleandocs.com)visa, SNN, id card
- buy registered drivers license (legitcleandocs.com)IELTS, id
- Modalert 200 - Treat Your Oversleeping Issue
- Buy Passport,Driver License,Age & ID Card,(Whatsapp:.......: +1 (551) 239-2904) Visas
- Buy Passport,Driver License,Age & ID Card,(Whatsapp:.......: +1 (551) 239-2904) Visas
- buy real drivers license(https://legitcleandocs.com)buy Austria id card, passports
- Buy registered passport and driver's license online
- buy real passports online(https://legitcleandocs.com)drivers license, visa, id card
- BUY UNDETECTABLE GRADE A+ COUNTERFEIT BANKNOTE(legitcleandocs.com)
- Connecting the Dots: How to Get Magento 2 API Keys
-
-
Junior Member
Hi Friends,
Thanks for sharing helpful info.
-
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks