How can I enable Wish list for anonymous user

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
tinaz1818
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Aug 07, 2009 11:57 am

How can I enable Wish list for anonymous user

Post by tinaz1818 » Tue Nov 15, 2016 4:54 am

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

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: How can I enable Wish list for anonymous user

Post by nadeem » Wed Nov 16, 2016 1:35 am

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>

tinaz1818
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Aug 07, 2009 11:57 am

Re: How can I enable Wish list for anonymous user

Post by tinaz1818 » Wed Nov 16, 2016 3:52 am

Thank you. I will try it.

tinaz1818
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Aug 07, 2009 11:57 am

Re: How can I enable Wish list for anonymous user

Post by tinaz1818 » Wed Nov 16, 2016 4:47 am

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?

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: How can I enable Wish list for anonymous user

Post by nadeem » Wed Nov 16, 2016 6:20 am

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.

tinaz1818
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Aug 07, 2009 11:57 am

Re: How can I enable Wish list for anonymous user

Post by tinaz1818 » Wed Nov 16, 2016 7:45 am

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.

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: How can I enable Wish list for anonymous user

Post by nadeem » Wed Nov 16, 2016 11:26 pm

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?

tinaz1818
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Aug 07, 2009 11:57 am

Re: How can I enable Wish list for anonymous user

Post by tinaz1818 » Thu Nov 17, 2016 3:18 am

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

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: How can I enable Wish list for anonymous user

Post by nadeem » Thu Nov 17, 2016 4:15 am

Can you post the actual exception from the error log here? The exception detail will help digging into this issue.

tinaz1818
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Aug 07, 2009 11:57 am

Re: How can I enable Wish list for anonymous user

Post by tinaz1818 » Fri Nov 18, 2016 4:39 am

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

tinaz1818
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Aug 07, 2009 11:57 am

Re: How can I enable Wish list for anonymous user

Post by tinaz1818 » Fri Nov 18, 2016 9:38 am

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.

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: How can I enable Wish list for anonymous user

Post by nadeem » Sun Nov 20, 2016 11:53 pm

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.

tinaz1818
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Aug 07, 2009 11:57 am

Re: How can I enable Wish list for anonymous user

Post by tinaz1818 » Mon Nov 21, 2016 4:30 am

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.

tinaz1818
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Aug 07, 2009 11:57 am

Re: How can I enable Wish list for anonymous user

Post by tinaz1818 » Mon Nov 21, 2016 4:47 am

How can I edit those dymatically created product detail page to add the "Add to cart" and "Add to wishlist" buttons.

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: How can I enable Wish list for anonymous user

Post by nadeem » Mon Nov 21, 2016 5:27 am

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.

tinaz1818
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Aug 07, 2009 11:57 am

Re: How can I enable Wish list for anonymous user

Post by tinaz1818 » Mon Nov 21, 2016 7:35 am

GoldVersion709.PNG
I am using Gold.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: How can I enable Wish list for anonymous user

Post by Katie » Mon Nov 21, 2016 11:07 am

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
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: How can I enable Wish list for anonymous user

Post by nadeem » Tue Nov 22, 2016 1:35 am

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.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: How can I enable Wish list for anonymous user

Post by Katie » Tue Nov 22, 2016 1:57 am

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
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Post Reply