I am trying to design the product template in Elementor.
Wherever I put the add to cart button with quantity select, it later adds the price tier table between the add to cart button itself and the like product heart without any margins. Just smashes it there , like its all ok. While I would like to have the table there as an element, I could not find any documentation how to affect its appearance. I am sure I missed something. I am using Woodmart theme as recommended.
We have not seen this issue with Woodmart usually, perhaps it has to do with the product template used with Elementor. Either way, it's a common issue that we can usually resolve by changing the insertion point where the table is added.
To do this, please try to add the following PHP code snippet to your site:
global $b2bking_public;
remove_action('woocommerce_after_add_to_cart_button', array($b2bking_public,'b2bking_show_tiered_pricing_table'));
add_action('woocommerce_after_add_to_cart_form', array($b2bking_public,'b2bking_show_tiered_pricing_table'));
After adding that, second table appears below the first one (see attached picture). When I replace 'woocommerce_after_add_to_cart_form' with 'woocommerce_product_meta_start' in the code, the second table disappears but the first one is what I am trying to get rid of.
Wouldn't this kind of table make more sense as a shortcode, so I could put it where I need in my design and use Woocommerce quantity select button separately?
I would even be happy with a shortcode quantity select and add to cart button if that means shortcode table. Or at least clear and easily modifyable CSS hooks, so I could at modify it.
Anyways, it seems that with the snippet, removing the table is what is broken (the second line)
I tested that code I sent you, but it seems to be able to remove it in my tests with WoodMart. I think the issue may have to do with how that snippet is added - in my tests I added it to functions.php
If you're using the snippets plugin, please try to replace the snippet with this:
add_action('wp_loaded', function(){
global $b2bking_public;
remove_action('woocommerce_after_add_to_cart_button', array($b2bking_public,'b2bking_show_tiered_pricing_table'));
add_action('woocommerce_after_add_to_cart_form', array($b2bking_public,'b2bking_show_tiered_pricing_table'));
});
Please try to clear caches if there are any.
We can certainly look at adding a shortcode for this - thanks for the feedback. In most cases we need to place it there by default because users are not usually designing their own product pages.
Actually it seems to work for me by default with woodmart, so I think it has to do with how Elementor places hooks.
I decided not to use Elementor then, but it does not look pretty. This product has 9 possible locations how to engrave text on it, each engraving costs extra. I would like to move these around for better look.
I can immediately send you an update with shortcodes for the product information table, and for the tiered pricing table for simple products.
However for variable products, it's more complicated - we usually insert it in the hook 'woocommerce_available_variation'. The table needs to be different for each variation, and it needs to change when the currently selected variation changes. So it wouldn't work to insert it statically through a shortcode. I'm not sure if the Elementor product page builder has any option that could help here. Hope that makes sense.
I am trying to design the product template in Elementor.
Wherever I put the add to cart button with quantity select, it later adds the price tier table between the add to cart button itself and the like product heart without any margins. Just smashes it there , like its all ok. While I would like to have the table there as an element, I could not find any documentation how to affect its appearance. I am sure I missed something. I am using Woodmart theme as recommended.
Hi there,
Thank you for purchasing our plugin,
We have not seen this issue with Woodmart usually, perhaps it has to do with the product template used with Elementor. Either way, it's a common issue that we can usually resolve by changing the insertion point where the table is added.
To do this, please try to add the following PHP code snippet to your site:
A PHP snippet can be added to functions.php, or by following our guide here: https://woocommerce-b2b-plugin.com/docs/how-to-add-a-snippet-php-or-js/
If that doesn't do it, I suggest you try to replace 'woocommerce_after_add_to_cart_form' with 'woocommerce_product_meta_start' in the above snippet.
We can also look into it directly for you if you'd like - for that, we'd need a backend login to your site or staging site.
Kind regards,
Stefan
After adding that, second table appears below the first one (see attached picture). When I replace 'woocommerce_after_add_to_cart_form' with 'woocommerce_product_meta_start' in the code, the second table disappears but the first one is what I am trying to get rid of.
Wouldn't this kind of table make more sense as a shortcode, so I could put it where I need in my design and use Woocommerce quantity select button separately?
I would even be happy with a shortcode quantity select and add to cart button if that means shortcode table. Or at least clear and easily modifyable CSS hooks, so I could at modify it.
Anyways, it seems that with the snippet, removing the table is what is broken (the second line)
Hi again,
I tested that code I sent you, but it seems to be able to remove it in my tests with WoodMart. I think the issue may have to do with how that snippet is added - in my tests I added it to functions.php
If you're using the snippets plugin, please try to replace the snippet with this:
Please try to clear caches if there are any.
We can certainly look at adding a shortcode for this - thanks for the feedback. In most cases we need to place it there by default because users are not usually designing their own product pages.
Actually it seems to work for me by default with woodmart, so I think it has to do with how Elementor places hooks.
Let me know if the above can help,
I decided not to use Elementor then, but it does not look pretty. This product has 9 possible locations how to engrave text on it, each engraving costs extra. I would like to move these around for better look.
https://dalipood.ee/product/cld-dali-nupupaneel-ilight/
So if you will have shortcodes ready to go in your next update, please let me know.
I can immediately send you an update with shortcodes for the product information table, and for the tiered pricing table for simple products.
However for variable products, it's more complicated - we usually insert it in the hook 'woocommerce_available_variation'. The table needs to be different for each variation, and it needs to change when the currently selected variation changes. So it wouldn't work to insert it statically through a shortcode. I'm not sure if the Elementor product page builder has any option that could help here. Hope that makes sense.