Page 1 of 1

How can I enable Wish list for anonymous user

Posted: Tue Nov 15, 2016 4:54 am
by tinaz1818
I want to add wishlist to anonymous user to send wish list through email without log in to AbleCommerce. How can I do that? Thanks

Re: How can I enable Wish list for anonymous user

Posted: Wed Nov 16, 2016 1:35 am
by nadeem
To make this happen, you have to update the code in two files:

1. Open /Members/MyWishlist.aspx.cs

Locate and comment out the following code

Code: Select all

if (EmailWishlistButton.Visible && AbleContext.Current.User.IsAnonymous)
                    EmailWishlistButton.OnClientClick = "return confirm('Only registered users can email a wishlist.  You will be asked to login or register if you continue.')";
Something like:

Code: Select all

//if (EmailWishlistButton.Visible && AbleContext.Current.User.IsAnonymous)
//    EmailWishlistButton.OnClientClick = "return confirm('Only registered users can email a wishlist.  You will be asked to login or register if you continue.')";
2. Open Members/Web.config file

Locate the following code

Code: Select all

<location path="MyWishlist.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
and replace with

Code: Select all

<location path="MyWishlist.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="SendMyWishList.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>

Re: How can I enable Wish list for anonymous user

Posted: Wed Nov 16, 2016 3:52 am
by tinaz1818
Thank you. I will try it.

Re: How can I enable Wish list for anonymous user

Posted: Wed Nov 16, 2016 4:47 am
by tinaz1818
HI nadeem,

I followed your suggestion but I can't see the "Add to wishlist "button or hyperlink on Default.aspx as anonymous user or as log in user.
Before I made any change there is not "Add to Wishlist" neither after I login. Any suggestion?

Re: How can I enable Wish list for anonymous user

Posted: Wed Nov 16, 2016 6:20 am
by nadeem
The 'Add to wishlist' button can be found on product detail page. If it isn't there, go to Administration > Configure > Store > General and check the checkbox that says 'Enable Wishlists' under Order Settings section.

Re: How can I enable Wish list for anonymous user

Posted: Wed Nov 16, 2016 7:45 am
by tinaz1818
I checked all files for "add to wish list" buttons in BuyProductDialog page all are visible and in Page_Init it says "AddToWishlistButton.Visible = AbleContext.Current.StoreMode == StoreMode.Standard;"
and "Enable Wishlists' is checked in Administration > Configure > Store > General Order Settings section. still can't get it displayed.

Re: How can I enable Wish list for anonymous user

Posted: Wed Nov 16, 2016 11:26 pm
by nadeem
That's strange. The wishlist button should be visible on product detail page similar to the attached image. There might be some customization made on your site to hide the add to wishlist button using some CSS?

Re: How can I enable Wish list for anonymous user

Posted: Thu Nov 17, 2016 3:18 am
by tinaz1818
I found on ProductPage.ascx The type initializer for CommerceBuilder.Utility.Logger threw an exception on user control of BuyProductPanle so it can't render the control, that may cause the problem but what dlls am I missing

Re: How can I enable Wish list for anonymous user

Posted: Thu Nov 17, 2016 4:15 am
by nadeem
Can you post the actual exception from the error log here? The exception detail will help digging into this issue.

Re: How can I enable Wish list for anonymous user

Posted: Fri Nov 18, 2016 4:39 am
by tinaz1818
When I debug it is not there.
"Error Rendering Control - BuyProductPanelAn unhandled exception has occurred.
The type initializer for 'CommerceBuilder.Utility.Logger' threw an exception."
is in the ProductPage.ascx design view.
And there is another error in BuyProductDialog ascx. Please see the atttachment
ErrorBuyProductDialog.PNG
ErrorInProductPageascx.PNG

Re: How can I enable Wish list for anonymous user

Posted: Fri Nov 18, 2016 9:38 am
by tinaz1818
It seems like the only way to add product to wishlist is to add it to cart first and then from Basket.aspx move to MyWishList.aspx to email me wishlist, which I think shouldn't be the behavior of AbleCommerce. Otherwise I can't find a way to add "Add to wishlist" button.

Re: How can I enable Wish list for anonymous user

Posted: Sun Nov 20, 2016 11:53 pm
by nadeem
It seems like the only way to add product to wishlist is to add it to cart first and then from Basket.aspx move to MyWishList.aspx to email me wishlist, which I think shouldn't be the behavior of AbleCommerce. Otherwise I can't find a way to add "Add to wishlist" button.
This is also the indirect way to add the item to wishlist while adding item to cart first. But there is also the direct way to add item to wishlist from product detail page. You can see both '+ Add to Cart' and 'Add to Wishlist' buttons on product detail page in the attached AddToWishlist.JPG in my previous post.

I think you are expecting to see the 'Add to Wishlist' button at home page similar to '+ Add to Cart' button? If that is the case, this button is not supposed to be display at home page. To find the wishlist button, you have to click on the product (name or image) to view it's detail and on that detail page, you can see both cart and wishlist buttons.

The errors in your attachment are just the design time errors showing in visual studio. These are automatically fixed during run time and render controls properly. So you don't have to be worry about these errors and can safely ignore as this these aren't blocking the 'Add to Wishlist' button from showing up.

To find any actual possible errors, go to Administration > Help > Error Log to see if there is something that is causing the wishlist button to not render. Otherwise, there is no reason that the add to wishlist button is not rendering for you.

Re: How can I enable Wish list for anonymous user

Posted: Mon Nov 21, 2016 4:30 am
by tinaz1818
loginDefaultNoFrontStore.PNG
detailedProductPageNoCartNoWishlist.PNG
On detail product page I can't Add to Wishlist or Add to cart no matter as anonymous or log in user once I click on the image of the product. I can only add the product from Default page to cart then add it to wishlist. No Add to art or Add to wishlist on product detail page. and there is no error logged.

Re: How can I enable Wish list for anonymous user

Posted: Mon Nov 21, 2016 4:47 am
by tinaz1818
How can I edit those dymatically created product detail page to add the "Add to cart" and "Add to wishlist" buttons.

Re: How can I enable Wish list for anonymous user

Posted: Mon Nov 21, 2016 5:27 am
by nadeem
I see. It appears that you are using AC 7.0.7 not Gold? And you have selected 'Product with Options Grid (Product3.aspx)' as a product display page?

If yes, login as admin user, select the 'Edit Page' mode from page footer and choose the display page to something else like Basic Product or Basic Product 2. Click on update theme and you can now see both add to cart and add to wishlist buttons.

Re: How can I enable Wish list for anonymous user

Posted: Mon Nov 21, 2016 7:35 am
by tinaz1818
GoldVersion709.PNG
I am using Gold.

Re: How can I enable Wish list for anonymous user

Posted: Mon Nov 21, 2016 11:07 am
by Katie
On detail product page I can't Add to Wishlist or Add to cart
You should revert to the original files. The Add to Cart button should appear, and if it doesn't, then something went wrong with your code changes. Once the stock file(s) are in place, then you can give Nadeem's custom code a try.

Thanks,
Katie

Re: How can I enable Wish list for anonymous user

Posted: Tue Nov 22, 2016 1:35 am
by nadeem
You need to change display page from 'Product With Option Grid' to 'Basic Product' from product footer section at product page. See attached screenshot of what I mean.

Re: How can I enable Wish list for anonymous user

Posted: Tue Nov 22, 2016 1:57 am
by Katie
If you want to familiarize yourself with the different display pages, they are all documented with examples of each.

http://help.ablecommerce.com/mergedProj ... _pages.htm

Hope this helps,
Katie