Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option in settings to disable all online sales #290

Open
ghost opened this issue Oct 22, 2020 · 5 comments
Open

Add option in settings to disable all online sales #290

ghost opened this issue Oct 22, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Oct 22, 2020

Is your feature request related to a problem? Please describe.
About half of my CC sites do not sell products online - they are just used to display items that are available to buy in-store. So, I have no need for any payment options, no need for shipping, no need for cart, etc. I'm not sure how common this scenario is for others.

Describe the solution you'd like
I would like to have a single place in settings (a checkbox) where I can disable all online sales. So it would disable the add-to-cart functionality and maybe hide the payment and shipping tabs completely (the same way taxes gets hidden unless they are enabled). It could even hide orders and reports in the admin menu. By ticking that one checkbox it would turn CC into a "display-only" store.

Describe alternatives you've considered
There are workarounds for this. It is usually done by adding various snippets in functions.php. Or if no prices are displayed it won't show the add-to-cart button (so price could be included in description).

Additional context
This could also be enabled initially through the setup wizard by adding one more option to this dropdown:
options

Something like: "I will not be selling anything online, only displaying products"

@timbocode
Copy link
Contributor

In Woo World, this is plugin territory. This sort of functionality is usually provided by a "catalog mode" plugin. Installing a plugin to disable core functionality has always seemed counter-intuitive to me so I'm all in favour of moving towards a more modular type model for CC.

Adding a checkbox to disable (or, to look at it another way, not enable) the commerce components would be a good start.

However, we would need to consider:

  • this would be quite a significant change
  • this could potentially introduce compatibility issues

But I am in favour in principle.

@ghost
Copy link
Author

ghost commented Oct 22, 2020

I think in Woo World everything is plugin territory. :-) I'm sure there are plugins for all 90 of my code snippets too.

I usually do it with these 3 lines in functions.php.

add_filter( 'woocommerce_is_purchasable', '__return_false'); // DISABLING PURCHASE FUNCTIONALITY AND REMOVING ADD TO CART BUTTON FROM NORMAL PRODUCTS

remove_action('woocommerce_single_variation', 'woocommerce_single_variation', 10); // REMOVING PRICE FROM VARIATIONS

remove_action('woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20); // REMOVING ADD TO CART BUTTON FROM VARIATIONS

It just occurred to me that WooCommerce is very focused on "selling online", but a lot of people seem to be using it simply as a means to display a catalog, so maybe we should make that something that Classic Commerce does better.

@ClassyBot
Copy link

This issue has been mentioned on ClassicPress Forums. There might be relevant details there:

https://forums.classicpress.net/t/3-for-classicpress/2590/9

@stefanos82
Copy link

This option exists in one premium theme I was unfortunate enough that I had to use it for a customer.

It has its own dashboard and there's a switch button that turns the entire website to a catalog, which is really convenient if you plan to display products only.

@ghost
Copy link
Author

ghost commented Dec 9, 2020

I'll add in this forum post for reference. I have put a snippet on the CC site for this functionality.

https://forums.classicpress.net/t/snippets-to-make-classic-commerce-catalogue-mode-no-sales/2616

@ghost ghost added the enhancement New feature or request label Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants