• Resolved amsived

    (@amsived)


    Hello Woocommerce community !

    I have created a new custom type product (we have to manage 2nd hand products in a different way than classic products) and I’m trying to create a template for this product type called “sechand”.


    I’ve created a plugin extending WC_Product and the type displays when creating a new product.

    My theme has the following snippet registered in the functions.php :

     add_action( 'after_setup_theme', 'woocommerce_support' );
    function woocommerce_support() {
       add_theme_support( 'woocommerce' );
    }        

    I’ve created a template “sechand-single.php” in mytheme/woocommerce/ but this template doesn’t seem to be called by WP (I’ve also tried sechand-product.php, single-sechand.php…).

    I’ve tried putting single-product-sechand.php in my theme folder and not mytheme/woocommerce but nothing changed either.

    Any idea how to set this up ? Thanks in advance 🙏

    • This topic was modified 3 years, 2 months ago by amsived.
    • This topic was modified 3 years, 2 months ago by amsived.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @amsived

    Thanks for reaching out!

    I understand that you created a new custom product type for managing secondhand products and are attempting to create a template named sechand for this product type. However, you are having trouble getting the custom template to load in your theme, correct?

    This is a bit of a complicated topic that would need some customization to address. Unfortunately, custom coding is not something we can assist with directly. However, I’ll keep this thread open for a bit to see if anyone from the community can lend a hand.

    If you have any other questions related to development or custom coding, don’t hesitate to reach out to some of the great resources we have available for support. The WooCommerce community is filled with talented open-source developers, and many of them are active on the channels listed below:

    Hope this helps!

    Hi,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Template for Custom Product Type’ is closed to new replies.