Tagged: bug, prices, woocommerce
-
AuthorPosts
-
January 29, 2017 at 3:22 pm #739946
Hi guys,
I have found a bug in the Product Purchase Element which is very annyoing and it would be wonderful if it could be fixed soon.
Steps to reproduce:
1) Create new Product
2) Use “Custom Layout Editor” and add “Product Puchase Button” Element to your Page.
3) “Variable product”
4) Create a attribute calles “size” and give it three options like “S|M|L” (tick “Used for variations”)
5) Create a Variation for each Size
6) Use the “set regular price” -> “go” to set a regular price for all the variants.
7) Open preview of the product page and you will see this without a price: http://prntscr.com/e1slhz
8) Go back to product and give one of the variants a different price.
9) Go back to product page and you will see the prices all of a sudden: http://prntscr.com/e1slxgJanuary 29, 2017 at 6:33 pm #739994Hi gosimpla!
can you please confirm you are runing the latest version of Enfold?
Thanks a lotRegards,
BasilisJanuary 30, 2017 at 11:53 pm #740444Hi Basilis,
I’m using version 3.8.4. But this pricing issue with the custom product pages already exists very long. That’s why I always switched back to the woocommerce standard layout which is of course very unfortunate because it would be quite a killer feature for enfold to do your own product page layout, if only it would work a bit more properly!
I hope this gets fixed soon, thank you very much!Best,
George
February 4, 2017 at 10:42 am #742752Hey!
I was able to reproduce the problem but I can’t find the cause of the issue. Are you planning to have the same prices for all variable products? Please try this in the functions.php file:
function ava_get_woocommerce_currency_callback() { $symbol = get_woocommerce_currency_symbol(); echo "<script type='text/javascript'>"; echo "var avia_framework_globals_mod = avia_framework_globals_mod || {};"; echo " avia_framework_globals_mod.woocommerceCurrency = '".$symbol."';"; echo "</script>"; } add_action('wp_footer', 'ava_get_woocommerce_currency_callback', 10, 1); // custom script function ava_custom_script() { ?> <script type="text/javascript"> (function($) { function a() { $('.av-woo-purchase-button').each(function() { var form = $(this).find('.variations_form'), pc = $(this).find('.woocommerce-variation-price'), product_variations = form.data('product_variations'), symbol = avia_framework_globals_mod.woocommerceCurrency, currency = "<span class='woocommerce-Price-currencySymbol'>"+symbol+"</span>", price = '', check = pc.find('.woocommerce-Price-currencySymbol').length !== 0; $(product_variations).each(function() { var vaddcart = $('.woocommerce-variation-add-to-cart').find('.variation_id'), varID = $(this).variation_id; if(varID == vaddcart) { price = $(this).display_price; } }); //console.log(check); if(check) return; pc.append("<span class='price'><span class='woocommerce-Price-amount amount'>"+ currency + price +"</span></span>"); }); } $("#top .variations select").on('click', function() { setTimeout(function() { a(); }, 1000); }); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_custom_script', 10, 2);
Best regards,
IsmaelFebruary 26, 2017 at 5:38 pm #751984Hi Ismael,
thank you but this is not a suitable solution for this problem. First of all it takes a few seconds until you see a price and then it has a dollar sign instead of a € as it should have. I’m not looking for a quick fix with javascript. I have talked to a few other Shop owners that use Enfold for a few years now and they all agree that this bug has been there already for a long time and nobody has done something about it. I really think it’s about time to fix this properly with a new version!
Please pass this on to the people responsible for developing, thank you.But thanks for you efforts anyway.
George
February 26, 2017 at 9:48 pm #752049Hi,
We have reported that to Kriesi, so he can take a look and have it solved.
Thanks a lotBest regards,
BasilisMarch 3, 2017 at 9:39 am #754928March 4, 2017 at 7:07 pm #755664Hi,
now it doesn’t even show the dollar prize anymore. It is very simple to reproduce, my steps above should help. I hope this will be fixed properly in a new version!
Best regards,
George
March 6, 2017 at 5:59 am #756146 -
AuthorPosts
- You must be logged in to reply to this topic.