Okay
  Public Ticket #3654212
Query b2b price
Closed

Comments

  •  1
    jelle started the conversation

    hi there,

    if you look at the url, you see we have a plugin to calculate a price for customers. this calculator gets the price from the regular woo price or the sale price field.. but when a b2b is logged in and has a dynamic rule applying to him for a discount, the field underneath the calculator is not updated.. I think this has something to do with the timeframe loading of the page but maybe you can give us a guideline how to get this to work?


    thanks!

  •  2,167
    WebWizards replied

    Hello Jelle,

    It depends a lot on how that calculator works internally. We see this kind of problem with 'product extra options' plugins - sometimes they have their own scripts, that may get the price of the product in various ways.


    I understand that when a B2B user is logged in, the "totaalprijs" field is not updated - for example if a B2B user clicks on the + and - buttons, the field will not update?

    1796949660.png


    Is it possible to share a backend access to the site, or a staging clone site with us, so we can check directly and run a few tests?


    I am hoping there is an easy way to feed it the price, for example through a hook or similar method. I would like to try and find a solution.


    Kind regards,

    Stefan

  •   jelle replied privately
  •  1
    jelle replied

    You there?

  •  2,167
    WebWizards replied

    Hi Jelle,

    I've been looking into it on the site. From what I notice, it seems to me that on the cart page, the prices are correct and therefore the issue is only on the product page in the calculation area.


    I have tried to write a code snippet to solve this. It seems to me that it's working so far:

    https://shopdetrend.nl/wp-admin/admin.php?page=edit-snippet&id=32


    However, I disabled the snippet for now, as your site is live and I do not want to create any unintended issue.

    Please try activating that snippet and testing prices on the various product pages to confirm you do not see any issues.


    Let me know if that seems to solve it for you,

    Kind regards,

    Stefan

  •  1
    jelle replied

    Hi Stefan,

    that works like a charm! thanks for that!!

    We do have another question if that's allright. next to the calculator we also provide a sample button so customers can buy a sample of the product for €1.50. the button works correctly however the dynamic rule of the B2B plugin overrides the 1.50 in the cart.. is there a way to get that fixed? the sample isn't a unique product, it's the same product with a meta tag of it being a sample and also the price is overridden by the sample buttons plugin.

  •  2,167
    WebWizards replied

    I understand this happens for discount rules with the 'sale price' checkbox turned on. 

    I have made an update to B2BKing so that these rules ignore products with that sample meta set. This seems to work in my tests:

    9905163648.png
  •  1
    jelle replied

    nice that works! is there a way we can implement those meta sets ourselves? or is this hard coded.

  •  2,167
    WebWizards replied

    This is hardcoded, we have this set for a few different product sample plugins, free product plugins, etc. If you have any suggestions of other meta, we can consider adding it.