Hide Price and Totals anywhere they appear on site

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
I am just starting to use nopCommerce (3.8).
I want to remove all references to Price and SubTotal and Total
I plan to commission a Template for this by one of developers here , but in the short term, I need to show off the site very quickly , and am happy to amend whatever files are necessary, purely as a short term measure

I would appreciate if I could be pointed in the right direction and which file to amend, and how to amend it for following:

1. SortBy    (Remove Reference to Price)
2. Remove the Price Displayed with each product (i.e. Remove the word Price and the Price itself)
3. In Shopping Cart - Remove Sub-total line
4. Un Checkout - Remove Sub-total, Shipping, Tax and Total lines
5. Anywhere there is a Product Grid, remove Price and Total

I have the Source Code downloaded , so if its just a matter of 'Hiding' these controls, I am happy to do that in the short term, but don't know what files to amend and don't know 'how' to hide them
7 years ago
Hi a99

I have sent you a private message if you need help resolving your problem.
7 years ago
@a99
You can start with modifying \Presentation\Nop.Web\Views\Product\_ProductPrice.cshtml.  There may be other .cshtml files in \Views\ShoppingCart.

(And, you don't even need the source code version to make the change, since the .cshtml files are processed on the fly)
7 years ago
Many thanks. I'll give that a try
7 years ago
a99 wrote:
I am just starting to use nopCommerce (3.8).
I want to remove all references to Price and SubTotal and Total
I plan to commission a Template for this by one of developers here , but in the short term, I need to show off the site very quickly , and am happy to amend whatever files are necessary, purely as a short term measure

I would appreciate if I could be pointed in the right direction and which file to amend, and how to amend it for following:

1. SortBy    (Remove Reference to Price)
2. Remove the Price Displayed with each product (i.e. Remove the word Price and the Price itself)
3. In Shopping Cart - Remove Sub-total line
4. Un Checkout - Remove Sub-total, Shipping, Tax and Total lines
5. Anywhere there is a Product Grid, remove Price and Total

I have the Source Code downloaded , so if its just a matter of 'Hiding' these controls, I am happy to do that in the short term, but don't know what files to amend and don't know 'how' to hide them


Hi again,

You can also do this directly from the administration. Just go to admin -> configuration -> access control list and uncheck the "Public Store. Display Prices" option and this should hide all the price in your site without any code modifications.

Hope that helps.

Best Regards,

Stefan
7 years ago
H Stefan. Thanks for your reply

You can also do this directly from the administration. Just go to admin -> configuration -> access control list and uncheck the "Public Store. Display Prices" option and this should hide all the price in your site without any code modifications

Yes, I did this, and it hides prices, but now I cannot Add To Cart[u][/u]
I want to be able to hide all prices and totals and values everywhere in the site, but I want to be able to add an item to the cart
(All Pricing etc is done subsequently on the ERP system)
7 years ago
Hi again,

Yes, this is the strange behavior of this settings. In that case, you can just hide the prices via simple css which adds display:none to all selectors displaying prices. I think it will be easier than going to all views and removes the code.

Hope that helps.

Best Regards,
Stefan
7 years ago
Hi Stefan. Many thanks again for your reply

Yes, this is the strange behavior of this settings. In that case, you can just hide the prices via simple css which adds display:none to all selectors displaying prices. I think it will be easier than going to all views and removes the code.


It would be very helpful if you could give me an example of how I would do this ?
7 years ago
Hi again,

Let's take the nopCommerce demo for example. When you go to a category page , you can right click on the price and press "Inspect Element". Then the dev tools window will be opened and you should get the CSS class for the element like "prices". Then all you need to do is add the following CSS (maybe at the end of your Themes\{ThemeName}\Content\css\styles.css file):

.prices { display: none !important; }

After adding this code, you will see no prices on the category page. You can do the same for all places that you see prices.

Hope that helps.

Best Regards,
Stefan
7 years ago
Thanks Stefan.
I'll give that a go
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.