hardyzbest
Forum Replies Created
-
I tried something like this:
add_filter('b2bking_tiered_range_display_final', function($price, $min, $max, $product){ return '<span class="abpreisb2b"> ab </span>' .wc_price($min); }, 10, 4); add_filter('woocommerce_get_price', 'b2bking_tiered_range_display_final', function($price, $min, $max){ return wc_price($price); }, 10, 4);
Bit it gave me a PHP error on the hooks.
Here’s a perfect example of a product:
https://mskprotect24.de/produkt/sicherheitsbrille-blues-clear/
You can see two variations where the price changes how I want it but when I click on the smaller variation, the variation price keeps the smallest price instead of the current price.
- This reply was modified 2 years, 1 month ago by hardyzbest.
Nope, your snippet just replaces all prices no matter what I choose. There isn’t any kind of dynamic price change now.
For everyone else, this is the code:
<span style="font-family: Inconsolata, Consolas, Monaco, "Lucida Console", monospace; font-size: 14.4px; white-space: pre; background-color: rgb(240, 240, 240);">add_filter('b2bking_tiered_range_display_final', function($price, $min, $max, $product){ return wc_price($min); }, 10, 4);</span>
case closed
You are a freak, thanks so much!
For everyone else, if you need a prefix, take this one:
add_filter('b2bking_tiered_range_display_final', function($price, $min, $max, $product){ return '<span class="yourclass"> YOURPREFIX </span>' .wc_price($min); }, 10, 4);
I added a span with a class you can rename how you want it, just replace yourclass . Same goes to YOURPREFIX, that’s the prefix you can call however you want.
[EDIT]
Please not the percent solution, we work with fixed prices per product and different customer roles. It has to this way.
I guess it must be something around 681 and 709 in the class-b2bking.public.php that could be added as a function in the functions.php ?
Updated to 4.4.55 and the line 5400 containing $size isn’t there anymore. Plus no PHP warnings anymore, everything works like a charm.
Guys, really, this was the best decision I made using your plugin.
If you ever need some feedback for future add-ons or improvement, I’d be happy to help you out.
- This reply was modified 2 years, 2 months ago by hardyzbest.
Just checked the version, it’s 4.4.33 . Envato now shows me an update since yesterday, I will check it and let you know!
Thanks!
[EDIT]
the offer-image-setting for frontend didn’t solve the issue, also no the compatibility setting at the end of the advanced-tab.
I deleted the variables to atleast continue with my styling/formatting but I clearly NOT recommend to delete something in the core files of this plugin. If anyone else has this issue, please continue reading the upcoming/next replies!
[EDIT]
Looked at the php and I guess it’s the image of the selected variation. I don’t use variation images like most of the woocommerce users. I prefer a solution to get the main product image.
- This reply was modified 2 years, 2 months ago by hardyzbest.
I only see these 1.1 seconds when I’m logged in as an Administrator and still on reloading. I’m fine with it, all three test accounts didn’t see such a loading time. Maybe it’s because there isn’t any active caching for admins and shop managers thanks to WP-Rocket (I deactivated it).
So….I’m happy, thanks for the help, we can close this thread.
- This reply was modified 2 years, 2 months ago by hardyzbest.
Sure, Query monitoring is no problem, here’s a screenshot from a single product page:
It’s a great loading time now compared to the previous situation but with 1,1 seconds it’s still huge. All other queries are between 0,03 – 0,1 which is around 1,5 seconds in total and I’m fine with it. Please note that I was logged in as an Administrator when I made the screenshot.
First of all thank you for the quick response, especially on new years eve, I appreciate those kind of support.
Just double checked the versions and yes, both the free and the pro version are up to date. I don’t have automatic updates activated to make sure I can handle everything on my own. Themeforest just announced the latest update on 31st DEC, so it’s the current one.
For the support ticket thank you very much for the tip, even if the support expired! Just awesome. But as long as we can try out some things that can also be adapted in the free version, we should continue with the WordPress forum.
And now the suggesteted Product visibility Cache…it wasn’t activated and it seems that something changed in a positive way! Please let me check some things in the next days as my website will see a lot of traffic the next weeks and I have to make sure everything works like a charm. Cross Browser checking, my automatic cache-clearing, mobile checking, GTMetrix, Pingdom, compatibility, etc. ….so please keep the forum/threat/ticket open.
Thanks and greetings from Germany!
Forum: Plugins
In reply to: [WPC Product Bundles for WooCommerce] Show bundled products on product pageWorked for me, thank you!
For all other people, here’s the code you have to put in your functions.php:
add_action( 'woocommerce_after_shop_loop_item', 'get_my_bundled_stuff', 5 ); function get_my_bundled_stuff() { global $product; echo do_shortcode("[woosb_bundled]"); }