Home Forums WoodMart support forum Move stock availability on product pages

Move stock availability on product pages

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #604715

    themassapothecary
    Participant

    What hook does Woodmart use to hook in the stock availability (eg: 7 in stock (can be back ordered)) on single product pages. I want to move it under the add to cart button. Thank you.

    #604778

    Hung Pham
    Keymaster

    Hi themassapothecary,

    Thanks for reaching to us.

    Please add the below Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS:

    .single-product .wd-single-add-cart .elementor-widget-container{
      display: flex;
      flex-wrap: wrap;
      flex-direction: row;
    }
    
    .single-product form.cart{
    	order: 1;
    }
    
    .single-product .stock{
    	margin-top: 30px;
    	order: 3;
    }

    Regards,

    #604919

    themassapothecary
    Participant

    Thank you. That works on simple products, but on variable products it doesn’t change the stock position.

    #604921

    themassapothecary
    Participant

    This is an example variable product page for reference.

    #605003

    Hung Pham
    Keymaster

    Hi themassapothecary,

    Please remove above code and add the below Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS:

    .single-product .wd-single-add-cart .elementor-widget-container,
    .single_variation_wrap,
    .woocommerce-variation.single_variation{
      display: flex;
      flex-wrap: wrap;
      flex-direction: row;
    }
    
    .single-product form.cart,
    .woocommerce-variation-add-to-cart.variations_button{
    	order: 1;
    }
    
    .single-product .stock,
    .woocommerce-variation.single_variation,
    .woocommerce-variation-price{
    	margin-top: 30px;
    	order: 3;
    }
    
    .single_variation_wrap .woocommerce-variation-price,
    .single_variation_wrap .woocommerce-variation.single_variation{
    	margin-top: 0;
    }

    Regards,

    #605020

    themassapothecary
    Participant

    Thank you. That moves the stock availability on variable products but it also moves the variation price and the option to buy as subscription or one time purchase to the bottom (All Products For WooCommerce Subscriptions plugin adds the purchase options). How can I make it so that only stock availability moves l?

    #605276

    themassapothecary
    Participant

    Doesn’t Woodmart use its own hooks to insert the stock availability on product pages? If so, why not just use PHP to unhook and rehook after_add_to_cart_button?

    #605559

    Hung Pham
    Keymaster

    Hello themassapothecary,

    Thanks for reaching to us.

    If so, I kindly recommend you to build Custom Product layouts, which is built with WoodMart WooCommerce builder, then and use Product stock status widget and place your specific contents that suits your requirements.

    Further, you can read more about the Layout Builder here: https://xtemos.com/docs-topic/woodmart-woocommerce-layout-builder/

    Best Regards,

    #605566

    themassapothecary
    Participant

    I have built a custom layout using the woocommerce single page layout. There are not any widgets for the stock status by itself. It is automatically included in the add to cart form widget.

    1. What hook does Woodmart use to hook in the stock status?

    2. Can you update the initial css you gave me fir simple products and have the stock status show right above the add to cart button? If we can do that I think I might have a way to make it work on variation products.

    #605704

    Hung Pham
    Keymaster

    Hello themassapothecary,

    To assist you in the best possible manner, I kindly ask that you please provide me temporary wp-admin info (wp-admin URL, username, password) to the Private Content area, this will allow me to thoroughly investigate and address your concerns more efficiently.

    Thanks for your patience.

    Regards,

    • This reply was modified 2 months, 1 week ago by Hung Pham.
Viewing 10 posts - 1 through 10 (of 10 total)