Home › Forums › WoodMart support forum › Add to cart doesnt work anymore B2B
Add to cart doesnt work anymore B2B
- This topic has 11 replies, 2 voices, and was last updated 1 year, 7 months ago by Artem Temos.
-
AuthorPosts
-
February 27, 2023 at 7:55 pm #446821
daniel-3289ParticipantUpon implementing this feature (https://wholesalesuiteplugin.com/kb/add-min-quantity-archive-pages-adding-quantity-selector/) for our B2B / B2C store.
We lose the functionality to click the “add to cart” this seems to be an issue between wholesale suite and the theme, upon using another theme it works just fine.The interesting thing is that it does add the quantity selector, but you just cannot buy anymore.
Kindly advise. Kind regards,
February 28, 2023 at 10:12 am #446972
Artem TemosKeymasterHi,
Could you please send us a link to your website where we can see this issue?
Kind Regards
March 4, 2023 at 4:55 pm #448268
daniel-3289ParticipantYes i can!
Item; Angst is mar veur eben has a min order of 6.
I have enabled the code snippet you can find here, to make sure when buying from archive page, it will also increment by 6.
/**
* Override loop template and show quantities next to add to cart buttons
*/
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;
}Ideally i don’t even want that script, as it makes a very ugly overlay on the items. But the functionality is important to us.
If you want to test it without the script running, feel free to login and switch to the main theme.
- This reply was modified 1 year, 8 months ago by Artem Temos.
March 6, 2023 at 10:15 am #448554
Artem TemosKeymasterHello,
Please, share all your website information using our private content field only. It will make it visible to our staff and not the public.
Could you please reproduce the same look on the default WordPress theme so we can see how it works there?
Thank you in advance.
March 18, 2023 at 9:30 pm #452366
daniel-3289ParticipantYes i can, i have now added the byvex woocommerce starter + the functions.php script. And in there you can go to https://staging-loopvis.nl/product-categorie/kakkerlakjes
And see that it works perfectly fine 🙂
you do have to be logged in with the login (retailer) info provided earlier 🙂
March 20, 2023 at 11:03 am #452533
Artem TemosKeymasterHello,
Could you please check how it works on your website now?
Kind Regards
March 20, 2023 at 1:45 pm #452619
daniel-3289ParticipantIt works, thanks, we will look into restyling it so it suits our needs. But it works perfectly well!
What was the issue?
March 20, 2023 at 1:54 pm #452621
Artem TemosKeymasterThe problem was caused by “AJAX add to cart” which conflicts with your custom code.
Kind Regards
March 20, 2023 at 2:01 pm #452622
daniel-3289Participantaah, perfect thanks!~
Is it correct though that the add to cart has been moved below the text, whereas it was below the image before?
March 20, 2023 at 3:04 pm #452645
Artem TemosKeymasterYes, we changed the product style in Theme Settings for tests. But you are free to change it back. It should work with the previous style as well.
Kind Regards
March 24, 2023 at 6:52 pm #453994
daniel-3289ParticipantPerfect! Have fixed it! thanks for your help!
March 27, 2023 at 9:06 am #454322
Artem TemosKeymasterYou are always welcome. Feel free to contact us if you have any further questions.
-
AuthorPosts
Tagged: b2b, wholesalesuite
The topic ‘Add to cart doesnt work anymore B2B’ is closed to new replies.
- You must be logged in to create new topics. Login / Register