Home Forums Basel support forum SKU instead of price

SKU instead of price

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #26327

    Oscar
    Participant

    Hi could you please tell me on shop product thumbnail list page (shop page) as you can see at the moment under the product image thumb, under the product title there is price. But I want to display:none that price and instead of I want to display SKU code. How can we achieve this please? BIG THANX

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

    Artem Temos
    Keymaster

    Hi,

    Try to add this code snippet to the functions.php file in the child theme to achieve that

    add_action( 'woocommerce_before_shop_loop_item_title', 'custom_before_title' );
    function custom_before_title() {
    
        global $product;
    
        if ( $product->get_sku() ) {
            echo $product->get_sku();
        }
    
    }

    Regards

    #26446

    Oscar
    Participant

    Hi Keymaster it worked as you can see on this page the SKU code exactly where I want:
    LINK 1

    But on this page I need the SKU code under the thumb image just before title but because of the above line of codes you sent me on this page SKU code went above the image:
    LINK 2

    Please also see the attached JPG
    THANK YOU VERY MUCH

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

    Artem Temos
    Keymaster

    Hi,

    Try to replace with this code

    add_action( 'woocommerce_shop_loop_item_title', 'custom_before_title', 20 );
    function custom_before_title() {
    
        global $product;
    
        if ( $product->get_sku() ) {
            echo '<span class="product-grid-sku"><span>SKU - </span>' . $product->get_sku() . '</span>';
        }
    
    }
    #26469

    Oscar
    Participant

    THANK YOU VERY MUCH it worked
    Only now can you please look at the attached jpg here
    on product list page when I click the + icon to view the product pop up window I have little issue left. thanx

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

    Oscar
    Participant

    THANK YOU VERY MUCH it worked
    I have only 2 issues left:
    -please look at the attached jpg here on product list page when I click the + icon to view the product pop up window
    – And on product detail page I need not to display wishlist and compare row as seen on second jpg
    THANX

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

    Artem Temos
    Keymaster

    Hi,

    Use this code snippet

    .sku_wrapper {
    	display: none!important;
    }

    As for compare and wishlist, you can disable these plugins completely in Plugins section.

    #26509

    Oscar
    Participant

    Hi there perfect it worked THANK YOU
    On the same product detail page I want to keep the product page design as DEFALT. But at the bottom the share buttons not small grey ones but circled colored ones. As the attached image. How can I? thanx

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

    Artem Temos
    Keymaster

    Find the code in the file `woocommerce/content-single-product.php

    <?php echo basel_shortcode_social( array( 'type' => basel_get_opt( 'product_share_type' ), 'size' => 'small', 'align' => 'left' ) ); ?>

    and replace with this one

    <?php echo basel_shortcode_social( array( 'type' => basel_get_opt( 'product_share_type' ), 'size' => 'small', 'align' => 'colored' ) ); ?>

    #26550

    Oscar
    Participant

    tHANX but how to put that file into child-theme please?
    what will be the folder and file structure?
    /child-theme/ …?/…?

    #26552

    Artem Temos
    Keymaster

    Copy this file to the exact location but in the child theme and then edit it.

    #26554

    Oscar
    Participant

    woocommerce under the plugin directory or
    under the theme/basel/woocommerce ?

    #26558

    Artem Temos
    Keymaster

    Under our theme folder.

    #26561

    Oscar
    Participant

    With some reason it didnt work 🙁
    pls see the attached two jpgs

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

    Artem Temos
    Keymaster

    Are you able to provide us your FTP access so we can check it?

    #26625

    Oscar
    Participant

    Here below
    thanx

    #26656

    Artem Temos
    Keymaster

    Sorry, we gave you a wrong code snippet. Check how it works now.

    #26685

    Oscar
    Participant

    THANK YOU VERY VERY MUCH

    #26705

    Artem Temos
    Keymaster

    You are welcome!

Tagged: 

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

The topic ‘SKU instead of price’ is closed to new replies.