Hot answers tagged

2

You can run crons manually if you install the N98 Magerun tool for Magento 2 https://github.com/netz98/n98-magerun2. The crons can individually be executed by running ./n98-magerun2.phar sys:cron:run <identifier>, which in your case, it will be: ./n98-magerun2.phar sys:cron:run sales_clean_quotes without the n98 tool, you are not able to run an ...


1

If you have quote object. You can access quote_address data like: echo $quote->getBillingAddress()->getId(); // billing address id echo $quote->getBillingAddress()->getEmail(); echo $quote->getShippingAddress()->getId(); // shipping address id echo $quote->getShippingAddress()->getShippingMethod(); If you have $quoteId protected $...


1

You can get all the params value using this code $subject->getRequest()->getParams(); You can get all the post value using this way, $subject->getRequest()->getPostValue();


1

Need to inject in your construct \Magento\Quote\Model\QuoteFactory <?php namespace RH\Helloworld\Cron; class CustomCronQuote { protected $quoteFactory; public function __construct( \Magento\Quote\Model\QuoteFactory $quoteFactory ) { $this->quoteFactory = $quoteFactory; } public function execute() { $...


1

You can not directly get quote in collect rate. The $this->checkoutSession->getQuote() will call your collectRates function at the end, so you will end up getting infinite loop. the $request variable will also give you almost all the data you need, like $request->getAllItems() $request->getOrderSubtotal(); $request->getDestCity(); etc So ...


1

You can run crons manually create one file like custom_cron.php in root directory of magento and set in cron as per your requirement but it's not good way for that but temporary solution. Also, you have run one time then hit URL in browser for that as below. https://example.com/custom_cron.php <?php error_reporting(E_ERROR | E_WARNING); ini_set('...


1

Having located the override in our setup (in a checkout module that adds custom fields), I was able to confirm that normally processed quotes are in fact being set inactive when converted to orders. The fault seems to be two-fold: Magento is sometimes creating "null" quotes for visitors. Can't fathom why it sometimes does and sometimes doesn't, ...


1

You can see the history for this implementation here. Likely, its done to prevent sequential ID attacks. (Bots have a harder time collecting quote data en masse now because the masks are not as predictable as IDs.)


1

Below is the solution for Magento 2.3.5 Please override Failure.php and change public function as below, public function execute() { $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $_checkoutSession = $objectManager->create('\Magento\Checkout\Model\Session'); $_quoteFactory = $objectManager->create('\Magento\Quote\...


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