Product view back button
-
12-04-2021 - |
Domanda
I'm using magento 2.3, may i ask how can i made a back button on product view page. Beacuse i tried this code but not working in the product view page. Anyone can help? thank you!!
<a class="action back" href="<?php echo $block->escapeUrl($block->getBackUrl()) ?>"><?= __('Back') ?></a>
Soluzione
Use this
<a class="action back" href="javascript:history.back()"><?= __('Back') ?></a>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange