3

Simply copy minicart.phtml from below path vendor/magento/module-checkout/view/frontend/templates/minicart.phtml and put in your theme as on below path and add your links in that file app/design/frontend/Your/Theme/Magento_checkout/templates/minicart.phtml


2

I have found the solution. I simply refreshed the quote after save cart using: $quoteId = $quote->getId(); $getQuotebyId = $this->quoteRepository->get($quoteId); $this->quoteRepository->save($getQuotebyId); The updated code is: class SamplesRemoveExtra implements ObserverInterface { protected $checkoutSession; protected $itemModel; ...


2

<!-- ko ifnot: isCustomerLoggedIn() --> <!-- /ko --> I found it effective in checking customer is login


1

You need to override minicart.phtml file using below code inside your custom module's default.xml file <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <...


1

Use template path hint to show the file path. This will show all the .phtml files used on page view. To enable template hints, your environment should be development Note: Do not enable template hint on live website Use this one to enable template path hints https://magento.stackexchange.com/a/91240/31910 Other way to find code is to use well known IDE like ...


1

You can change button text by create mixin Create requirejs-config.js file : app/code/Vendor/Module/view/frontend/requirejs-config.js var config = { config: { mixins: { 'Magento_Checkout/js/sidebar': { 'Vendor_Module/js/sidebar-mixin': true } }, } }; Create sidebar-mixin.js file : app/code/...


1

Please try below css. I believe you used the same class as reference link. .component-wrapper h4, .component-wrapper span{ color:#000; }


1

Looking at a 2.4.2 site, the shipping amount isn't stored with the cart data used by that template. (Also, I don't think shipping cost is calculated until the customer visits the cart page, even if it is flat rate. But that is a separate issue.) The template's cart data is set in: vendor/magento/module-tax/view/frontend/web/js/view/checkout/minicart/subtotal/...


1

Try to reload customer data section every time before get items. Like this: $('#top-cart-btn-checkout').click(function (event) { let sections = ['cart']; customerData.invalidate(sections); customerData.reload(sections, true); var resultItems = customerData.get('cart')().items; _.each(resultItems, function (item, key) { console.log(...


1

You can use contains function of underscore js to check in array items. And after use Magento_Ui/js/modal/modal to show popup based on condition. var myItems = ['1', '2', '3', '5']; _.each(items, function (item, key) { if(_.contains(myItems, item.product_id)) { // productId available in myItems array } }, this); Here is the sample code with ...


1

You can use undescore each function to get product id from items. _.each(items, function (item, key) { console.log(item.product_id); }, this); So you final code looks like: define([ 'uiComponent', 'jquery', 'underscore' ], function (Component, $, _) { ... ... getCartItems: function () { var items = this.getCartParam('...


1

Im sorry to call such attention to this question but there's a TON wrong here. Hopefully, you will take some lessons away from this answer. Don't use the Object Manager in your code Don't get the quote from the session. But IF you insist, you should probably use $objectManager->get('class name') not $objectManager->create('class name'). Get ensures ...


1

I don't understood well the question, but if you want to change which product's image of configurable product will be showed in cart and minicart, in latest Magento version you can do it in: Store-> Configuration-> Sales-> Checkout-> Shopping Cart-> Configurable Product Image Where you can choose between: Product Thumbnail Itself or Parent ...


1

Replace the minicart.phtml and content.html file from your theme with core template (vendor\magento\module-checkout\view\frontend\templates\cart‌​) , (vendor\magento\module-checkout\view\frontend\web\template\minicart\content.html). Run the following commands - rm -rf pub/static/frontend rm -rf var php bin/magento setup:static-content:deploy -f I hope it ...


1

Background: I had issue in Magento 2. I found out form_key was coming null in parms. Due to which below condition in execute() method if (!$this->getFormKeyValidator()->validate($this->getRequest())) { return $this->resultRedirectFactory->create()->setPath('*/cart/'); } stops action of removing item from mini cart ...


Only top voted, non community-wiki answers of a minimum length are eligible