[Support request] Show bulk price on single product page

Home Forums Support [Support request] Show bulk price on single product page

Home Forums Support Show bulk price on single product page

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #996281
    Michiel 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

    #996537
    Leo
    Staff
    Customer Support

    Hi 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 🙂

    #996915
    Michiel Lap

    Hi,

    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)?

    #996920
    Michiel Lap

    I do see Appearance>GP Hooks though…

    #996923
    Michiel Lap

    Sorry, 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)

    #997013
    David
    Staff
    Customer Support

    Hi 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.

    #1006470
    Michiel Lap

    Thank 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

    #1006637
    David
    Staff
    Customer Support

    Might 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.

    #1006695
    Michiel Lap

    Thanks, 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.

    #1006709
    David
    Staff
    Customer Support

    I 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"

    #1007331
    Michiel Lap

    Yes, that did it!

    #1007413
    David
    Staff
    Customer Support

    Glad to be of help.

    #1007450
    Michiel Lap

    On 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?

    #1007464
    David
    Staff
    Customer Support

    The 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;
    }
    #1007676
    Michiel Lap

    Thanks,

    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());
    }

Viewing 15 posts - 1 through 15 (of 29 total)
  • You must be logged in to reply to this topic.