I'm trying to set up a password-protected uCommerce store. I have the entire root store node password-protected using Umbraco's built-in Public Access settings. This is working fine for the most part, but when uCommerce tries to send an Order Confirmation email, what gets sent out is the HTML of the login page. I'm guessing that the backend code is simply requesting the email template node, hitting the same login requirement that an actual user would, and is just sending out whatever HTML it gets back, in this case the login page.
If I could move the 'emails' node outside the main store node, I could leave Public Access restrictions disabled for it, and I think that would solve my problem. I tried just moving it, and that didn't work. I'm guessing I would have to update code somewhere with the new node location, but I'm not sure what or where.
Any thoughts on how I could do this, or any other ways I could work around this problem?
I solved my own problem. In case anyone is trying to do something similar, here's what I did:
I disabled the Umbraco Public access restrictions, and made a custom User Control that I placed in a Macro and inserted at the top of the 'RazorStore' Master template. In that user control, I placed some code that checks if the visitor is logged in as a member, and whether that member is assigned to the group I wanted to let in. If they have the correct permissions, it does nothing. If they don't, it does a 'response.redirect' to the login page. Since the Order Confirmation email uses a different Master template from the rest of the pages, it's not affected by this. Pretty simple, but it seems to work well.
I also found where I would specify a new template location, which might be another way this issue could be worked around. That would be under uCommerce > Email > Profiles > Default > Order Confirmation. Then there is a separate 'Email Template' field under the tab for each language at the top.
Move 'emails' node outside the main store node?
Hi,
I'm trying to set up a password-protected uCommerce store. I have the entire root store node password-protected using Umbraco's built-in Public Access settings. This is working fine for the most part, but when uCommerce tries to send an Order Confirmation email, what gets sent out is the HTML of the login page. I'm guessing that the backend code is simply requesting the email template node, hitting the same login requirement that an actual user would, and is just sending out whatever HTML it gets back, in this case the login page.
If I could move the 'emails' node outside the main store node, I could leave Public Access restrictions disabled for it, and I think that would solve my problem. I tried just moving it, and that didn't work. I'm guessing I would have to update code somewhere with the new node location, but I'm not sure what or where.
Any thoughts on how I could do this, or any other ways I could work around this problem?
Thanks,
David
I solved my own problem. In case anyone is trying to do something similar, here's what I did:
I disabled the Umbraco Public access restrictions, and made a custom User Control that I placed in a Macro and inserted at the top of the 'RazorStore' Master template. In that user control, I placed some code that checks if the visitor is logged in as a member, and whether that member is assigned to the group I wanted to let in. If they have the correct permissions, it does nothing. If they don't, it does a 'response.redirect' to the login page. Since the Order Confirmation email uses a different Master template from the rest of the pages, it's not affected by this. Pretty simple, but it seems to work well.
I also found where I would specify a new template location, which might be another way this issue could be worked around. That would be under uCommerce > Email > Profiles > Default > Order Confirmation. Then there is a separate 'Email Template' field under the tab for each language at the top.
Hi David,
Thanks for being awesome and posting your follow-up in the forum. #h5yr!
is working on a reply...