Home / Forums / WoodMart support forum / Good day. Can I use “catalog_mode” for individual products?
Home › Forums › WoodMart support forum › Good day. Can I use “catalog_mode” for individual products?
Good day. Can I use “catalog_mode” for individual products?
- This topic has 10 replies, 2 voices, and was last updated 3 years, 8 months ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
February 19, 2022 at 7:23 am #354434
[email protected]ParticipantGood day. I want to delete the “add to cart” button for an individual item. But does this function not work for a single product?
-
This topic was modified 3 years, 8 months ago by
[email protected].
Attachments:
You must be logged in to view attached files.February 19, 2022 at 10:46 am #354468
Aizaz Imtiaz AwanKeymasterHello,
You can try achieving this using our preset options:
https://xtemos.com/docs-topic/theme-settings-presets/Best Regards
February 19, 2022 at 11:19 am #354471
[email protected]ParticipantCatalog_mode works for configuration categories. catalog_mode does not work for individual products?
Attachments:
You must be logged in to view attached files.February 19, 2022 at 12:29 pm #354487
Aizaz Imtiaz AwanKeymasterHello,
If you want to apply to all products that belong to a specific category you need to use “Single post from term” from Presets.
Best Regards
February 19, 2022 at 12:58 pm #354495
[email protected]ParticipantNothing works. I can’t do this with any settings. Please give instructions on how to do this. Thanks.
February 19, 2022 at 1:00 pm #354497
[email protected]ParticipantOr show where the “Single post from term” is
February 19, 2022 at 1:09 pm #354499
Aizaz Imtiaz AwanKeymasterHello,
Please try setting single posts from the term option from Presets.
Screenshot for Clarification: https://gyazo.com/ac65f844c728a962b232a6716a847784
Best Regards
February 19, 2022 at 1:14 pm #354501
[email protected]Participant?
Attachments:
You must be logged in to view attached files.February 19, 2022 at 2:32 pm #354507
[email protected]ParticipantNothing from the list works. Unable to delete button for individual item. Can you help?
Attachments:
You must be logged in to view attached files.February 20, 2022 at 6:53 am #354588
[email protected]ParticipantNow, let’s say you’re out of stock for certain products, so you want to temporarily hide the Add to Cart button for those products.
To remove the button for specific products, copy and paste this script into the functions.php file of the child theme:/* REMOVE ADD TO CART BUTTON ON SPECIFIC PRODUCT IDs*/
add_filter(‘woocommerce_is_purchasable’, ‘filter_is_purchasable’, 10, 2);
function filter_is_purchasable($is_purchasable, $product ) {
global $product;
if( in_array( $product->get_id(), not_purchasable_ids() )) {
return false;
}
return $is_purchasable;
}
function not_purchasable_ids() {
return array( 624,625 );
}n this example scenario, we disable the Add to Cart button for products with IDs 624 and 625. To adapt it to your WooCommerce store, simply replace these IDs with your product IDs. As you can see, you can add multiple products by simply separating the identifiers with a comma.
February 21, 2022 at 8:09 am #354728
Aizaz Imtiaz AwanKeymasterHello,
We are Glad that you found the solution yourself.
Let us know if there’s anything else we can do for you! You can always reach us at any time. We are always here to help you.
Have a wonderful day.
Topic Closed.
Best Regards -
This topic was modified 3 years, 8 months ago by
-
AuthorPosts
The topic ‘Good day. Can I use “catalog_mode” for individual products?’ is closed to new replies.
- You must be logged in to create new topics. Login / Register