Hello,
I've took over a Magento 2.4 app, not entirely sure where to start to look, last worked with V1.9 and installed V2 when it came out, but after that I haven't touched magento.
Someone has modified either the code or in the admin so when an Item is added to the cart, it directs them to the Checkout - Shipping & Billing and not the Cart.
Is this a design issue or an admin issue, if so can someone give me some guidance so I can re-implement it.
I'm hoping it's something obvious
Regards
Mal
Solved! Go to Solution.
Not sure what went on with Adobe, but I responded to this yesterday
From investigating,
Longstone Base - Main > Magento Blank > Longstone/base_main (this for all sites)
Then for the site I'm trying to sort is:
Longstone Base - Longstone > Longstone Base - Main > Longstone/base_longstone
The Blank theme seems to be in
vendor\magento\theme-frontend-blank
from the above I think any template overrides are in:
app\design\frontend\Longstone\base\longstone
app\design\frontend\Longstone\base\main
We seem to have what looks like a module:
app\code\Longstone\RedirectToCheckoutFromProductAddToCart
Which seems to be disabled here
C:\xampp\htdocs\longstone\app\etc\config.php
<?php
namespace Longstone\Base\Plugin;
use Magento\Checkout\Helper\Cart;
use Magento\Framework\Controller\ResultFactory;
class CheckoutRedirect
{
protected $helper;
protected $resultFactory;
public function __construct(
Cart $helper,
ResultFactory $resultFactory
) {
$this->helper = $helper;
$this->resultFactory = $resultFactory;
}
public function aroundExecute(\Magento\Checkout\Controller\Cart\Index $subject, callable $proceed) {
$cartCount = $this->helper->getSummaryCount();
$redirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
if($cartCount > 0) {
$redirect->setUrl('/checkout/index/index');
} else {
$redirect->setUrl('/');
}
return $redirect;
}
}
?>I used to understand M1 but M2, not 100% sure where to start to get it back to a default M2 checkout, where you add Item to basket, directs to basket, so we can run cross selling products then to checkout??
Any help appreciated
Mal
Hello @mallongstoaf62
Are you using the default Magento Luma theme?
Not sure what went on with Adobe, but I responded to this yesterday
From investigating,
Longstone Base - Main > Magento Blank > Longstone/base_main (this for all sites)
Then for the site I'm trying to sort is:
Longstone Base - Longstone > Longstone Base - Main > Longstone/base_longstone
The Blank theme seems to be in
vendor\magento\theme-frontend-blank
from the above I think any template overrides are in:
app\design\frontend\Longstone\base\longstone
app\design\frontend\Longstone\base\main
We seem to have what looks like a module:
app\code\Longstone\RedirectToCheckoutFromProductAddToCart
Which seems to be disabled here
C:\xampp\htdocs\longstone\app\etc\config.php
<?php
namespace Longstone\Base\Plugin;
use Magento\Checkout\Helper\Cart;
use Magento\Framework\Controller\ResultFactory;
class CheckoutRedirect
{
protected $helper;
protected $resultFactory;
public function __construct(
Cart $helper,
ResultFactory $resultFactory
) {
$this->helper = $helper;
$this->resultFactory = $resultFactory;
}
public function aroundExecute(\Magento\Checkout\Controller\Cart\Index $subject, callable $proceed) {
$cartCount = $this->helper->getSummaryCount();
$redirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
if($cartCount > 0) {
$redirect->setUrl('/checkout/index/index');
} else {
$redirect->setUrl('/');
}
return $redirect;
}
}
?>I used to understand M1 but M2, not 100% sure where to start to get it back to a default M2 checkout, where you add Item to basket, directs to basket, so we can run cross selling products then to checkout??
Any help appreciated
Mal