• Resolved Niraj Singh

    (@nirajsharp)


    i want to show price in left side in the same row button that says sold or buy(it is changed by filters) sold is out of stock products also want to change sold to red color and buy green color text.
    any help appreciated
    my home page is shop page of woocommerce
    thank u

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there 👋

    This can be fixed with some custom CSS. Under Customize > Additional CSS, you can add the following code:
     

    /*Align buy/sold product string with price*/
    .product a.button.product_type_simple {
        position: absolute !important;
        bottom: 0 !important;
        right: 0 !important;
    }
    
    /*Change buy text color to green*/
    .product a.button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
        color: green!important;
    }
    
    /*Change sold text color to red*/
    .product a.button.product_type_simple {
        color: red !important;
    }
    

    Here is a screenshot of how it will look:

    https://www.screencast.com/t/0cHPBvF63
     
    If you’d like to learn more about CSS, I highly recommend using the free tutorials at w3schools. Here, you can find the basics of selectors (how to target the right element on the page), and properties (how to change the element on the page).

    Cheers!

    Thread Starter Niraj Singh

    (@nirajsharp)

    work perfectly thank u, but price doesn’t go left side it remains middle

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Oh, I see!

    In this case, please use the following code instead:

    /*Align buy/sold product string with price*/
    .product a.button.product_type_simple {
        position: absolute !important;
        bottom: 0 !important;
        right: 0 !important;
    }
    
    /*Change buy text color to green*/
    .product a.button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
        color: green!important;
    }
    
    /*Change sold text color to red*/
    .product a.button.product_type_simple {
        color: red !important;
    }
    
    /*Align product price to the lef*/
    .product span.price {
        text-align: left !important;
    }

    This is how it should look now:

    https://www.screencast.com/t/UwPaa76Ws

    Cheers! 🙂

    Thread Starter Niraj Singh

    (@nirajsharp)

    following code
    .product
    .woocommerce-Price-amount{
    position: absolute !important;
    left: 0 !important;
    }
    doing nice job but also affect single product page

    Thread Starter Niraj Singh

    (@nirajsharp)

    oh sorry didn’t see your previous reply thank u

    Thread Starter Niraj Singh

    (@nirajsharp)

    hi in android chrome browser it go beyond image please look
    https://drive.google.com/file/d/1L4euPlXqW_1I1UgfVCpjzjCb2ITiwR9N/view?usp=sharing

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    For the mobile, we could keep the same layout as before (as you originally had it) with the price above the purchase button and both aligned to the middle. And for larger screen devices(tablets, desktops, etc), we use the new layout. Does that sound like a plan?

    Kindly let me know!

    Thread Starter Niraj Singh

    (@nirajsharp)

    yes that is the best way in my case

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Great! For this, please use the folling code instead:

    @media screen and (min-width: 768px) {
        /*Align buy/sold product string with price*/
        .product a.button.product_type_simple {
            position: absolute !important;
            bottom: 0 !important;
            right: 0 !important;
        }
        /*Change buy text color to green*/
        .product a.button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
            color: green!important;
        }
        /*Change sold text color to red*/
        .product a.button.product_type_simple {
            color: red !important;
        }
        /*Align product price to the lef*/
        .product span.price {
            text-align: left !important;
        }
    }

    Cheers 🙂

    Thread Starter Niraj Singh

    (@nirajsharp)

    thanks worked perfectly

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Happy to help 😃

    Great! I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Cheers.

    Thread Starter Niraj Singh

    (@nirajsharp)

    thanks for your highly helpful time 🙂

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘shop page cutomization’ is closed to new replies.