0

We were using Magento 2.3.5 version.

Question: associated product qty are out of stock, so configurable product how to disable or redirect 302 pages?

Thanks in advanced.

1 Answer 1

0

SEO product error getting like: Either "offers", "review", or "aggregate rating" should be specified.

Thant means product price, review, and aggregate rating does not mention on the product => associated product qty are out of stock, so configurable product price is not getting that why this error is shown.

There are two ways to solve this issue.

  1. We have added qty on the associated product.
  2. We have product link redirect on 301 or homepage

I have used it on the second way. /Magento_Catalog/templates/product/view/form.phtml

<p>

<?PHP
 if (!$_product->isSaleable()){
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $redirect = $objectManager->get('\Magento\Framework\App\Response\Http');
    $storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
    $baseurl= $storeManager->getStore()->getBaseUrl();
    $redirect->setRedirect($baseurl);

}
?>
</p>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.