Hi Deni,
This method works perfectly. Thank you for providing me such a smart advice.
Thanks again for your help.
regards,
Lee Ka
@Html.Action("AllShops", "StoreLocator", new { isStoreLocatorCalledFromHomePage = true })
Layout = "~/Views/Shared/_ColumnsOne.cshtml";
if (Url.RequestContext.RouteData.Values["isStoreLocatorCalledFromHomePage"] != null && bool.Parse(Url.RequestContext.RouteData.Values["isStoreLocatorCalledFromHomePage"].ToString()))
{
Layout = "";
}
Hi,
Can you guide me how to add the similar codes/functions in the home page as well? I am getting the error I mentioned earlier if I copied the same codes over to the home page, but I'd like to keep the AllShops page as well.
I need this function urgently, so I might not be able to wait until the integration feature is developed.
Thank you very much.
regards,
Lee Ka
Hi Deni,
Thank you for your reply. At the moment, is there anyway we can add another map with search function in the home page on my own? Does it require a lot of coding change?
As I need to get this feature done as soon as possible, so I may not be able to wait for your team to develop it. Anyway, I'll still suggest it in User Voice Portal.
Thanks.
regards,
Lee Ka
Thank you very much, but can I have it both in the homepage and also a separate page for All Shops page?
The requirements of my project include:
1) Having the Google Map and search function in Home Page.
2) Having another page to search for the shops.
Thank you for your advice.
regards,
Lee Ka
Hi again,
Can I have the Google Map (with search) and Shop List in the home page?
I have copied the codes in AllShops.cshtml to another controller, then added to the Home page, but I got the following error:
An exception of type 'System.Web.HttpException' occurred in System.Web.dll but was not handled in user code
Additional information: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.
Thanks Deni,
One of the methods you suggested really help.
For the second question - to always show the user current's location, I still couldn't get it work yet. Sorry, I am not too familiar with javascript. I put the below code that you shared inside the javascript 'StoreLocatorAllShops.js', in the document ready function, but it still doesn't work.
$('.getUserGeoLocation').click();
.shops-list li:nth-child(n+4) {
display: none;
}
$(document).ready(function () {
$('.getUserGeoLocation').click();
});
Hi Deni,
Sorry, I was looking at the admin demo and thought I need to do some setting.
Thank you for the added feature, it's awesome.
Can you please guide me how I can make changes to achieve these:
1) Limit the search result to 3 nearest shops only.
2) Always use the user's current location.
Thank you in advanced.
regards,
Lee Ka