Home Forums WoodMart support forum Product Page

Product Page

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #31030

    leds-pros
    Participant

    Hello,
    I use Woodmart Theme for several clients. Very nice theme.
    Unfortunatly, most of them ask ofen to me the same thing.
    So, as it’s Christmas could you do something for this 😉
    I try to explain you in the attachment.
    1/ RÉFÉRENCE ( = UGS ) under the Title
    2/ Hide only ” Catégories ”
    3/ Have ” DIFFÉRENCES ” just above ” AJOUTER AU PANIER ”
    I know it is work for you, so thanks a lot for your help.
    Best Regards,
    Leds-Pros

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

    leds-pros
    Participant

    It is not Chrismas 😉

    #31073

    Artem Temos
    Keymaster

    Hi,

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    add_action( 'woocommerce_single_product_summary', 'woodmart_show_sku', 5 );
    function woodmart_show_sku(){
        global $product;
    	$sku = $product->get_sku();
    	if ( $sku ) {
    		echo '<span class="sku_wrapper under-title">SKU: <span class="sku">' . $sku . '</span></span>';
    	}else{
    		echo '<span class="sku_wrapper under-title">SKU: <span class="sku">N/A</span></span>';
    	}
    }

    and this is for Custom CSS

    .product_meta .sku_wrapper,
    .product_meta .posted_in{
        display: none !important;
    }
    .sku_wrapper.under-title{
        margin-bottom: 10px;
        display: block;
        color: #333;
        font-weight: 600;
        font-size: 14px;
    }
    
    .sku_wrapper.under-title span{
        color: #777;
        display: inline-block;
        font-weight: 400;
        margin: 0 1px;
    }

    Regards

    #31074

    leds-pros
    Participant

    Thanks a lot, I know that is some work for you.
    It’s Chrismas indeed 😉
    Great Thanks,
    you can close the topic.
    Best Regards and have a very good end of year.
    Best Regards,
    Leds-Pros

    #31075

    leds-pros
    Participant

    Sorry, it seems that the sku is not re-copy with variable products.
    It works only for single product.

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

    Artem Temos
    Keymaster

    Could you please provide us your admin access so we can check it?

    #31096

    leds-pros
    Participant

    Of course. It’s done

    #31098

    Artem Temos
    Keymaster

    Sorry, but we can’t login with this data. Could you please check it?

    #31100

    leds-pros
    Participant

    Sure ?

    #31133

    Artem Temos
    Keymaster

    Try to replace previous code with this one

    function woodmart_sguide_hook(){
    	remove_action( 'woocommerce_single_product_summary', 'woodmart_sguide_display', 38 );
    	add_action( 'woocommerce_before_add_to_cart_button', 'woodmart_sguide_display', 20 );
    }
    add_action( 'wp_loaded', 'woodmart_sguide_hook', 20 );
    
    function woodmart_show_sku(){
        global $product;
    	$sku = $product->get_sku();
    	if ( $sku ) {
    		echo '<div class="product_meta under-title"><span class="sku_wrapper">SKU: <span class="sku" data-o_content="' . $sku . '">' . $sku . '</span></span></div>';
    	}else{
    		echo '<div class="product_meta under-title"><span class="sku_wrapper">SKU: <span class="sku" data-o_content="N/A">N/A</span></span></div>';
    	}
    }
    add_action( 'woocommerce_single_product_summary', 'woodmart_show_sku', 5 );

    And add the following CSS

    .product_meta.under-title .sku_wrapper{
        display: block !important;
        padding-top: 0;
        border: 0;
    }

    Regards

    #31169

    leds-pros
    Participant

    Thanks a lot for your help.
    Happy new year.
    Leds-Pros

    You can close the topic. Thanks for your help and great work.

    #31189

    Artem Temos
    Keymaster

    Great, you are welcome!

    Happy new year!

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

The topic ‘Product Page’ is closed to new replies.