Forum Replies Created
-
AuthorPosts
-
October 7, 2020 at 3:31 pm in reply to: Is it possible to restrict quantities for guest users? #100468
Hi,
Sorry for the late reply. Unfortunately, you are correct – currently, the only option for the guests is to block them completely (i.e. set their max limit to zero) with our “Block guests” options (in “WooCommerce > Settings > Maximum Products per User > General”). We did have similar requests though, so it’s already on my todo list – I’m thinking to implement guest tracking by IP for this.
October 6, 2020 at 9:49 pm in reply to: If I issue a refund, how do I automatically reset the limit? #100476Hi,
I’ve just sent you our newest plugin development version 3.3.0 via email. There I’ve added new “Order statuses: Delete” option to “WooCommerce > Settings > Maximum Products per User > General”. If you select “Refunded” status there, the amounts will be reduced for the user when his order is refunded.
Please give it a try and let me know if it’s working as expected.
P.S. This option will only affect future refunds, so if you need to reduce the amounts for your older orders/customers, you have two options:
1) you can either manually edit sales data on the user’s profile page (please make sure that the “Editable sales data” checkbox is enabled in “WooCommerce > Settings > Maximum Products per User > Admin”), or
2) run the plugin’s “Delete & recalculate sales data” tool (in “WooCommerce > Settings > Maximum Products per User > Tools”) which will skip refunded orders automatically.
October 6, 2020 at 9:13 pm in reply to: How to configure it with different minimum amounts per shipping zone? #88257Hi Carlos,
Sorry for the late reply.
Ok, I’ve just sent you our newest development version 1.9.0 via email. There I’ve expanded our “Advanced: Manual Min Amount” settings, and moved them to a new separate section in “WooCommerce > Settings > Amount Left for Free Shipping > Manual Min Amount”. Now you can set different manual min amounts per shipping zone as well. Please give it a try and let me know if it’s working correctly.
October 2, 2020 at 9:21 pm in reply to: How to configure it with different minimum amounts per shipping zone? #88255Hi Carlos,
Are you using standard WooCommerce “Free shipping” methods, or are you using our “Advanced: Manual Min Amount” section instead (in “WooCommerce > Settings > Amount Left for Free Shipping > General”)? If it’s standard WooCommerce method, our plugin should pick up the min order amounts for different shipping zones automatically. Let me know if it’s our “Advanced: Manual Min Amount” section – I will need to make some changes to our plugin to make it work for different shipping zones, but I believe it’s doable.
September 28, 2020 at 11:19 pm in reply to: How can I set different date ranges for different customers? #100465Hi Jacob,
1. Date ranges on a customer level…
Yes, that’s possible, however, with a small PHP snippet. You need to set your “Date range” to “Last 30 days” in plugin settings, as you would normally do, and add exceptions for some users:
add_filter( 'alg_wc_mppu_date_to_check', 'my_alg_wc_mppu_date_to_check', 10, 6 ); if ( ! function_exists( 'my_alg_wc_mppu_date_to_check' ) ) { function my_alg_wc_mppu_date_to_check( $date_to_check, $date_range, $current_time, $product_or_term_id, $current_user_id, $is_product ) { // TODO: You need to add your user exceptions here; in "user ID => days" format. $users = array( 123 => 14, 124 => 14, ); return ( isset( $users[ $current_user_id ] ) ? ( $current_time - $users[ $current_user_id ] * DAY_IN_SECONDS ) : $date_to_check ); } }You only need to change the code in the snippet where it says “TODO: You need to add your user exceptions here”.
Please note that for this filter to be applied, the “Date range” option must not be set to “Lifetime”.
Please give it a try and let me know if something is not working as expected, or if you have any questions.
2. Placeholders in the “Single product page” message…
Unfortunately, currently, not all placeholders are available in the “Single product page” option, but let me try to add them there. Will get back to you about this asap.
September 28, 2020 at 3:45 pm in reply to: How can I make a specific variation count as 4 instead of 1? #100463Hi again, Chris,
As promised, here is the snippet below. You need to change only one place there – where it says “TODO: you need to add your products with special quantities here”. Please give it a try and let me know if it’s working as expected:
add_filter( 'alg_wc_mppu_get_cart_item_quantities', 'my_alg_wc_mppu_get_cart_item_quantities', PHP_INT_MAX ); add_filter( 'alg_wc_mppu_validate_on_add_to_cart_quantity', 'my_alg_wc_mppu_validate_on_add_to_cart_quantity', PHP_INT_MAX, 2 ); add_filter( 'alg_wc_mppu_save_quantities_item_qty', 'my_alg_wc_mppu_save_quantities_item_qty', PHP_INT_MAX, 2 ); if ( ! function_exists( 'my_alg_wc_mppu_maybe_change_qty' ) ) { function my_alg_wc_mppu_maybe_change_qty( $product_id, $qty ) { // TODO: you need to add your products with special quantities here; in "product (or variation) ID => quantity multiplier" format. $products = array( 123 => 4, 125 => 4, ); return ( isset( $products[ $product_id ] ) ? $products[ $product_id ] * $qty : $qty ); } } if ( ! function_exists( 'my_alg_wc_mppu_save_quantities_item_qty' ) ) { function my_alg_wc_mppu_save_quantities_item_qty( $item_qty, $item ) { $product_id = ( ! empty( $item['variation_id'] ) ? $item['variation_id'] : $item['product_id'] ); return my_alg_wc_mppu_maybe_change_qty( $product_id, $item_qty ); } } if ( ! function_exists( 'my_alg_wc_mppu_validate_on_add_to_cart_quantity' ) ) { function my_alg_wc_mppu_validate_on_add_to_cart_quantity( $quantity, $product_id ) { return my_alg_wc_mppu_maybe_change_qty( $product_id, $quantity ); } } if ( ! function_exists( 'my_alg_wc_mppu_get_cart_item_quantities' ) ) { function my_alg_wc_mppu_get_cart_item_quantities( $cart_item_quantities ) { foreach ( $cart_item_quantities as $product_id => &$quantity ) { $quantity = my_alg_wc_mppu_maybe_change_qty( $product_id, $quantity ); } return $cart_item_quantities; } }September 28, 2020 at 1:29 pm in reply to: How can I make a specific variation count as 4 instead of 1? #100462Sure. Please give me a couple of hours or so…
September 28, 2020 at 1:04 pm in reply to: How can I make a specific variation count as 4 instead of 1? #100460Hi Chris,
First solution that comes to mind – you can set the plugin’s “Mode” option (in “WooCommerce > Settings > Maximum Products per User > General”) to “Product weights”, and then set weights for “normal” variations to “1”, and weight for that “special” variation to “4”. In all frontend notices you can still say “quantity”, so customers won’t really understand that you are limiting it by weight. P.S. Don’t forget to “Recalculate sales data” after changing the “Mode” option.
If that’s not good enough (e.g. if you are using real product weights for shipping), we can do it with PHP snippet, which you’d have to add to e.g. your (child) theme’s functions.php file. Please let me know if this is what you prefer, and I will send you the snippet.
You have two options to update the plugin:
1. Download new version manually from My Account page.
2. Automatic updates – install and activate free WPFactory Helper plugin, which will handle automatic updates, similar as it is with free plugins hosted on wordpress.org.
Hi Jacob,
Which version of our plugin do you have installed? Since v2.0.0 available placeholders are:
%qty%%old_price_single%%old_price_total%%new_price_single%%new_price_total%%discount_value%%discount_percent%%discount_single%%discount_total%
September 21, 2020 at 12:40 pm in reply to: How can I limit users to only purchasing one variation of product subscriptions? #100455Hi,
Would it be possible for me to log in to your site? It would be much easier for me to understand the task then. If that’s possible, my email is [email protected].
September 18, 2020 at 4:03 pm in reply to: How can I limit users to only purchasing one variation of product subscriptions? #100453Hi,
Yes, when you enable the “Use variations” option, each variation is treated as an individual product. So if you set the limit to 0, then (as you correctly noted) “All products” value is used as a fallback. If I understood you correctly, what you actually need is to keep the “Use variations” option enabled, but make an exclusion for some products, and for them use limit as if the “Use variations” option is disabled. If that’s correct, I could try to add this feature to the plugin. Also, if you’d like a faster solution, I could come up with a PHP snippet, which you would need to add to your (child) theme’s functions.php file. Please let me know what you think.
Hi,
Yes, that’s correct. This is exactly how “Per product category” option is working in our plugin.
Maybe one small note. You wrote:
“If user A purchased 4 Product A1, user A can still buy 1 Product from either Product A2, Product A3, Product A4.”
To be exactly correct, it should be:
“If user A purchased 4 Product A1, user A can still buy 1 Product from either Product A1, Product A2, Product A3, Product A4.”
i.e. he can still buy 1 x “Product A1” as well.
Hope that helps. Please let me know if you have any questions.
September 17, 2020 at 8:21 pm in reply to: How can I limit users to only purchasing one variation of product subscriptions? #100451Update: after reading your question again, I’m now thinking – maybe you meant “… buy 1 of any variation…” (i.e. no matter which variation)? If that’s the case, then you don’t need to enable “Use variations” checkbox from my previous post. I.e. in this case steps are:
1. Enable “Per product” checkbox in “WooCommerce > Settings > Maximum Products per User > Limits”.
2. Go to your variable subscription product admin edit page, and set limit to 1.
Please let me know if I misunderstood you.
September 17, 2020 at 8:16 pm in reply to: How can I limit users to only purchasing one variation of product subscriptions? #100450Hi,
Yes, I believe this is possible.
1. First you need to enable “Use variations” checkbox in “WooCommerce > Settings > Maximum Products per User > General”.
2. Then you need to enable “Per product” checkbox in “WooCommerce > Settings > Maximum Products per User > Limits”.
3. After that you need to go to your variable subscription product admin edit page, and there you will be able to set limit (i.e. 1) for the variation you need. Leave it as zero for other variations.
Hope that helps. Please let me know if you have any questions.
-
AuthorPosts