5

I get it, I think you are in the right way, but I think you have to save the quote. If you take a look on this class : \Magento\Checkout\Controller\Cart\Add you can see at Line 114 : $this->cart->addProduct($product, $params); if (!empty($related)) { $this->cart->addProductsByIds(explode(',', $related)); }...


3

You need to deploy the static after you run this command php bin/magento setup:upgrade by running this command for Magento version 2.2 and above php -dmemory_limit=-1 bin/magento setup:static-content:deploy -f OR php -dmemory_limit=-1 bin/magento s:s:d -f for Magento version 2.1 and below php -dmemory_limit=-1 bin/magento setup:static-content:deploy ...


3

I did a snippet which allows you to change the price. Actually, it changes the price after you add product in your basket. In other words, it changes the prices of your items in your quote. https://gist.github.com/0-Sony/d9d2ea792b5533bfeaff28827e6f207a Hope it helps.


3

As per Magento. when you have run php bin/magento setup:upgrade command then all cache ,pages_cache and static content and Code compiler are clear that why you are getting error** An error has happened during application run. See exception log for details. At production mode, Magento does not auto-generate static content, class compilation, So after ...


3

For Upadate cart price you have to use Model cart instead checkout session. Load item from cart and update it. <?php $items = $this->cart->getQuote()->getAllItems(); //Magento\Checkout\Model\Cart $cart foreach($items as $item) { $item = $this->cart->getQuote()->getItemById($item->getId()); if (!$item) { continue; }...


3

@felix,You need to set setSubtotal() for a quote. Set Subtotal outside for loop. $subTotal = $cart->getQuote()->setSubtotal($price); $this->checkoutSession->getQuote()->save(); like this foreach ($allItems as $item) { $item = ( $item->getParentItem() ? $item->getParentItem() : $item ); $price = 100; //...


3

You want to update the row total and not the subtotal, use method $item->setRowTotal() or $item->setBaseRowTotal(). Also, it might help to add $item->save() before the end of the loop. Subtotal is the order/cart subtotal.


2

There is no way to install a plugin for specific store. Plugin will install globally. If your module has enable / disable functionality then you can disable that module for specific store from admin configuration. Select the store view from the switcher and disable that module for that store.


2

You can try one of the below free extensions for the Cookie Compliance. https://magecomp.com/magento-2-cookie-compliance.html https://bsscommerce.com/magento-2-cookie-notice-extension.html Hope it helps!!!


1

You need to run the below deployment commands as well after php bin/magento setup:upgrade php bin/magento s:s:d -f php bin/magento c:f Also, please check if your pub directory has .htaccess file as well. Hope it helps!!!


1

You need to add required libraries in your magento's root > composer.json file from your modules composer.json file. After that you need to run composer update command.


1

These modules -- are they related or dependent to each other? Are they of the same module type -- ie. magento2-theme, magento2-module, magento2-language? Do you have your vendor name configured in Magento Company profile? If all these are yes, then put the modules within a directory that matches your vendor name: <vendor_name>/ <vendor_name>/...


1

You can try below extension for the product image popup. https://templates-master.com/magento-easy-lightbox.html Hope it helps!!!


1

Search for the extension that you want to Install Download the Extension files. Open the zip/tar file and make sure all the folders in the extension overlap to your magento root directory folders. Connect to your Host using FTP Client and copy the zip/tar file in the root directory of Magento. Connect to your Host using ssh and extract the extension zip/tar ...


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