Home Forums Themes Support How to show Customize button for only vendors in Print theme from HaruTheme

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12846

    Hi all customers,

    In this topic tutorial we’ll help you customize to change and show Personalize button of Design Online Product for only vendors in our Print theme like Pricom, TeeSpace, PrintSpace, TeeCheap,…

    1. Customize to show Personalize button for vendors on Archive Product (Shop) page:

    Go to: wp-content/themes/teespace/woocommerce/ then open file content-product.php

    Go to line 92 and change the code from:

    add_action( 'woocommerce_loop_add_to_cart_link', 'wcdp_add_product_link_customize' , 10, 2 );

    to

    if ( function_exists('dokan_is_user_seller') && dokan_is_user_seller(get_current_user_id()) ) {
    add_action( 'woocommerce_loop_add_to_cart_link', 'wcdp_add_product_link_customize' , 10, 2 );
    }

    Similar go to line 129 and change the code from:

    add_action( 'woocommerce_loop_add_to_cart_link', 'wcdp_add_product_link_customize' , 10, 2 );

    to

    if ( function_exists('dokan_is_user_seller') && dokan_is_user_seller(get_current_user_id()) ) {
    add_action( 'woocommerce_loop_add_to_cart_link', 'wcdp_add_product_link_customize' , 10, 2 );
    }

    2. Customize to show Personalize button for vendors on Single Product page:

    Go to: wp-content/themes/teespace/woocommerce/ then open file content-single-product.php

    Go to line 128 and change the code from:

    add_action( 'woocommerce_before_add_to_cart_button', 'wcdp_add_product_single_link_customize' );

    to

    if ( function_exists('dokan_is_user_seller') && dokan_is_user_seller(get_current_user_id()) ) {
    
    add_action( 'woocommerce_before_add_to_cart_button', 'wcdp_add_product_single_link_customize' );
    }

     

    You should do this customize via child theme by following this topic:

    How to customize WordPress theme using Child theme

    Hope this helps and thanks for reading!

     

    ****
    Best Regards,

    HaruTheme

    • This topic was modified 2 months ago by admin.
    • This topic was modified 2 months ago by admin.
    • This topic was modified 2 months ago by admin.
    • This topic was modified 1 month, 2 weeks ago by admin.
    #12986

    we tried to customize the file as in as mentioned in the above solution to make the design button works for the vendors only,
    we did the first step but in the second step the mentioned code NOT excited in the line 128, pls provide a full version from the final content-product.php file after this code edit to make the design button works for the vendors only on this mail.
    also, when a vendor design something and add image we need to get this image alone and separated from the design so we can printed on the item, how we can do that?

    #12989

    Hi,
    Please notice in the step 2 the file is content-single-product.php
    https://prnt.sc/0PGejSn1HeSh
    To get images from design you can follow this:

    How to get images from WooCommerce Designer Pro plugin


    or

    How to get images from WC Designer Pro


    More detail please read section 11 of this document:
    https://document.harutheme.com/teespace/
    Hope this helps!

    ****
    Regards,
    HaruTheme

    • This reply was modified 1 month, 2 weeks ago by admin.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.