- This topic has 28 replies, 3 voices, and was last updated 4 years, 7 months ago by David.
-
AuthorPosts
-
August 29, 2019 at 7:30 am #996281Michiel Lap
Hi,
I am using Booster for Woocommerce and I activated Wholesale price.
It works in the cart, but I can’t find a way to show the option on the single product page.
How do I add it? It should show up with this: [wcj_product_wholesale_price_table]Or, do you know of another plugin (free if possible) that will do this?
Thanks, Michiel
August 29, 2019 at 10:19 am #996537LeoStaffCustomer SupportHi there,
Can you test if you are able to add that code using one of the WooCommerce hooks using our Hooks Elements module?
https://docs.generatepress.com/article/hooks-element-overview/
https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/If not then might be worth checking with the plugin support to see if there is way to activate the feature on single products pages
Let me know 🙂
August 30, 2019 at 12:50 am #996915Michiel LapHi,
I’d rather use the GP hooks than depending on another plugin.
On the page you sent me https://docs.generatepress.com/article/hooks-element-overview/ I can’t find if it’s possible to integrate this code, for example before the ‘add to cart’ button, on a single product page.And, as described on this page, I don’t see the link Elements (Appearance>Elements)?
August 30, 2019 at 12:55 am #996920Michiel LapI do see Appearance>GP Hooks though…
August 30, 2019 at 12:57 am #996923Michiel LapSorry, I did not activate it in settings… now I see Elements.
Still, I don’t see how to insert hooks before add to cart.Thanks. (sorry for the messy messages)
August 30, 2019 at 3:32 am #997013DavidStaffCustomer SupportHi there,
no extra plugin required, what Leo is suggesting:
1. Create a New Hook Element.
2. Add the shortcode and check the execute shortcode check box.
3. Select from the Hook List:woocommerce_after_add_to_cart_button
The BusinessBloomer link shows all the hooks for woos positions.
4. Set your Display Rules to Product > All Products.
September 11, 2019 at 1:05 am #1006470Michiel LapThank you David!
It worked and it is visible on for example this page >
One more thing, how do I translate:
from 3 pcs. to dutch: ‘vanaf 3 stuks’.
I have tried to do this with the Loco translate plugin and then edit Booster for woocommerce, but in none of the translation files (Dutch nor English) can I find ‘from’ or ‘pcs’.
Hopefully you can teach me where to find and edit these kind of translation issues?Kind regards, Michiel
September 11, 2019 at 5:34 am #1006637DavidStaffCustomer SupportMight be worth checking with the Booster plugin authors – as they may have a filter for doing this. I know there plugin has modules for WPML translation and the ability to change price labels so they should be able to help.
September 11, 2019 at 6:39 am #1006695Michiel LapThanks, but am I correct I then need to buy WPML for this?
It’s this label for which I can’t find the tanslation: [wcj_wholesale_price_table]
Loco translate is not suitable for this?https://booster.io/features/woocommerce-booster-wpml/
This one only works if wpml is installed.
Sorry, maybe we’re off Generatepress, but I can’t find the way.September 11, 2019 at 6:53 am #1006709DavidStaffCustomer SupportI found this:
https://booster.io/shortcodes/wcj_product_wholesale_price_table/The shortcode accepts arguments ie.
[wcj_product_wholesale_price_table heading_format="FROM %level_min_qty% PCS."]
So you should be able to use that and change the
heading_format="vanaf %level_min_qty% stuks"
September 11, 2019 at 11:07 pm #1007331Michiel LapYes, that did it!
September 12, 2019 at 2:11 am #1007413DavidStaffCustomer SupportGlad to be of help.
September 12, 2019 at 3:15 am #1007450Michiel LapOn the businessbloomer page I see the positions, but not this one:
Would it be possible to hook next to (or right below) the price?
And to align the text left?September 12, 2019 at 3:27 am #1007464DavidStaffCustomer SupportThe title and the price are hooked into the:
woocommerce_single_product_summary
You can hook the shortcode in there, and adjust the hooks Priority. Lower number moves the element up, higher numbers move it down.
To change the alignment which the plugin is adding as an inline style requires this CSS:
.wcj_product_wholesale_price_table th, .wcj_product_wholesale_price_table td { text-align: left !important; padding-left: 0; }
September 12, 2019 at 7:01 am #1007676Michiel LapThanks,
One more thing, I want to hide the original striked through price.
I found this code but it’s not working:add_filter(‘woocommerce_get_price_html’, “xa_only_sale_price”, 99, 2);
function xa_only_sale_price($price, $product)
{
if(!is_cart() && !is_checkout() && !is_ajax()){
if ($product->is_type(‘simple’) || $product->is_type(‘variation’)) {
return regularPriceHTML_for_simple_and_variation_product($price, $product);
}
}
return $price;}
function regularPriceHTML_for_simple_and_variation_product($price, $product){
return wc_price($product->get_price());
} -
AuthorPosts
- You must be logged in to reply to this topic.