Change Position of Short Description & Out Of Stock

This topic has 2 replies, 2 voices, and was last updated 3 years, 7 months ago ago by Olga Barlow

  • Avatar: Annexorien
    Annexorien
    Participant
    December 11, 2020 at 07:21

    I have some issues,

    I want to change location short description, it should be under the social icons
    And out of stock option should be display on price.
    And ADD TO CART should be like Ad To Cart in Sentence case

    please check screen shot

    https://prnt.sc/w09wo9
    https://prnt.sc/w09z0r

    Please, contact administrator
    for this information.
    1 Answer
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 11, 2020 at 17:57

    Hello,

    1) There is no such option by default you can use either single product builder or add the below code to child theme functions.php

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
    add_action( 'woocommerce_single_product_summary', 'woocommerce_product_description', 51 );
    function woocommerce_product_description() {
        woocommerce_template_single_excerpt();
    }

    2) There is no such option by default but you can use WooCommerce hooks and add the below code to child theme functions.php

    add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_stock', 10 );
    function woocommerce_template_loop_stock() {
        global $product;
        if ( ! $product->managing_stock() && ! $product->is_in_stock() )
            echo '<p class="stock out-of-stock">Out of Stock</p>';
    }

    Add the following code to Theme Options > Custom CSS

    .content-product .stock {
        position: relative;
        background: transparent;
        color: red;
        transform: none;
        left: auto;
    }
    .content-product .product-image-wrapper  .stock {
        display:none
    }

    3) Do you want to change the text to “Ad to cart” or just change the text-transfort to capitalized?

    Regards

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.