volcomjon
Forum Replies Created
-
@duracelltomi – Thanks for the response.
here is the domain: https://www.saltee.co.uk/
test product (zero value): https://www.saltee.co.uk/product/test-product/code to remove shipping: testcode
let me know if you need anything else
Glad im not the only one – this is a fairly serious issue and hoping there is a fix soon. can @duracelltomi reply to this please.
Forum: Plugins
In reply to: [Redirection for Contact Form 7] FATAL ERRORall fixed – thanks for the quick turnaround
Forum: Plugins
In reply to: [Redirection for Contact Form 7] FATAL ERRORall fixed – thanks for the quick turnaround
thanks – but can you be a little more specific / helpful on how to use this, and how to “access its properties”
maybe an example?
Forum: Plugins
In reply to: [Price Based on Country for WooCommerce] Country Switcher FlagsThanks – I managed to figure this out using another solution (but similar)
which function exactly? and how would this be called into the country-selector.php?
Forum: Plugins
In reply to: [Variation Swatches for WooCommerce] Variation image as swatch?
Forum: Plugins
In reply to: [Variation Swatches for WooCommerce] Variation image as swatchupdate: essentially, I dont want to have to go through every product and reset a swatch image for the individual colours, as the image is already uploaded to the variation – this is the one I want to use by default.
Forum: Plugins
In reply to: [WooCommerce] Default Variation Image not showing on category / shop pageI’ve cobbled a function together to achieve this, but I honestly cant believe this is required? am I missing something really obvious in woocommerce?
remove_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10); function own_woocommerce_thumbnail() { global $product; // HERE your targeted product attribute taxonomy $taxonomy = 'pa_model-colour'; if( $product->is_type('variable') ){ $available_variations = $product->get_available_variations(); foreach ( $available_variations as $variation ) { $isDefVariation=false; foreach($product->get_default_attributes() as $key=>$val){ if($variation['attributes']['attribute_'.$key]==$val){ $isDefVariation=true; } } if($isDefVariation){ $image = $variation['image']['thumb_src']; } } echo '<img src="' . $image .'" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail">'; } } add_action('woocommerce_before_shop_loop_item_title', 'own_woocommerce_thumbnail', 10);
Forum: Plugins
In reply to: [WooCommerce] Default Variation Image not showing on category / shop pageanyone?
@oscargare that seems to have worked – or at least the problem has gone away!
I’ll raise this with ultimate addons – thank you for looking into this, especially as its not your plugin!
I have further identified that within the uabb-woo-products.php , line 46:
add_filter( 'nonce_user_logged_out', array( $this, 'filter_nonce_user_logged_out' ) );
which refers to the following function:
public function filter_nonce_user_logged_out( $uid = 0, $action = '' ) { if ( $uid && 0 !== $uid && $action && 'add_cart_single_product_ajax' === $action ) { return $uid; } return 0; }
which in turn, refers to this function:
public function add_cart_single_product_ajax() { if ( isset( $_POST['security'] ) && wp_verify_nonce( $_POST['security'], 'uabb-woo-nonce' ) ) { $product_id = isset( $_POST['product_id'] ) ? sanitize_text_field( $_POST['product_id'] ) : 0; $variation_id = isset( $_POST['variation_id'] ) ? sanitize_text_field( $_POST['variation_id'] ) : 0; $quantity = isset( $_POST['quantity'] ) ? sanitize_text_field( $_POST['quantity'] ) : 0; } if ( $variation_id ) { WC()->cart->add_to_cart( $product_id, $quantity, $variation_id ); } else { WC()->cart->add_to_cart( $product_id, $quantity ); } die(); }
but no idea why this would not work, or even why it is invoked on checkout.
removing this filter fixes the issue, which is why it works when logged in, but not when logged out
I have identified the problem SOMEWHERE within the bb-ultimate-addon/modules/uabb-woo-products/uabb-woo-products.php file
line 593 has this:
check_ajax_referer( 'uabb-woo-nonce', 'security' ); if ( ! isset( $_REQUEST['product_id'] ) ) { die(); }
but commenting this out doesnt have any effect. renaming the entire file (to remove it) does, so it is something in here conflicting. I know this is not your plugin, but wanted to highlight it.