Home / Forums / WoodMart support forum / Add count quantati to shop pages
Home › Forums › WoodMart support forum › Add count quantati to shop pages
Add count quantati to shop pages
- This topic has 9 replies, 3 voices, and was last updated 7 years, 6 months ago by  Artem Temos. Artem Temos.
- 
		AuthorPosts
- 
		
			
				April 18, 2018 at 7:49 am #53076
 kooljohnyParticipantHello everyone! 
 How I can add qty counter for shop pages before “Add to cart” buttons?
 Like in “Quick view”.
 BRApril 18, 2018 at 8:50 am #53086 
 Elise NoromitMemberHello, Thank you very much for choosing our theme and contacting our support. Your question is not clear enough. Do you mean managing stocks as shown: http://prntscr.com/j6sagd If yes, enter the product and set this in Inventory tab like this: http://prntscr.com/j6sbkh If you mean something different, please provide more details links and screenshots. Best Regards April 18, 2018 at 10:41 am #53110
 kooljohnyParticipantI need to add the ability to select the quantity of goods before “Add to cart” button on shop pages. 
 Example see in attachment.Attachments:You must be logged in to view attached files.April 18, 2018 at 1:01 pm #53122 
 Elise NoromitMemberHello, No, there is no such option. You can customize WooCommerce to get such a functionality. Please find here more details how to do that: https://docs.woocommerce.com/document/override-loop-template-and-show-quantities-next-to-add-to-cart-buttons/ If you have any questions feel free to contact us. Best Regards April 19, 2018 at 5:16 am #53244
 kooljohnyParticipantafter adding next code add_filter( 'woocommerce_loop_add_to_cart_link', 'quantity_inputs_for_woocommerce_loop_add_to_cart_link', 10, 2 ); function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) { if ( $product && $product->is_type( 'simple' ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold_individually() ) { $html = '<form action="' . esc_url( $product->add_to_cart_url() ) . '" class="cart" method="post" enctype="multipart/form-data">'; $html .= woocommerce_quantity_input( array(), $product, false ); $html .= '<button type="submit" class="button alt">' . esc_html( $product->add_to_cart_text() ) . '</button>'; $html .= '</form>'; } return $html; }code 
 quantity option appear but button “add to cart” work wrong(does not add items to the shopping cart)
 I thik this issue connected with tag “$html .= ‘<button type=”submit” class=”button alt”>’ . esc_html( $product->add_to_cart_text() ) . ‘</button>’;”
 You can see how it work hereApril 19, 2018 at 6:20 am #53257 
 Artem TemosKeymasterWe see this message https://gyazo.com/b6737401a30a140ba92370c61d924cad April 19, 2018 at 6:24 am #53263
 kooljohnyParticipantSorry, now maintenance mode off. Check again please! April 19, 2018 at 6:27 am #53267 
 Artem TemosKeymasterYou need to disable our theme’s AJAX add to cart option in Theme Settings -> Product page. April 19, 2018 at 9:43 am #53326
 kooljohnyParticipantThank you! Solved. April 19, 2018 at 11:13 am #53342 
 Artem TemosKeymasterYou are welcome! 
- 
		AuthorPosts
- You must be logged in to create new topics. Login / Register