Open Rados51 opened 5 years ago
Could be done with bit of jQuery:
(function($) {
$(document).ready(function() {
var originePrice = $(".oxy-product-price .price").html();
$('.variations_form').on('woocommerce_variation_has_changed', function() {
if ($(".variations_form select").val() == '') {
$(".oxy-product-price .price").html(originePrice);
} else if ($(".woocommerce-variation-price .woocommerce-Price-amount").length) {
if ($(".woocommerce-variation-price span.price ins").length) {
var variationPrice = $(".woocommerce-variation-price span.price").html();
$(".oxy-product-price .price").html(variationPrice);
} else {
var variationPrice = $(".woocommerce-variation-price .woocommerce-Price-amount").html();
$(".oxy-product-price .price").html(variationPrice);
}
}
});
});
})(jQuery);
@Rados51 The Product Price element should work for single and variable products, as long as it's used within the Product Builder element.
@Rados51 The Product Price element should work for single and variable products, as long as it's used within the Product Builder element.
I think Rados wants to separate the price from the variation selection so you can design better UI for variable products.
Currently the variable product select option is part of the product price element these would be great if they were separate.
@jamescrabb Thank you for clarifying.
@jamescrabb Thank you for clarifying.
No problem
Describe the feature you'd like to see included in Oxygen. Ability to add and move variation price same as regular price. It would be great option to use it on same place as price range so We can design better UI.
What are the use cases for this feature? e-commerce with variable products
Examples of this feature or functionality. From this thread: https://stackoverflow.com/questions/43617537/move-woocommerce-variation-price
Also now it works partially in Oxygen with javascript from stackoverflow: https://www.facebook.com/Rados.A51/videos/2602019889844304/