Home › Forums › WoodMart support forum › Move stock availability on product pages
Move stock availability on product pages
- This topic has 9 replies, 2 voices, and was last updated 2 months, 1 week ago by Hung Pham.
-
AuthorPosts
-
October 14, 2024 at 4:57 am #604715
themassapothecaryParticipantWhat 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.
October 14, 2024 at 10:42 am #604778
Hung PhamKeymasterHi 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,
October 14, 2024 at 4:55 pm #604919
themassapothecaryParticipantThank you. That works on simple products, but on variable products it doesn’t change the stock position.
October 14, 2024 at 4:58 pm #604921
themassapothecaryParticipantThis is an example variable product page for reference.
October 15, 2024 at 8:12 am #605003
Hung PhamKeymasterHi 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,
October 15, 2024 at 9:22 am #605020
themassapothecaryParticipantThank 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?
October 15, 2024 at 11:16 pm #605276
themassapothecaryParticipantDoesn’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?
October 16, 2024 at 6:40 pm #605559
Hung PhamKeymasterHello 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,
October 16, 2024 at 7:15 pm #605566
themassapothecaryParticipantI 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.
October 17, 2024 at 10:24 am #605704
Hung PhamKeymasterHello 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.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register