public ActionResult TaxTypeSelector() { var model = new TaxTypeSelectorModel(); model.Enabled = _taxSettings.AllowCustomersToSelectTaxDisplayType; model.CurrentTaxType = _workContext.TaxDisplayType; return(PartialView(model)); }
/// <summary> /// Prepare the tax type selector model /// </summary> /// <returns>Tax type selector model</returns> public virtual TaxTypeSelectorModel PrepareTaxTypeSelectorModel() { var model = new TaxTypeSelectorModel { CurrentTaxType = _workContext.TaxDisplayType }; return(model); }
/// <summary> /// Prepare the tax type selector model /// </summary> /// <returns>Tax type selector model</returns> public virtual async Task <TaxTypeSelectorModel> PrepareTaxTypeSelectorModelAsync() { var model = new TaxTypeSelectorModel { CurrentTaxType = await _workContext.GetTaxDisplayTypeAsync() }; return(model); }
protected TaxTypeSelectorModel PrepareTaxTypeSelectorModel() { var model = new TaxTypeSelectorModel() { Enabled = _taxSettings.AllowCustomersToSelectTaxDisplayType, CurrentTaxType = _workContext.TaxDisplayType }; return(model); }
public ActionResult TaxTypeSelected(int customerTaxType) { var taxDisplayType = (TaxDisplayType)Enum.ToObject(typeof(TaxDisplayType), customerTaxType); _workContext.TaxDisplayType = taxDisplayType; var model = new TaxTypeSelectorModel(); model.Enabled = _taxSettings.AllowCustomersToSelectTaxDisplayType; model.CurrentTaxType = _workContext.TaxDisplayType; return(PartialView("TaxTypeSelector", model)); }
private TaxTypeSelectorModel PrepareTaxTypeSelector() { if (!_taxSettings.AllowCustomersToSelectTaxDisplayType) { return(null); } var model = new TaxTypeSelectorModel { CurrentTaxType = _workContext.TaxDisplayType }; return(model); }
public ActionResult TaxTypeSelector() { if (!_taxSettings.AllowCustomersToSelectTaxDisplayType) { return(Content("")); } var model = new TaxTypeSelectorModel { CurrentTaxType = _workContext.TaxDisplayType }; return(PartialView(model)); }
public ActionResult TaxTypeSelector() { if (!_taxSettings.AllowCustomersToSelectTaxDisplayType) return Content(""); var model = new TaxTypeSelectorModel() { CurrentTaxType = _workContext.TaxDisplayType }; return PartialView(model); }