Already applied this: “Update variable product price”
http://hottons.com/po_modifications
–>Does not help
-
This reply was modified 2 years, 10 months ago by schlocke.
Hello,
>Already applied this: “Update variable product price”
I see on your website that the JS file of my extension is not updated:
wp-content/plugins/product-options-for-woocommerce/view/frontend/web/product/main.js
You should update this file also.
The updated file is located in the .zip archive of the modification.
Then add this line:
var bdi = this.priceDiv.find('bdi'); if (bdi.length){this.priceDiv = bdi;}
before the lines:
if (this.priceDiv.length == 0)
return;
in the same file.
To make it update the price correctly with the currency sign.
Then refresh the updated file in your browser.
Stanislav
Ok. Thank you for that.
But now I have the +10 as a default Option. But the price isn’t raised.
When I open the page, +10 option is selected, but price is default
Hello,
Try to replace the line:
this.preselectOptions();
with:
var inst = this;
setInterval(function() {
inst.preselectOptions();
}, 1000);
in the file:
wp-content/plugins/pofw-option-default/view/frontend/web/main.js
Then refresh the updated file in your browser.
PS: This file is part of another plugin:
https://wordpress.org/plugins/pofw-option-default/
Stanislav
Thanks, but now I cannot deselect the option anymore, it always returns to the default value…
I developed my own solution:
wp-content/plugins/product-options-for-woocommerce/view/frontend/web/product/main.js
Add this:
var inst = this;
setInterval(function() {
inst.updatePrice()
}, 1000);
After
this.isVariableProduct = true;
}
Hello,
Instead of:
var inst = this;
setInterval(function() {
inst.updatePrice()
}, 1000);
you should use:
var inst = this;
setTimeout(function() {
inst.preselectOptions();
}, 5000);
The setInterval executes the code again and again until the page is open.
The setTimeout function executes the code just one time after the specified delay.
Stanislav
I’m having a similar issue with the price not updating when options are selected. It updates fine on most products but for variable products it doesn’t work even after following the steps listed above.
https://www.expertsatthecrafttable.com/store/edc-wallet/
-
This reply was modified 2 years, 6 months ago by simonpiercy.
Hello,
I have checked your website. It updates the price on the product page and on the shopping cart page for me.
I can send you a screenshot by email. My email is pektsekye@gmail.com
Try to refresh your browser cache. Maybe it still loads the old version of the .js file.
Stanislav