Nop 4.1 Source

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hi All,

I am trying to convert a project over to Nop4.10 and I've found that SercureUrl does not exist in CurrentStore.  What method shold I use instead of the below.


string url = _storeContext.CurrentStore.SslEnabled ? _storeContext.CurrentStore.SecureUrl + "/content/images/" : _storeContext.CurrentStore.Url + "/content/images/";



Regards,
Paul
4 years ago
Hello,

You can use the string GetStoreLocation(bool? useSsl = null), but you'll have to inject the WebHelper (IWebHelper, ~/Libraries/Nop.Core/IWebHelper.cs)  in your controller/class.

Hope that helps!
4 years ago
OK, ppreciate that.  Will look at it soon.

Cheers,
Paul
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.