New answers tagged

1

Not sure but let's check this Go to Stores -> configuration -> Under sales tab -> checkout under shopping cart section on the right side, check After Adding a Product Redirect to Shopping Cart -> NO If that is yes then it must to redirecting to cart page after adding the product to cart. Hope this helps


0

You can use some free Login As Customer extension for Magento 2, then you can login with any customer on the frontend and place an order on behalf of that customer. Of course, you can also create an extension for this but this is a quick win for you


0

"This worked for me, after trying everything: Assuming your site is in Developer Mode, you can change it to Production Mode, clear/flush cache and then switch back to Developer Mode." THIS WORKED FOR ME IT'S LIFE SAVER! THANK YOU!!


0

You can override the price phtml using your custom theme file and get product price over there and compare your price using if condition if price is greater then your given price show your custom text otherwise default functionality.


0

Something like this as a base https://github.com/DominicWatts/CallForPrice But instead of looking at call for price attribute check price is over 20000 Or alternatively set any over 20000 as call for price Either on cron / console or via admin grid bulk actions


0

When something is added to the cart, the local storage information is updated and you can subscribe to a knockout observable in the cart section of the customer data to be notified when it's content changes. Here is an example: require(['Magento_Customer/js/customer-data'], function (customerData) { var cart = customerData.get('cart'); var count = ...


0

Below is my code to stop product from being added to cart and display error message using observer. use Magento\Framework\Event\ObserverInterface; class ProductAddCartBefore implements ObserverInterface { protected $_request; protected $_checkoutSession; protected $_messageManager; public function __construct( \Magento\Framework\App\RequestInterface $...


0

Overide form.phtml in vendor/magento/module_catalog/templates/product/view/form.phtml, and change form action to custom controller. app/design/frontend/Vendor/Module/Magento_Catalog/templates/product/view/form.phtml <?php $_helper = $this->helper('Magento\Catalog\Helper\Output'); ?> <?php $_product = $block->getProduct(); $formSubmitUrl =...


0

Create di.xml in your custom module, <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd" > <type name="Magento\Quote\Model\Quote\Item"> <plugin name="beforeDispatch" type="Vendor\Module\Plugin\Model\Quote\...


0

My understanding stock is not removed until the order is placed, and the option in magento is "Decrease Stock When Order is Placed" so the wording implys the same. I also tested this on my own store, and it did not change the product to out of stock when it was added to a cart, even when I was at the checkout, it was still showing as in stock to other ...


Top 50 recent answers are included