Skip to main content
The 2024 Developer Survey results are live! See the results

New answers tagged

0 votes

Get recently viewed products programmatically in Magento 2.2.2

protected $recentlyViewed; public function __construct( ... \Magento\Reports\Block\Product\Viewed $recentlyViewed ) { ... $this->recentlyViewed = $recentlyViewed; } /** * Get recently ...
Naimish Joshi's user avatar
0 votes
Accepted

Magento2.4.6: How to redirect a custom cms page to home page?

Just need to add URL Rewrite Requested URL : custom-cms-page Targeted URL : https://magento246.com/ URL Rewrite : Permanent
Afzal Arshad's user avatar
1 vote

Magento2.4.6: How to redirect a custom cms page to home page?

@Afzal Arshad Hey, you need to add below code in htaccess file Redirect 302 /custom-cms-page https://magento246.com/ Thank You!
Sanjay Jethva's user avatar
1 vote

Magento2.4.6: How to redirect a custom cms page to home page?

A simple solution would be adding a URL rewrite from the Magento Admin Panel. To do so: Login to Magento Admin Panel and go to Marketing > SEO & Search > URL Rewrites Remove rewrite for ...
Mohit Kumar Arora's user avatar
0 votes

Magento2.4.6: How to redirect a custom cms page to home page?

window.location.href = "https://magento246.com/" There are multiple ways. One way is using Javascript code to do redirect. You can add this script in admin cms page.
Mahesh V's user avatar
  • 121
1 vote

Magento2.4.6: How to redirect a custom cms page to home page?

Here is code for redirect from custom cms page to Homepage app/code/Vendor/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
Devang Hingu's user avatar

Top 50 recent answers are included