문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

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

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

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top