Okay
  Public Ticket #3717762
Compatibility with WooCommerce Extra Product Options and price display
Closed

Comments

  •  8
    Norbert started the conversation

    Hi there!

    On a client's shop, we are using the plugin WooCommerce Extra Product Options to create a set configurator functionality (see sample product page in related URL). In cominbation with B2B Kind, the pricing logic works perfectly fine in the cart. However, the final price displayed at the end of set configuration by the Product Options plugin diverges from the B2B King prices. The B2B King compatibility setting is already activated. Is there anything we can do to display the price correctly on the product page? The caluclation is correct, only the display of the final price on the product page before add to cart is not.

    I also attached two screenshots illustrating the issue further.

    Attached files:  b2b pricing in cart.jpg
      b2b-b2c prices.jpg

  •  2,212
    WebWizards replied

    Hi Norbert,

    If I understand correctly, I believe you're using the plugin here https://codecanyon.net/item/woocommerce-extra-product-options/7908619 for the extra options.

    We actually have an integration with this plugin and I was expecting it to work on the product page, as we are using a hook 'wc_epo_product_price' to pass a price there. I am not sure if their plugin has made any change since the last time we worked on that.

    It would be great if we could work on this directly, as I am not sure what the exact issue there is, whether maybe there is a difference in the versions of the plugin used, etc. Would it be possible to share an access to that site or a staging site?


    Kind regards,

    Stefan

  •  8
    Norbert replied

    Hi Stefan,

    Yes, you are correct, we are working with that plugin. We'd be happy to provide you access to the site. Should I send over credentials?

    Thank you in advance,

    Maria (writing from our agency account)

  •  2,212
    WebWizards replied

    Yes then please, we'd be happy to check directly,

    If necessary, you can use our email at [email protected] for the account.

  •  2,212
    WebWizards replied

    Hi there,

    Thank you for the access details,


    I looked into this and I believe I was able to write a code snippet to resolve it. The snippet is found here https://hagan-ski.com/wp-admin/admin.php?page=edit-snippet&id=7 and for future reference, the code is this https://pastecode.io/s/cceiecit

    When checking the single product page I now see the following:

    5659281829.png


    Let me know if you see any further issues,

    Kind regards,

    Stefan

  •  8
    Norbert replied

    Hi Stefan,

    At first glance, it looks like it works as intended!

    This code does no reference B2B King at all but works on the presence of a sale price, correct?

    Since we usually add all custom code to functions.php, I assume it's okay for us to do that with this code snippet as well?

    Thank you so much for your competent support!

    Best,

    Maria

  •  2,212
    WebWizards replied

    Glad to help,

    Yes, there's a general price hook and the snippet basically feeds the sale price into that. I think at some point we considered directly adding that to the B2BKing plugin but it can result into some conflicts, so we decided against it.

    The snippet checks is_product() to only apply that to the single product page, so I think it should work fine.


    Yes, you can move that snippet directly to functions.php