Russell
Forum Replies Created
-
Forum: Plugins
In reply to: [Thank You Page for WooCommerce] Google Analytics no Order TrackingHi,
I can second this, i have the same issue. Any ideas how to fix/work around?
Thanks,
RussellHi Fahad,
Any news on a fix for this issue after we spoke on Google Meet?
I have updated to 1.7.2 and it is still happening.
Thank you,
Russell- This reply was modified 3 years ago by Russell.
I will do, thank you.
Russell
Hi Fahad,
I’m sorry but after further testing it does appear to be the Stock Locations for WooCommerce plug-in. Works fine with the plug-in deactivated and i am getting the 0 in stock error when it is active.
Any suggestions?
Russell
Hi all,
I am facing the same issue, even after the fix in 1.6.8.
When i update a stock level at a location from a positive to a 0 – i get 0 available and still showing as in stock.
See link below as an example – I have just updated the variables “8” (in the 4 colours “dark green”, “red”, “yellow”, “light grey”) of this product from 2 to 0 and you can see here all 4 are showing in stock with 0 available.
https://northernkites.co.uk/shop/brands/eleveight/eleveight-rs-v5-kite-2022/
Any ideas? Is this being looked into still?
Regards,
Russellhttps://thewatersportscentre.com/product/ozone-wasp-v2-foil-wing-2021/
Here’s a link to the website in question with a variable product (with 2 attributes) as an example. You can see here the variations which are in stock trigger the price to change, where as out of stock (or hidden) variations simply shows default var product price “from £790”.
I actually have [“Hide out of stock items from the catalog” in woocommerce > settings > product > inventory] unchecked and i am using this code snippet below to hide the out of stock variations
————————
add_filter( 'woocommerce_variation_is_active', 'grey_out_variations_when_out_of_stock', 10, 2 ); function grey_out_variations_when_out_of_stock( $grey_out, $variation ) { ?> <script type="text/javascript"> jQuery( document ).bind( 'woocommerce_update_variation_values', function() { jQuery( '.variations select option' ).each( function( index, el ) { var sold_out = '<?php _e( 'sold out', 'woocommerce' ); ?>'; var re = new RegExp( ' - ' + sold_out + '$' ); el = jQuery( el ); if ( el.is( ':disabled' ) ) { if ( ! el.html().match( re ) ) el.html( el.html() + ' - ' + sold_out ); } else { if ( el.html().match( re ) ) el.html( el.html().replace( re,'' ) ); } } ); } ); </script> <?php if ( ! $variation->is_in_stock() ) return false; return true; }
————————
I am also using this code snippet below to replace the variable price range by the chosen variation price so that there is just 1 price at the top when selecting variations
————————
add_action( 'woocommerce_before_single_product', 'move_variations_single_price', 1 ); function move_variations_single_price(){ global $product, $post; if ( $product->is_type( 'variable' ) ) { add_action( 'woocommerce_single_product_summary', 'replace_variation_single_price', 10 ); } } function replace_variation_single_price() { ?> <style> .woocommerce-variation-price { display: none; } </style> <script> jQuery(document).ready(function($) { var priceselector = '.product p.price'; var originalprice = $(priceselector).html(); $( document ).on('show_variation', function() { $(priceselector).html($('.single_variation .woocommerce-variation-price').html()); }); $( document ).on('hide_variation', function() { $(priceselector).html(originalprice); }); }); </script> <?php }
————————
Hopefully this helps more with the scenario and i really appreciate your help!
- This reply was modified 3 years, 7 months ago by Russell.
Thanks for the reply!
Apologies I should have been clearer – It is not triggering the exact variation price when I have “Hide out of stock items from the catalog” checked in woocommerce > settings > product > inventory
I am trying to grey out variations that are not in stock (by hiding them) but I still want it to show the exact price of each variation when you select it regardless.
If that makes sense?
What is the best way to access the wp_options table?
Thanks
Forum: Themes and Templates
In reply to: [Storefront] Storefront Update – Mobile Logo Homepage LinkExcellent, thank you!