Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #2309159
Total price is not showing up?
Closed

Comments

  • Coen de Waal started the conversation

    Hi!

    When I look at what seems like the total price element, it has a height of 0 and no content. Can you help me so it shows the total price? And possibly explain me why this is happening :)

    All the best,

    Coen

  •  767
    Janilyn replied

    Hi Coen, 

    Thank you for contacting WPClever Support Forum. Could you please provide a link to your published bundle so that our developer could check it directly? After receiving your info, I'll assign one of our developers to help you look into that asap. 

    Best regards. 

    Janilyn T. - WPClever Support Agent

  •   Coen de Waal replied privately
  •  1,228
    Dustin replied

    Hi Coen,

    I see you're using a page builder and missing the class "product-type-woosb" for the product information section. So our plugin doesn't work correctly.

    Please add below code to current theme (or child-theme) / functions.php

    add_filter( 'body_class', 'woosb_body_class' );
    function woosb_body_class( $classes ) {
        global $post;
        $woosb_product = wc_get_product( $post->ID );
        if ( $woosb_product && $woosb_product->is_type( 'woosb' ) ) {
            $classes[] = 'product-type-woosb';
        }     return $classes;
    }

    Then try again and tell me it work or not. Thank you!

    Best regards,
    Dustin

  • Coen de Waal replied

    Hi Frankie,

    Thanks for your response and providing code in an attempt to solve the issue.

    Unfortunately it did not work for me. I'm working with Divi and their product page templates. I tried adding the class to a few rows/columns/sections which did not work either. After comparing your live demo with my page and see that there are some differences in how the layout is constructed as well, not sure how much that affects the result.

    Not sure if you know how the divi product templates work, but you can take a look if you'd like.

    All the best,

    Coen

  •  1,228
    Dustin replied

    Please send me your website info (wp-admin link, username, password) then I can check and fix this problem for you. You also can create a dev/staging site with the same issue then I'll work on it.

    Best regards,
    Dustin

  •   Coen de Waal replied privately
  •   Coen de Waal replied privately
  •  1,228
    Dustin replied

    I can access your website now but can't edit plugin or install a new plugin.

    Please update our plugin to the latest version 3.9.0 first. Then remember to clear the website and browser cache before testing again.

    Best regards,
    Dustin

  • Coen de Waal replied

    Hi Frankie,


    Thanks for checking it out!

    I've updated the plugin and the total price is showing up properly now, thanks for that :)


    Only the bar at the top of the screen containing the "product bundle" product is still there. You can view this here:

    https://vonsanetwerk.nl/theboxvoorstel/product/test-variations/?v=796834e7a283


    Please let me know if you want me to install any other plugins etc.


    a little side note/ questions:

    - It seems you have a lot of small plugins with decent functionalities, could it be a good addition to be able to bundle them into one plugin and make it so you can activate only the elements that you want to integrate in a website? Possibly create package deals here on wpc as well.

  •  1,228
    Dustin replied

    To hide it, please choose this option https://prnt.sc/rcwpup in the "Bundles" section.

    Thanks for your idea! We'll check and add some bundles from our plugins soonsmile.png

    Best regards,
    Dustin

  • Coen de Waal replied

    Thanks Frankie, that worked!

    Sorry, I guess that was my bad not going through the settings once more.

    Glad you like the idea.


    All the best!

  •  1,228
    Dustin replied

    You're welcome!smile.png

    If you are satisfied with our plugin and support, please reward it with a full five-star ★★★★★ rating. https://wordpress.org/support/plugin/woo-product-bundle/reviews?rate=5#new-post
    Thank you in advance! <3

    Best regards,
    Dustin

  • Coen de Waal replied

    Hi Frankie,

    Sure I'll review but have not been using it yet, let's use it for a while first ;)

    Since updating woocommerce, wpc product bundles etc. today the total price not showing up issue seems to be back.

    Also, before the update and still after the update I have another issue, when executing the following action on the single product page from the visitor perspective:

    Choosing the variable product option of choice and pressing add to cart gives the following woocommerce error "

    • "Stoel" is un-purchasable.
    • You cannot add this bundle to the cart."

    The product however, is purchaseable when I just try to add "Stoel" to cart on the "Stoel" single product page.

    You can view the product bundle here:

    https://vonsanetwerk.nl/theboxvoorstel/product/product-bundel/?v=796834e7a283

    I'll be purchasing soon as my client has chosen to let this be implemented for their webshop :)

    So I hope you can help to resolve this.

    All the best!

  •  1,228
    Dustin replied

    If you updated the theme, please remember add below code again:

    add_filter( 'body_class', 'woosb_body_class' );
    function woosb_body_class( $classes ) {
        global $post;
        $woosb_product = wc_get_product( $post->ID );
        if ( $woosb_product && $woosb_product->is_type( 'woosb' ) ) {
            $classes[] = 'product-type-woosb';
        }
        return $classes;
    }

    If it still doesn't work, please send me your website info again (wp-admin link, username, password) then I can check and fix this problem for you.

    Best regards,
    Dustin

  •   Coen de Waal replied privately
  •  1,228
    Dustin replied

    As a previous reply https://prnt.sc/rggmbv, I can't edit theme/plugin or install a new plugin to change the code.

    I've checked the bundle product link and don't see the class "product-type-woosb" on the <body>. That means the code wasn't added correctly.

    Please provide me the permission to edit/install theme & plugin or you can install this plugin https://wordpress.org/plugins/wp-file-manager/ then I can edit the files.

    Best regards,
    Dustin

  • Coen de Waal replied

    Hi Frankie,

    You can now access the child theme folder in File manager!

    The price is showing now, the whole product bundle page was giving an error when I added the code, but somehow it now works, should I be worried?

    Can you still look in to the issue why I cannot add the product bundle to cart?

    All the best,

    Coen

  •  1,228
    Dustin replied

    Only need to ensure that the code was added and the child theme be activating and our plugin will works correctly.

    I've checked and seen you added a variable product https://vonsanetwerk.nl/theboxvoorstel/product/air-pro-x3-aqua/ to the bundle but this product hasn't any variation. Please add some variations for this product or set this product is simple then try to add the bundle to the cart again.

    Best regards,
    Dustin

  • Coen de Waal replied

    Thanks alot Frankie, everything seems to be working as expected now!

    It was not clear to me that the product type was a requirement, I'll be sure to let my client know as well.

    Purchased a single license for now and hope there'll be more to come!

    All the best

  •  1,228
    Dustin replied

    Thanks for your purchase! <3

    Feel free to submit a new ticket if you have any questions when using our plugin. I'll close this ticket nowsmile.png

    Best regards,
    Dustin

  • Coen de Waal replied

    Thank you too Frankie,


    Unfortunately, I've just stumbled upon something regarding your bit of code.


    Your custom code is causing this error for one of my other sites:

    PHP Fatal error:  Uncaught Error: Call to undefined function wc_get_product()


    Can you provide me a more stable adaptation of the code to resolve this?

    Possibly only call for the function if woocommerce is active or something like that?


    All the best,

    Coen

  •  1,228
    Dustin replied

    Yes! You can do that.

    Please open our-plugin-folder/index.php, find:

    if ( ! class_exists( 'WPCleverWoosb' ) )

    and change to:

    if ( ! class_exists( 'WPCleverWoosb' ) && class_exists( 'WC_Product' ) )

    We'll also add this code to the next updated version of our plugin.

    Best regards,
    Dustin

  •   Coen de Waal replied privately
  •  1,228
    Dustin replied

    #1. About body_class function, please change to:

    add_filter( 'body_class', 'woosb_body_class' );
    function woosb_body_class( $classes ) {
        if ( function_exists( 'wc_get_product' ) ) {
            global $post;
            $woosb_product = wc_get_product( $post->ID );
            if ( $woosb_product && $woosb_product->is_type( 'woosb' ) ) {
                $classes[] = 'product-type-woosb';
            }
        }
        return $classes;
    }

    #2. About add to cart button: I don't see the screenshots in your previous reply. Please check again!

    Best regards,
    Dustin

  • Coen de Waal replied

    EDIT: please don't worry about this for now, I will remove the button AJAX functionality and it seems to be working fine.


    --------------------------

    Hi Frankie,

    Thank you for providing again an adaptation of the code! That is working fine :)

    Sorry for troubling you, I'm starting a php course now to be able to do more things myself soon.

    Sorry, probably I forgot to add the screenshots. They should be added now!

    All the best and have a great weekend,

    Coen

  •  1,228
    Dustin replied

    I've tested this bundle https://vonsanetwerk.nl/theboxvoorstel/product/product-bundel/ and seen it works fine.

    1. Notification https://prnt.sc/rjzgsa

    2. The page was refreshed and the variation wasn't chosen https://prnt.sc/rjzh9x so the add to cart button is disabled.

    Best regards,
    Dustin

  • Coen de Waal replied

    Hi Frankie,

    It doesn't work with the xforwoocommerce plugin's ajax add to cart functionality.

    However, please look at my edit, I've disabled aforementioned functionality for now so we do not have to debug this now.

    Your testing was done after I have removed the AJAX functionality so obviously it works. And indeed, in that screenshot it appears as if the variation was not chosen by me, but that was after I had already 'succesfully' added the item to cart, which produces the unwanted results in my provided screenshots.

    All the best