-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update details.phtml #20858
Update details.phtml #20858
Conversation
Good afternoon, I just encountered a problem with product's tabs in product info. I realized when description or other custom tabs have links, when you click on it, nothing happen. It caused by the script mage/tabs.js in details.phtml. The current link to trigger the tab is declared with data-role="switch" instead of a data-role="trigger". https://github.com/magento/magento2/blob/4f232511ceba6f1f7bf6f73b3b5609bd087f8c74/app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml#L24-L37 When not even the trigger and the header is declared respectively by data-role="heading" and data-role="trigger", the script based it search on the current collapsible panel declared by data-role="collapsible". https://github.com/magento/magento2/blob/4f232511ceba6f1f7bf6f73b3b5609bd087f8c74/lib/web/mage/tabs.js#L99-L124 You can simply try by adding a link in the product description. Tell me if I am wrong. Cheers, Ilan PARMENTIER
Hi @mageho. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @VladimirZaets, thank you for the review. |
@magento-engcom-team give me test instance |
Hi @sdzhepa. Thank you for your request. I'm working on Magento instance for you |
Hi @sdzhepa, here is your new Magento instance. |
Hi @mageho, thank you for your contribution! |
Good afternoon,
I just encountered a problem with product's tabs in product info.
I realized when description or other custom tabs have links, when you click on it, nothing happen.
It caused by the script mage/tabs.js in details.phtml.
The current link to trigger the tab is declared with data-role="switch" instead of a data-role="trigger".
magento2/app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml
Lines 24 to 37 in 4f23251
When not even the trigger and the header is declared respectively by data-role="heading" and data-role="trigger", the script based it search on the current collapsible panel declared by data-role="collapsible".
magento2/lib/web/mage/tabs.js
Lines 99 to 124 in 4f23251
You can simply try by adding a link in the product description.
Tell me if I am wrong.
Cheers,
Ilan PARMENTIER