Close

How to get "ShoppingCartEnabled" setting ?

Ebrahim
9 years ago
#8539 Quote
Avatar
  • 25
Hi 
I want disabled "Price Range Filter Slider" if ShoppingCartEnabled=false

How can get this setting in "PriceRangeFilterSlider.cshtml" file?

I add this code in to "PriceRangeFilterSlider.cshtml":
@using Nop.Web.Controllers;
@if (ShoppingCartEnabled)
{}


But not work
Boyko
9 years ago
#8544 Quote
Avatar
  • Moderator
  • 1570
Ebrahim wrote:
Hi 
I want disabled "Price Range Filter Slider" if ShoppingCartEnabled=false

How can get this setting in "PriceRangeFilterSlider.cshtml" file?

I add this code in to "PriceRangeFilterSlider.cshtml":
@using Nop.Web.Controllers;
@if (ShoppingCartEnabled)
{}


But not work


Hi Ebrahim,

There is no such setting ShoppingCartEnabled or at least we are not aware of it.
Where do you set this setting in the administration?

Please note that if you are using nopCommerce 3.4 and above then you can use the ACL to disable the prices or the shopping cart functionality and this way the Ajax Filters will automatically hide the Price Range filter.
Regards,
Nop-Templates.com Team
Ebrahim
9 years ago
#8546 Quote
Avatar
  • 25
In "Access Control List" I Unchecked these options:

Public store. Display Prices            
Public store. Enable shopping cart            
Public store. Enable wishlist
            

But still Show Price Rage On Ajax Filters.

NOW , How can check this setting on if statement?

@if(Public store.Enable shopping cart == False)
{
---
---
}