Question

Currently, when I open a product page, I am presented with three buttons

  • Add to Wishlist
  • Add to Compare
  • And Share

If I click share, it redirects me to a login page. Why a person needs to be logged in in order to share something, I have no idea. Is there a reason for this? Can I fix this?

The only fix I have come up with is to use an extension call AddTo.

Here is a picture enter image description here

If I click "Share", I am redirected to login.

Was it helpful?

Solution

If you are talking about the send to a friend feature, this can be activated for guest or only registered users.

In the controller Mage_Sendfriend_ProductController::preDispatch it checks to see if the feature is activated only for registered users via $helper->isAllowForGuest()

This helper function simply looks for the config value sendfriend/email/allow_guest this can be changed via the admin section Email to a Friend.

OTHER TIPS

Simply - Overwrite - /vendor/magento/module-send-friend/Controller

/* if (!$helper->isAllowForGuest() && !$session->authenticate()) { ---- Before*/

if ($helper->isAllowForGuest() && $session->authenticate()) { /-------- After/

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top