public ActionResult Index(StorePage currentPage)
        {
            var currentStore    = _storeService.GetCurrentStoreViewModel();
            var storesViewModel = new StoreViewModel
            {
                ShowDelivery      = false,
                SelectedStore     = currentStore != null ? currentStore.Code : "",
                SelectedStoreName = currentStore != null ? currentStore.Name : "",
                Stores            = _storeService.GetAllStoreViewModels(),
            };

            var store = new StorePageViewModel(currentPage)
            {
                StoreViewModel = storesViewModel
            };

            return(View(store));
        }
Exemple #2
0
        public async Task <ActionResult> Index(StorePage currentPage)
        {
            await _trackingService.PageViewed(HttpContext, currentPage);

            var currentStore    = _storeService.GetCurrentStoreViewModel();
            var storesViewModel = new StoreViewModel
            {
                ShowDelivery      = false,
                SelectedStore     = currentStore != null ? currentStore.Code : "",
                SelectedStoreName = currentStore != null ? currentStore.Name : "",
                Stores            = _storeService.GetAllStoreViewModels(),
            };

            var store = new StorePageViewModel(currentPage)
            {
                StoreViewModel = storesViewModel
            };

            return(View(store));
        }