Skip to content

Commit a0a8492

Browse files
ENGCOM-5267: Fixed #22266: 404 message for product alerts when not logged in #23218
- Merge Pull Request #23218 from ArjenMiedema/magento2:bugfix/22266-fix-404-for-product-alerts - Merged commits: 1. 361965b
2 parents 48190de + 361965b commit a0a8492

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/code/Magento/ProductAlert/Controller/Add/Price.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Magento\ProductAlert\Controller\Add;
88

9-
use Magento\Framework\App\Action\HttpPostActionInterface;
9+
use Magento\Framework\App\Action\HttpGetActionInterface;
1010
use Magento\ProductAlert\Controller\Add as AddController;
1111
use Magento\Framework\App\Action\Context;
1212
use Magento\Customer\Model\Session as CustomerSession;
@@ -20,7 +20,7 @@
2020
/**
2121
* Controller for notifying about price.
2222
*/
23-
class Price extends AddController implements HttpPostActionInterface
23+
class Price extends AddController implements HttpGetActionInterface
2424
{
2525
/**
2626
* @var \Magento\Store\Model\StoreManagerInterface

app/code/Magento/ProductAlert/Controller/Add/Stock.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Magento\ProductAlert\Controller\Add;
88

9-
use Magento\Framework\App\Action\HttpPostActionInterface;
9+
use Magento\Framework\App\Action\HttpGetActionInterface;
1010
use Magento\ProductAlert\Controller\Add as AddController;
1111
use Magento\Framework\App\Action\Context;
1212
use Magento\Customer\Model\Session as CustomerSession;
@@ -19,7 +19,7 @@
1919
/**
2020
* Controller for notifying about stock.
2121
*/
22-
class Stock extends AddController implements HttpPostActionInterface
22+
class Stock extends AddController implements HttpGetActionInterface
2323
{
2424
/**
2525
* @var \Magento\Catalog\Api\ProductRepositoryInterface

app/code/Magento/ProductAlert/view/frontend/templates/product/view.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
?>
77
<?php /* @var $block \Magento\ProductAlert\Block\Product\View */?>
88
<div class="product alert <?= $block->getHtmlClass() ?>">
9-
<a href="#" data-post='<?= /* @noEscape */ $block->getPostAction() ?>'
9+
<a href="<?= $block->escapeUrl($block->getSignupUrl()) ?>"
1010
title="<?= $block->escapeHtml(__($block->getSignupLabel())) ?>" class="action alert">
1111
<?= $block->escapeHtml(__($block->getSignupLabel())) ?>
1212
</a>

0 commit comments

Comments
 (0)