Magento 2: How to move Product page Review Section from tabs to Bottom of page? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraProduct page Review Section from tabs to Bottom of pageHow can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?How does Luma theme home page work?Product page Review Section from tabs to Bottom of pageHow to call getReviewsCollection() function from MagentoReviewBlockProductView?Magento 2: How to move Product page Attributes Section from tabs to Bottom of page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom Options
What to do with someone that cheated their way through university and a PhD program?
Is Bran literally the world's memory?
Is there any hidden 'W' sound after 'comment' in : Comment est-elle?
Is Electric Central Heating worth it if using Solar Panels?
Retract an already submitted recommendation letter (written for an undergrad student)
Arriving in Atlanta after US Preclearance in Dublin. Will I go through TSA security in Atlanta to transfer to a connecting flight?
How do I check if a string is entirely made of the same substring?
What ability score does a Hexblade's Pact Weapon use for attack and damage when wielded by another character?
What is this word supposed to be?
How to avoid introduction cliches
Is Diceware more secure than a long passphrase?
Could Neutrino technically as side-effect, incentivize centralization of the bitcoin network?
As an international instructor, should I openly talk about my accent?
What is the least dense liquid under normal conditions?
The art of proof summarizing. Are there known rules, or is it a purely common sense matter?
std::is_constructible on incomplete types
All ASCII characters with a given bit count
Is it acceptable to use working hours to read general interest books?
Prove the alternating sum of a decreasing sequence converging to 0 is Cauchy.
I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?
Where did Arya get these scars?
Trumpet valves, lengths, and pitch
Multiple options vs single option UI
How would this chord from "Rocket Man" be analyzed?
Magento 2: How to move Product page Review Section from tabs to Bottom of page?
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraProduct page Review Section from tabs to Bottom of pageHow can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?How does Luma theme home page work?Product page Review Section from tabs to Bottom of pageHow to call getReviewsCollection() function from MagentoReviewBlockProductView?Magento 2: How to move Product page Attributes Section from tabs to Bottom of page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom Options
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have referred this link i.e Product page Review Section from tabs to Bottom of page and followed the same. I also got the same result.
vendormagentotheme-frontend-lumaMagento_Themelayoutdefault.xml
I added below code :
<referenceBlock name="reviews.tab" remove="true" />
<referenceContainer name="content">
<container name="new_space" htmlTag="div" htmlClass="container" after="-">
<block class="MagentoReviewBlockProductViewListView" name="product.info.product_additional_data" as="product_additional_data" template="product/view/list.phtml" />
</container>
</referenceContainer>
appdesignfrontendTestreviewetcmodule.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Test_review" setup_version="1.0.0">
<sequence>
<module name="Magento_Catalog"/>
</sequence>
</module>
</config>
appdesignfrontendTestreviewMagento_Cataloglayoutcatalog_product_view.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Home page I am getting error
PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /chroot/home/londonwa/londonwala.in/html/vendor/magento/module-review/Block/Product/View.php:131
magento2 tabs luma-theme product-review
|
show 4 more comments
I have referred this link i.e Product page Review Section from tabs to Bottom of page and followed the same. I also got the same result.
vendormagentotheme-frontend-lumaMagento_Themelayoutdefault.xml
I added below code :
<referenceBlock name="reviews.tab" remove="true" />
<referenceContainer name="content">
<container name="new_space" htmlTag="div" htmlClass="container" after="-">
<block class="MagentoReviewBlockProductViewListView" name="product.info.product_additional_data" as="product_additional_data" template="product/view/list.phtml" />
</container>
</referenceContainer>
appdesignfrontendTestreviewetcmodule.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Test_review" setup_version="1.0.0">
<sequence>
<module name="Magento_Catalog"/>
</sequence>
</module>
</config>
appdesignfrontendTestreviewMagento_Cataloglayoutcatalog_product_view.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Home page I am getting error
PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /chroot/home/londonwa/londonwala.in/html/vendor/magento/module-review/Block/Product/View.php:131
magento2 tabs luma-theme product-review
Try <module name="Test_Review" setup_version="1.0.0"> instead of <module name="Test_review" setup_version="1.0.0">.
– Pawan
Jul 25 '17 at 1:30
Also don't need to create module for that, using XML it can be done
– Pawan
Jul 25 '17 at 1:32
I tried without using module.xml file but still it is giving error
– jassi
Jul 25 '17 at 1:36
1
Have you any custom theme ?
– Pawan
Jul 25 '17 at 1:38
1
you can create catalog_product_view.xml under app/design/namespace/theme/Magento_catalog/layout with same content
– Pawan
Jul 25 '17 at 1:39
|
show 4 more comments
I have referred this link i.e Product page Review Section from tabs to Bottom of page and followed the same. I also got the same result.
vendormagentotheme-frontend-lumaMagento_Themelayoutdefault.xml
I added below code :
<referenceBlock name="reviews.tab" remove="true" />
<referenceContainer name="content">
<container name="new_space" htmlTag="div" htmlClass="container" after="-">
<block class="MagentoReviewBlockProductViewListView" name="product.info.product_additional_data" as="product_additional_data" template="product/view/list.phtml" />
</container>
</referenceContainer>
appdesignfrontendTestreviewetcmodule.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Test_review" setup_version="1.0.0">
<sequence>
<module name="Magento_Catalog"/>
</sequence>
</module>
</config>
appdesignfrontendTestreviewMagento_Cataloglayoutcatalog_product_view.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Home page I am getting error
PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /chroot/home/londonwa/londonwala.in/html/vendor/magento/module-review/Block/Product/View.php:131
magento2 tabs luma-theme product-review
I have referred this link i.e Product page Review Section from tabs to Bottom of page and followed the same. I also got the same result.
vendormagentotheme-frontend-lumaMagento_Themelayoutdefault.xml
I added below code :
<referenceBlock name="reviews.tab" remove="true" />
<referenceContainer name="content">
<container name="new_space" htmlTag="div" htmlClass="container" after="-">
<block class="MagentoReviewBlockProductViewListView" name="product.info.product_additional_data" as="product_additional_data" template="product/view/list.phtml" />
</container>
</referenceContainer>
appdesignfrontendTestreviewetcmodule.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Test_review" setup_version="1.0.0">
<sequence>
<module name="Magento_Catalog"/>
</sequence>
</module>
</config>
appdesignfrontendTestreviewMagento_Cataloglayoutcatalog_product_view.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Home page I am getting error
PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /chroot/home/londonwa/londonwala.in/html/vendor/magento/module-review/Block/Product/View.php:131
magento2 tabs luma-theme product-review
magento2 tabs luma-theme product-review
edited Jul 25 '17 at 8:19
Prince Patel
14.8k65481
14.8k65481
asked Jul 25 '17 at 1:12
jassijassi
6481335
6481335
Try <module name="Test_Review" setup_version="1.0.0"> instead of <module name="Test_review" setup_version="1.0.0">.
– Pawan
Jul 25 '17 at 1:30
Also don't need to create module for that, using XML it can be done
– Pawan
Jul 25 '17 at 1:32
I tried without using module.xml file but still it is giving error
– jassi
Jul 25 '17 at 1:36
1
Have you any custom theme ?
– Pawan
Jul 25 '17 at 1:38
1
you can create catalog_product_view.xml under app/design/namespace/theme/Magento_catalog/layout with same content
– Pawan
Jul 25 '17 at 1:39
|
show 4 more comments
Try <module name="Test_Review" setup_version="1.0.0"> instead of <module name="Test_review" setup_version="1.0.0">.
– Pawan
Jul 25 '17 at 1:30
Also don't need to create module for that, using XML it can be done
– Pawan
Jul 25 '17 at 1:32
I tried without using module.xml file but still it is giving error
– jassi
Jul 25 '17 at 1:36
1
Have you any custom theme ?
– Pawan
Jul 25 '17 at 1:38
1
you can create catalog_product_view.xml under app/design/namespace/theme/Magento_catalog/layout with same content
– Pawan
Jul 25 '17 at 1:39
Try <module name="Test_Review" setup_version="1.0.0"> instead of <module name="Test_review" setup_version="1.0.0">.
– Pawan
Jul 25 '17 at 1:30
Try <module name="Test_Review" setup_version="1.0.0"> instead of <module name="Test_review" setup_version="1.0.0">.
– Pawan
Jul 25 '17 at 1:30
Also don't need to create module for that, using XML it can be done
– Pawan
Jul 25 '17 at 1:32
Also don't need to create module for that, using XML it can be done
– Pawan
Jul 25 '17 at 1:32
I tried without using module.xml file but still it is giving error
– jassi
Jul 25 '17 at 1:36
I tried without using module.xml file but still it is giving error
– jassi
Jul 25 '17 at 1:36
1
1
Have you any custom theme ?
– Pawan
Jul 25 '17 at 1:38
Have you any custom theme ?
– Pawan
Jul 25 '17 at 1:38
1
1
you can create catalog_product_view.xml under app/design/namespace/theme/Magento_catalog/layout with same content
– Pawan
Jul 25 '17 at 1:39
you can create catalog_product_view.xml under app/design/namespace/theme/Magento_catalog/layout with same content
– Pawan
Jul 25 '17 at 1:39
|
show 4 more comments
4 Answers
4
active
oldest
votes
Some additions for everyone who is also working with Magento 2.2.x.
You can pretty much do exactly the same as in Magento 2.1.x by starting with:
In your custom theme add:
appdesignfrontendCustomVendortheme-customMagento_Cataloglayoutcatalog_product_view.xml
In this file we are going to tell Magento to move the reviews block as follows:
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="product.info.details" />
</body>
</page>
For Magento 2.2.x this command alone will create a 'bug' where the reviews of the product won't show up, but the form will. To fix this issue we are gonna copy the following file:
vendormagentomodule-reviewviewfrontendwebjsprocess-review.js
And place it in your custom theme in the following path:
appdesignfrontendCustomVendortheme-customMagento_Reviewwebjsprocess-review.js
In this file go to line and comment those out 40-43 and 44-49 it should look as follows:
return function (config)
// var reviewTab = $(config.reviewsTabSelector),
// requiredReviewTabRole = 'tab';
// if (reviewTab.attr('role') === requiredReviewTabRole && reviewTab.hasClass('active'))
processReviews(config.productReviewUrl);
// else
// reviewTab.one('beforeOpen', function ()
// processReviews(config.productReviewUrl);
// );
//
$(function ()
$('.product-info-main .reviews-actions a').click(function (event)
var acnchor;
event.preventDefault();
acnchor = $(this).attr('href').replace(/^.*?(#);
);
;
We are telling Magento not to check if the reviews are in a tab but just render them either way.
Don't forget to recreate the symlinks in pub static by doing the following command in your CLI in the root of your Magento 2 store:
rm -rf pub/static/*
Always be careful with the rm -rf command because if you type the path incorrectly you might remove the entire directory!
That should do the trick!
You are the man, magento2.2.x bug section saved me hours
– Ramtin Gh
Apr 30 '18 at 17:21
JS file overriding isn't working.
– Yogesh Agarwal
May 31 '18 at 12:12
have you recreated the symlinks in the pub static directory?
– Pascal Wientjes
Jun 18 '18 at 8:04
Thanks @pascalW
– Pradeep Thakur
Apr 12 at 8:39
add a comment |
You only need to create catalog_product_view.xml and move reviews.tab
block after product.info.details
block
If you have a custom theme, create catalog_product_view.xml at
app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml
If you have a custom module, create catalog_product_view.xml at
app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml
Now add this code in xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="product.info.details" />
</body>
</page>
Now flush cache
I tried but layout file is not called only. catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:07
I tried same in my setup it's working fine. Please make sure file path is correct and flush cache.
– Prince Patel
Jul 26 '17 at 3:17
1
This is not working in 2.2.2
– Wasiq Shahrukh
Jan 12 '18 at 11:40
add a comment |
After moved reviews from tab
Magento_Review/web/js/process-reviews.js
$(function ()
$('.product-info-main .reviews-actions a').click(function (event)
var anchor;
event.preventDefault();
anchor = $(this).attr('href').replace(/^.*?(#);
);
New contributor
add a comment |
why edit magento core file vendormagentotheme-frontend-lumaMagento_Themelayoutdefault.xml
, if you want edit code luma theme, create a new theme(use parenet thme as a luma) and add your content. Also no need to add this content for this process.
Create a Custom theme.
Then Create appdesignfrontendTestreviewMagento_Cataloglayoutcatalog_product_view.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Clear the cache and Test it, its works for me.
EDIT:
Are mentioned for local you used luma theme, if you want to edit core luma theme to move review to bottom of the page.
try below code:
Go to this file <magento2-root>/vendor/magento/theme-frontend-luma/Magento_Catalog/layout/catalog_product_view.xml
Add below line to this file.
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Clear the cache and try it.
But, Core File Edit is not a right way, please create a custom theme and apply this change.
for time being in local I have used luma theme. In staging I will do it it newly created theme.
– jassi
Jul 25 '17 at 16:00
catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:09
@jassi i updated my answer.let me know if you have any error.
– Rajkumar .E
Jul 26 '17 at 5:28
When use below code than review form moved but review lists not showing
– himansu
Oct 28 '18 at 18:09
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f186255%2fmagento-2-how-to-move-product-page-review-section-from-tabs-to-bottom-of-page%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Some additions for everyone who is also working with Magento 2.2.x.
You can pretty much do exactly the same as in Magento 2.1.x by starting with:
In your custom theme add:
appdesignfrontendCustomVendortheme-customMagento_Cataloglayoutcatalog_product_view.xml
In this file we are going to tell Magento to move the reviews block as follows:
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="product.info.details" />
</body>
</page>
For Magento 2.2.x this command alone will create a 'bug' where the reviews of the product won't show up, but the form will. To fix this issue we are gonna copy the following file:
vendormagentomodule-reviewviewfrontendwebjsprocess-review.js
And place it in your custom theme in the following path:
appdesignfrontendCustomVendortheme-customMagento_Reviewwebjsprocess-review.js
In this file go to line and comment those out 40-43 and 44-49 it should look as follows:
return function (config)
// var reviewTab = $(config.reviewsTabSelector),
// requiredReviewTabRole = 'tab';
// if (reviewTab.attr('role') === requiredReviewTabRole && reviewTab.hasClass('active'))
processReviews(config.productReviewUrl);
// else
// reviewTab.one('beforeOpen', function ()
// processReviews(config.productReviewUrl);
// );
//
$(function ()
$('.product-info-main .reviews-actions a').click(function (event)
var acnchor;
event.preventDefault();
acnchor = $(this).attr('href').replace(/^.*?(#);
);
;
We are telling Magento not to check if the reviews are in a tab but just render them either way.
Don't forget to recreate the symlinks in pub static by doing the following command in your CLI in the root of your Magento 2 store:
rm -rf pub/static/*
Always be careful with the rm -rf command because if you type the path incorrectly you might remove the entire directory!
That should do the trick!
You are the man, magento2.2.x bug section saved me hours
– Ramtin Gh
Apr 30 '18 at 17:21
JS file overriding isn't working.
– Yogesh Agarwal
May 31 '18 at 12:12
have you recreated the symlinks in the pub static directory?
– Pascal Wientjes
Jun 18 '18 at 8:04
Thanks @pascalW
– Pradeep Thakur
Apr 12 at 8:39
add a comment |
Some additions for everyone who is also working with Magento 2.2.x.
You can pretty much do exactly the same as in Magento 2.1.x by starting with:
In your custom theme add:
appdesignfrontendCustomVendortheme-customMagento_Cataloglayoutcatalog_product_view.xml
In this file we are going to tell Magento to move the reviews block as follows:
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="product.info.details" />
</body>
</page>
For Magento 2.2.x this command alone will create a 'bug' where the reviews of the product won't show up, but the form will. To fix this issue we are gonna copy the following file:
vendormagentomodule-reviewviewfrontendwebjsprocess-review.js
And place it in your custom theme in the following path:
appdesignfrontendCustomVendortheme-customMagento_Reviewwebjsprocess-review.js
In this file go to line and comment those out 40-43 and 44-49 it should look as follows:
return function (config)
// var reviewTab = $(config.reviewsTabSelector),
// requiredReviewTabRole = 'tab';
// if (reviewTab.attr('role') === requiredReviewTabRole && reviewTab.hasClass('active'))
processReviews(config.productReviewUrl);
// else
// reviewTab.one('beforeOpen', function ()
// processReviews(config.productReviewUrl);
// );
//
$(function ()
$('.product-info-main .reviews-actions a').click(function (event)
var acnchor;
event.preventDefault();
acnchor = $(this).attr('href').replace(/^.*?(#);
);
;
We are telling Magento not to check if the reviews are in a tab but just render them either way.
Don't forget to recreate the symlinks in pub static by doing the following command in your CLI in the root of your Magento 2 store:
rm -rf pub/static/*
Always be careful with the rm -rf command because if you type the path incorrectly you might remove the entire directory!
That should do the trick!
You are the man, magento2.2.x bug section saved me hours
– Ramtin Gh
Apr 30 '18 at 17:21
JS file overriding isn't working.
– Yogesh Agarwal
May 31 '18 at 12:12
have you recreated the symlinks in the pub static directory?
– Pascal Wientjes
Jun 18 '18 at 8:04
Thanks @pascalW
– Pradeep Thakur
Apr 12 at 8:39
add a comment |
Some additions for everyone who is also working with Magento 2.2.x.
You can pretty much do exactly the same as in Magento 2.1.x by starting with:
In your custom theme add:
appdesignfrontendCustomVendortheme-customMagento_Cataloglayoutcatalog_product_view.xml
In this file we are going to tell Magento to move the reviews block as follows:
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="product.info.details" />
</body>
</page>
For Magento 2.2.x this command alone will create a 'bug' where the reviews of the product won't show up, but the form will. To fix this issue we are gonna copy the following file:
vendormagentomodule-reviewviewfrontendwebjsprocess-review.js
And place it in your custom theme in the following path:
appdesignfrontendCustomVendortheme-customMagento_Reviewwebjsprocess-review.js
In this file go to line and comment those out 40-43 and 44-49 it should look as follows:
return function (config)
// var reviewTab = $(config.reviewsTabSelector),
// requiredReviewTabRole = 'tab';
// if (reviewTab.attr('role') === requiredReviewTabRole && reviewTab.hasClass('active'))
processReviews(config.productReviewUrl);
// else
// reviewTab.one('beforeOpen', function ()
// processReviews(config.productReviewUrl);
// );
//
$(function ()
$('.product-info-main .reviews-actions a').click(function (event)
var acnchor;
event.preventDefault();
acnchor = $(this).attr('href').replace(/^.*?(#);
);
;
We are telling Magento not to check if the reviews are in a tab but just render them either way.
Don't forget to recreate the symlinks in pub static by doing the following command in your CLI in the root of your Magento 2 store:
rm -rf pub/static/*
Always be careful with the rm -rf command because if you type the path incorrectly you might remove the entire directory!
That should do the trick!
Some additions for everyone who is also working with Magento 2.2.x.
You can pretty much do exactly the same as in Magento 2.1.x by starting with:
In your custom theme add:
appdesignfrontendCustomVendortheme-customMagento_Cataloglayoutcatalog_product_view.xml
In this file we are going to tell Magento to move the reviews block as follows:
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="product.info.details" />
</body>
</page>
For Magento 2.2.x this command alone will create a 'bug' where the reviews of the product won't show up, but the form will. To fix this issue we are gonna copy the following file:
vendormagentomodule-reviewviewfrontendwebjsprocess-review.js
And place it in your custom theme in the following path:
appdesignfrontendCustomVendortheme-customMagento_Reviewwebjsprocess-review.js
In this file go to line and comment those out 40-43 and 44-49 it should look as follows:
return function (config)
// var reviewTab = $(config.reviewsTabSelector),
// requiredReviewTabRole = 'tab';
// if (reviewTab.attr('role') === requiredReviewTabRole && reviewTab.hasClass('active'))
processReviews(config.productReviewUrl);
// else
// reviewTab.one('beforeOpen', function ()
// processReviews(config.productReviewUrl);
// );
//
$(function ()
$('.product-info-main .reviews-actions a').click(function (event)
var acnchor;
event.preventDefault();
acnchor = $(this).attr('href').replace(/^.*?(#);
);
;
We are telling Magento not to check if the reviews are in a tab but just render them either way.
Don't forget to recreate the symlinks in pub static by doing the following command in your CLI in the root of your Magento 2 store:
rm -rf pub/static/*
Always be careful with the rm -rf command because if you type the path incorrectly you might remove the entire directory!
That should do the trick!
edited Feb 8 '18 at 11:39
Marco de Vries
36917
36917
answered Feb 8 '18 at 11:25
Pascal WientjesPascal Wientjes
442411
442411
You are the man, magento2.2.x bug section saved me hours
– Ramtin Gh
Apr 30 '18 at 17:21
JS file overriding isn't working.
– Yogesh Agarwal
May 31 '18 at 12:12
have you recreated the symlinks in the pub static directory?
– Pascal Wientjes
Jun 18 '18 at 8:04
Thanks @pascalW
– Pradeep Thakur
Apr 12 at 8:39
add a comment |
You are the man, magento2.2.x bug section saved me hours
– Ramtin Gh
Apr 30 '18 at 17:21
JS file overriding isn't working.
– Yogesh Agarwal
May 31 '18 at 12:12
have you recreated the symlinks in the pub static directory?
– Pascal Wientjes
Jun 18 '18 at 8:04
Thanks @pascalW
– Pradeep Thakur
Apr 12 at 8:39
You are the man, magento2.2.x bug section saved me hours
– Ramtin Gh
Apr 30 '18 at 17:21
You are the man, magento2.2.x bug section saved me hours
– Ramtin Gh
Apr 30 '18 at 17:21
JS file overriding isn't working.
– Yogesh Agarwal
May 31 '18 at 12:12
JS file overriding isn't working.
– Yogesh Agarwal
May 31 '18 at 12:12
have you recreated the symlinks in the pub static directory?
– Pascal Wientjes
Jun 18 '18 at 8:04
have you recreated the symlinks in the pub static directory?
– Pascal Wientjes
Jun 18 '18 at 8:04
Thanks @pascalW
– Pradeep Thakur
Apr 12 at 8:39
Thanks @pascalW
– Pradeep Thakur
Apr 12 at 8:39
add a comment |
You only need to create catalog_product_view.xml and move reviews.tab
block after product.info.details
block
If you have a custom theme, create catalog_product_view.xml at
app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml
If you have a custom module, create catalog_product_view.xml at
app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml
Now add this code in xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="product.info.details" />
</body>
</page>
Now flush cache
I tried but layout file is not called only. catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:07
I tried same in my setup it's working fine. Please make sure file path is correct and flush cache.
– Prince Patel
Jul 26 '17 at 3:17
1
This is not working in 2.2.2
– Wasiq Shahrukh
Jan 12 '18 at 11:40
add a comment |
You only need to create catalog_product_view.xml and move reviews.tab
block after product.info.details
block
If you have a custom theme, create catalog_product_view.xml at
app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml
If you have a custom module, create catalog_product_view.xml at
app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml
Now add this code in xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="product.info.details" />
</body>
</page>
Now flush cache
I tried but layout file is not called only. catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:07
I tried same in my setup it's working fine. Please make sure file path is correct and flush cache.
– Prince Patel
Jul 26 '17 at 3:17
1
This is not working in 2.2.2
– Wasiq Shahrukh
Jan 12 '18 at 11:40
add a comment |
You only need to create catalog_product_view.xml and move reviews.tab
block after product.info.details
block
If you have a custom theme, create catalog_product_view.xml at
app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml
If you have a custom module, create catalog_product_view.xml at
app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml
Now add this code in xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="product.info.details" />
</body>
</page>
Now flush cache
You only need to create catalog_product_view.xml and move reviews.tab
block after product.info.details
block
If you have a custom theme, create catalog_product_view.xml at
app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml
If you have a custom module, create catalog_product_view.xml at
app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml
Now add this code in xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="product.info.details" />
</body>
</page>
Now flush cache
edited Feb 11 '18 at 15:06
answered Jul 25 '17 at 5:20
Prince PatelPrince Patel
14.8k65481
14.8k65481
I tried but layout file is not called only. catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:07
I tried same in my setup it's working fine. Please make sure file path is correct and flush cache.
– Prince Patel
Jul 26 '17 at 3:17
1
This is not working in 2.2.2
– Wasiq Shahrukh
Jan 12 '18 at 11:40
add a comment |
I tried but layout file is not called only. catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:07
I tried same in my setup it's working fine. Please make sure file path is correct and flush cache.
– Prince Patel
Jul 26 '17 at 3:17
1
This is not working in 2.2.2
– Wasiq Shahrukh
Jan 12 '18 at 11:40
I tried but layout file is not called only. catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:07
I tried but layout file is not called only. catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:07
I tried same in my setup it's working fine. Please make sure file path is correct and flush cache.
– Prince Patel
Jul 26 '17 at 3:17
I tried same in my setup it's working fine. Please make sure file path is correct and flush cache.
– Prince Patel
Jul 26 '17 at 3:17
1
1
This is not working in 2.2.2
– Wasiq Shahrukh
Jan 12 '18 at 11:40
This is not working in 2.2.2
– Wasiq Shahrukh
Jan 12 '18 at 11:40
add a comment |
After moved reviews from tab
Magento_Review/web/js/process-reviews.js
$(function ()
$('.product-info-main .reviews-actions a').click(function (event)
var anchor;
event.preventDefault();
anchor = $(this).attr('href').replace(/^.*?(#);
);
New contributor
add a comment |
After moved reviews from tab
Magento_Review/web/js/process-reviews.js
$(function ()
$('.product-info-main .reviews-actions a').click(function (event)
var anchor;
event.preventDefault();
anchor = $(this).attr('href').replace(/^.*?(#);
);
New contributor
add a comment |
After moved reviews from tab
Magento_Review/web/js/process-reviews.js
$(function ()
$('.product-info-main .reviews-actions a').click(function (event)
var anchor;
event.preventDefault();
anchor = $(this).attr('href').replace(/^.*?(#);
);
New contributor
After moved reviews from tab
Magento_Review/web/js/process-reviews.js
$(function ()
$('.product-info-main .reviews-actions a').click(function (event)
var anchor;
event.preventDefault();
anchor = $(this).attr('href').replace(/^.*?(#);
);
New contributor
New contributor
answered 2 days ago
Vivek BarotVivek Barot
311
311
New contributor
New contributor
add a comment |
add a comment |
why edit magento core file vendormagentotheme-frontend-lumaMagento_Themelayoutdefault.xml
, if you want edit code luma theme, create a new theme(use parenet thme as a luma) and add your content. Also no need to add this content for this process.
Create a Custom theme.
Then Create appdesignfrontendTestreviewMagento_Cataloglayoutcatalog_product_view.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Clear the cache and Test it, its works for me.
EDIT:
Are mentioned for local you used luma theme, if you want to edit core luma theme to move review to bottom of the page.
try below code:
Go to this file <magento2-root>/vendor/magento/theme-frontend-luma/Magento_Catalog/layout/catalog_product_view.xml
Add below line to this file.
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Clear the cache and try it.
But, Core File Edit is not a right way, please create a custom theme and apply this change.
for time being in local I have used luma theme. In staging I will do it it newly created theme.
– jassi
Jul 25 '17 at 16:00
catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:09
@jassi i updated my answer.let me know if you have any error.
– Rajkumar .E
Jul 26 '17 at 5:28
When use below code than review form moved but review lists not showing
– himansu
Oct 28 '18 at 18:09
add a comment |
why edit magento core file vendormagentotheme-frontend-lumaMagento_Themelayoutdefault.xml
, if you want edit code luma theme, create a new theme(use parenet thme as a luma) and add your content. Also no need to add this content for this process.
Create a Custom theme.
Then Create appdesignfrontendTestreviewMagento_Cataloglayoutcatalog_product_view.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Clear the cache and Test it, its works for me.
EDIT:
Are mentioned for local you used luma theme, if you want to edit core luma theme to move review to bottom of the page.
try below code:
Go to this file <magento2-root>/vendor/magento/theme-frontend-luma/Magento_Catalog/layout/catalog_product_view.xml
Add below line to this file.
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Clear the cache and try it.
But, Core File Edit is not a right way, please create a custom theme and apply this change.
for time being in local I have used luma theme. In staging I will do it it newly created theme.
– jassi
Jul 25 '17 at 16:00
catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:09
@jassi i updated my answer.let me know if you have any error.
– Rajkumar .E
Jul 26 '17 at 5:28
When use below code than review form moved but review lists not showing
– himansu
Oct 28 '18 at 18:09
add a comment |
why edit magento core file vendormagentotheme-frontend-lumaMagento_Themelayoutdefault.xml
, if you want edit code luma theme, create a new theme(use parenet thme as a luma) and add your content. Also no need to add this content for this process.
Create a Custom theme.
Then Create appdesignfrontendTestreviewMagento_Cataloglayoutcatalog_product_view.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Clear the cache and Test it, its works for me.
EDIT:
Are mentioned for local you used luma theme, if you want to edit core luma theme to move review to bottom of the page.
try below code:
Go to this file <magento2-root>/vendor/magento/theme-frontend-luma/Magento_Catalog/layout/catalog_product_view.xml
Add below line to this file.
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Clear the cache and try it.
But, Core File Edit is not a right way, please create a custom theme and apply this change.
why edit magento core file vendormagentotheme-frontend-lumaMagento_Themelayoutdefault.xml
, if you want edit code luma theme, create a new theme(use parenet thme as a luma) and add your content. Also no need to add this content for this process.
Create a Custom theme.
Then Create appdesignfrontendTestreviewMagento_Cataloglayoutcatalog_product_view.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Clear the cache and Test it, its works for me.
EDIT:
Are mentioned for local you used luma theme, if you want to edit core luma theme to move review to bottom of the page.
try below code:
Go to this file <magento2-root>/vendor/magento/theme-frontend-luma/Magento_Catalog/layout/catalog_product_view.xml
Add below line to this file.
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="reviews.tab" destination="content" after="-"/>
</body>
</page>
Clear the cache and try it.
But, Core File Edit is not a right way, please create a custom theme and apply this change.
edited Jul 26 '17 at 5:27
answered Jul 25 '17 at 5:20
Rajkumar .ERajkumar .E
1,75051645
1,75051645
for time being in local I have used luma theme. In staging I will do it it newly created theme.
– jassi
Jul 25 '17 at 16:00
catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:09
@jassi i updated my answer.let me know if you have any error.
– Rajkumar .E
Jul 26 '17 at 5:28
When use below code than review form moved but review lists not showing
– himansu
Oct 28 '18 at 18:09
add a comment |
for time being in local I have used luma theme. In staging I will do it it newly created theme.
– jassi
Jul 25 '17 at 16:00
catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:09
@jassi i updated my answer.let me know if you have any error.
– Rajkumar .E
Jul 26 '17 at 5:28
When use below code than review form moved but review lists not showing
– himansu
Oct 28 '18 at 18:09
for time being in local I have used luma theme. In staging I will do it it newly created theme.
– jassi
Jul 25 '17 at 16:00
for time being in local I have used luma theme. In staging I will do it it newly created theme.
– jassi
Jul 25 '17 at 16:00
catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:09
catalog_product_view.xml file is not being called. No effect. Tab remains there. I also want to modify list.phtml file also.
– jassi
Jul 26 '17 at 1:09
@jassi i updated my answer.let me know if you have any error.
– Rajkumar .E
Jul 26 '17 at 5:28
@jassi i updated my answer.let me know if you have any error.
– Rajkumar .E
Jul 26 '17 at 5:28
When use below code than review form moved but review lists not showing
– himansu
Oct 28 '18 at 18:09
When use below code than review form moved but review lists not showing
– himansu
Oct 28 '18 at 18:09
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f186255%2fmagento-2-how-to-move-product-page-review-section-from-tabs-to-bottom-of-page%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Try <module name="Test_Review" setup_version="1.0.0"> instead of <module name="Test_review" setup_version="1.0.0">.
– Pawan
Jul 25 '17 at 1:30
Also don't need to create module for that, using XML it can be done
– Pawan
Jul 25 '17 at 1:32
I tried without using module.xml file but still it is giving error
– jassi
Jul 25 '17 at 1:36
1
Have you any custom theme ?
– Pawan
Jul 25 '17 at 1:38
1
you can create catalog_product_view.xml under app/design/namespace/theme/Magento_catalog/layout with same content
– Pawan
Jul 25 '17 at 1:39