Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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/e1slxg

    #739994

    Hi gosimpla!

    can you please confirm you are runing the latest version of Enfold?
    Thanks a lot

    Regards,
    Basilis

    #740444

    Hi 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

    #742752

    Hey!

    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,
    Ismael

    #751984

    Hi 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

    #752049

    Hi,

    We have reported that to Kriesi, so he can take a look and have it solved.
    Thanks a lot

    Best regards,
    Basilis

    #754928

    Hi!

    We modified the code a bit. Please try it again.

    Best regards,
    Ismael

    #755664

    Hi,

    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

    #756146

    Hi!

    Yes, we can reproduce the issue and the script that we provided above should fix it. It’s working on our installation. Please post the login details here so that we can check it properly.

    Cheers!
    Ismael

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.