The add to cart button shows just fine for visitors viewing a friend's wish list, after the $login was commented out, like:
PHP Code:
{* START ADD TO CART BUTTONS *}
{* if $login *}{* HID IF LOGIN SO USER OR VISITOR CAN STILL ADD TO CART EVEN WHEN NOT LOGGED IN *}
{if $giftregistry eq ""}
<td class="ButtonsRow">{include file="buttons/add_to_cart.tpl" href="cart.php?mode=wl2cart&wlitem=`$wlitem_data.wishlistid`"}</td>
{else}
<td class="ButtonsRow">{include file="buttons/add_to_cart.tpl" href="cart.php?mode=wl2cart&fwlitem=`$wlitem_data.wishlistid`&eventid=`$eventid`"}</td>
{/if}
{* /if *}{* HID CLOSING IF LOGIN SO USER OR VISITOR CAN STILL ADD TO CART EVEN WHEN NOT LOGGED IN *}
{* END ADD TO CART BUTTONS *}
But of course now there's another issue... the URL that the wishlist is on is not httpS:// it's just http:// . Should be https:// since it's in the cart.php & that should be secure (at least in my store). So changing:
PHP Code:
{if $login ne ""}Your public Wish List URL:<br/>
{$http_location}/cart.php?mode=friend_wl&wlid={php}
$wishlistid = $this->_tpl_vars[login];
echo md5($wishlistid);
{/php}
to:
PHP Code:
{if $login ne ""}Your public Wish List URL:<br/>
{$https_location}/cart.php?mode=friend_wl&wlid={php}
$wishlistid = $this->_tpl_vars[login];
echo md5($wishlistid);
{/php}
for secure https:// url.
The final version I used is:
PHP Code:
{* START WISHLIST URL DISPLAY *}
{if $login ne ""}
<strong>You can share your own Wish List URL anywhere:</strong>
<br />
{$https_location}/cart.php?mode=friend_wl&wlid={php}
$wishlistid = $this->_tpl_vars[login];
echo md5($wishlistid);
{/php}
<br />
<br />
You can copy & link to your own Wish List URL anywhere:
<textarea rows="2" cols="110">
{$https_location}/cart.php?mode=friend_wl&wlid={php}
$wishlistid = $this->_tpl_vars[login];
echo md5($wishlistid);
{/php}
</textarea>
<br />
<br />
or by using the following pre-made HTML:
<textarea rows="2" cols="110"><A HREF="{$https_location}/cart.php?mode=friend_wl&wlid={php}$wishlistid = $this->_tpl_vars[login];
echo md5($wishlistid);
{/php}">My Wish List</A>
</textarea>
<br />
<br />
{/if}
{* END WISHLIST URL DISPLAY *}