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?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #354434

    [email protected]
    Participant

    Good day. I want to delete the “add to cart” button for an individual item. But does this function not work for a single product?

    Attachments:
    You must be logged in to view attached files.
    #354468

    Hello,

    You can try achieving this using our preset options:
    https://xtemos.com/docs-topic/theme-settings-presets/

    Best Regards

    #354471

    [email protected]
    Participant

    Catalog_mode works for configuration categories. catalog_mode does not work for individual products?

    Attachments:
    You must be logged in to view attached files.
    #354487

    Hello,

    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

    #354495

    [email protected]
    Participant

    Nothing works. I can’t do this with any settings. Please give instructions on how to do this. Thanks.

    #354497

    [email protected]
    Participant

    Or show where the “Single post from term” is

    #354499

    Hello,

    Please try setting single posts from the term option from Presets.

    Screenshot for Clarification: https://gyazo.com/ac65f844c728a962b232a6716a847784

    Best Regards

    #354501

    [email protected]
    Participant

    ?

    Attachments:
    You must be logged in to view attached files.
    #354507

    [email protected]
    Participant

    Nothing from the list works. Unable to delete button for individual item. Can you help?

    Attachments:
    You must be logged in to view attached files.
    #354588

    [email protected]
    Participant

    Now, 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.

    #354728

    Hello,

    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

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Good day. Can I use “catalog_mode” for individual products?’ is closed to new replies.