SYNC4489
Forum Replies Created
-
Thanks for the clarification.
So if I understand correctly, an order placed with a valid VAT number (and I’ve just verified that in the order meta is considered valid by the plugin) should be considered VAT exempt for any calculation, even in the admin, as described in case 1.
But this doesn’t happen in our installation, we are on WP 4.9.10, Woo 3.5.6, and the latest version of your plugin.
Could you please give me a clue as how/where the order VAT exemption intercept is done, so I can see if we have anything else installed that is blocking it?Hello Diego,
first of all many thanks for your superfast answer.
We already have a filter working, overriding the VIES result. What we wanted to achieve was to avoid calls to VIES and JS refresh on checkout page when it’s not needed (we already know that a customer is vat exempt on not)
Forum: Plugins
In reply to: [Tidio – Live Chat & AI Chatbots] document.tidioIdentify – Need helpHi,
I solved the problem by adding this code in the header.php of the theme:
<?php if( is_user_logged_in() ) { $current_user = wp_get_current_user(); $current_user_name = $current_user->user_firstname . " " . $current_user->user_lastname; $current_user_id = $current_user->ID; $current_user_mail = $current_user->user_email; ?> <script> var user_id = "<?php echo $current_user_id ?>"; // Set customer ID var user_fullname = "<?php echo $current_user_name ?>"; // Set customer email var user_email = "<?php echo $current_user_mail ?>"; // Set customer name document.tidioIdentify = { distinct_id: user_id, email: user_email, name: user_fullname, }; </script> <?php } ?>
Let me know if it works ??
Forum: Plugins
In reply to: [Redis Object Cache] Turn off for dashboard?Great solution! I had the same problem and it solved everything in my wp-admin
Thanks a lotHi!
I had the same problem, I’ve solved with this snippet:add_filter('atum/list_table/column_title_length', 'atum_column_title_length'); function atum_column_title_length($length) { return 80; //number of characters for the title }
you can add it in your functions.php or by any snippet plugin
Let me know if it works
Forum: Plugins
In reply to: [Elementor Element Condition] Show subcategories instead of productNevermind, I’ve solved the visualisation condition by adding a custom keyword for a check on subcategories.
I write here the solution in case someone else would need it:add_filter( 'eleconditions_vars', 'new_keywords'); function new_keywords( $custom_vars ) { global $woocommerce; if ( is_product_category() ) { $term = get_queried_object(); $has_subcat = get_terms( $term->taxonomy, array( 'parent' => $term->term_id, 'hide_empty' => false, 'field' => count ) ); $custom_vars['has_subcat'] = ($has_subcat) ? true : false; return $custom_vars; } }
I’ve added to the archive template two widgets: one for products archive and one for product categories, and I’ve put the condition on each one like this:
has_subcat !== true
(for products widget)
has_subcat === true
(for categories widget)But now I have the problem to modify the Elementor query to show the subcategories for the current category and not always Top Level, but this is not something related to Elementor Element Condition…
I’ll update the post if I’ll find out, so the solution will be complete.Hey guys,
I’m ok to share 50% of the fee for this function if @justbruno is still interested.
Or if anyone wants to add to the list, the shared fee would be less for everyone…
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Limit the plugin only to some customersHi again James,
solution 1 is not really not interesting because it involves anyway a manual job and also because these customers have special “role” prices, loyalty points, coupons, that are impossible to manage without making manual discounts and calculations on the backend order after it has been placed.
In this case we’d simply stick with our actual manual solution…solution 2 could have been nice… but:
the filter as it is apparently does not work: I’ve inserted it as a snippet, activated in your plugin the expiration at 1 minute, logged in with a normal user in a browser and with our famous “user 9” in another, after 1 minute both users had the cart items removed.
And I’ve just figured out that doing so, normal users would have their items physically removed from cart! This would be a no-no situation for us, sometimes some of our online customers build their cart in the span of 2-3 days!The best solution, let’s call it number 3, would simply be to be able to activate the stock reducing function only for one or a few users, no expiry (and it should respect the out of stock status/backorder setting).
For all the others, the plugin would be just completely “turned off”.If you’re interested we could even arrange a paid customization job for this modification…
Let me know, and of course thanks for all the time you’re spending to find a suitable solution for us
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Limit the plugin only to some customersI’ve just made this modification to woocommerce-cart-stock-reducer.php
if ( ! defined( 'ABSPATH' ) ) exit; function make_cart_stock_reducer_go_now( $integrations = array() ) { if ( class_exists( 'WC_Integration' ) ) { // Three... Two... One... MAKE ROCKET GO NOW! if ( 9 != get_current_user_id() ) { require_once plugin_dir_path( __FILE__ ) . 'includes/class-woocommerce-cart-stock-reducer.php'; $integrations[] = 'WC_Cart_Stock_Reducer'; return $integrations; } else { return false; } } }
and it works except for a weird quirk… now the “VIP” customer (ID 9) never sees the “out of stock” availability and can always put in the cart any item, with stock going below zero, even if our woocommerce is configured to forbid any backorder…
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Limit the plugin only to some customersHi again ??
So your VIP customers will drop in at various times during the day and pickup parts and only at the end of the day is the order paid for and closed out? I assume you don’t want to have individual orders each time they come in.
Right, this is exactly the scenario
When a VIP customer comes in are they pre adding an item to their cart before they come in or they just show up and if you have the item then they take the item and you deal with your inventory problem?
They check if the item is available on our website, and if it is they come as they are at less than 50 meters away…
So we have to write down what they take, and manually reduce the stock on WC.
At the end of the day they take a copy of our paper, enter the whole order, place it, and pay.Then you have non VIP customers that place orders online and have the parts shipped to them (or scheduled pickup)? How do you handle stock for these users?
Yes we have literally hundreds of online customers to who we ship. Stock is reduced only when the order is placed. Adding to cart doesn’t make any kind of “item reservation”…
So what we try to accomplish is that only for very specific customers we have to change stock immediately when they add/remove/update to cart, so we could eliminate all the manual process.
The customer could start his cart in the morning, add items to it during the day when they come to pick it up, and simply close the order and pay on the evening and we could automatically avoid any overselling to our online customers.- This reply was modified 6 years, 7 months ago by SYNC4489.
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Limit the plugin only to some customersHi James, thanks for your fast reply ??
I’ll try to explain better my need. In fact I don’t need at all any expiration time, countdown or other fancy nice things.
The purpose of this modification is because we have a very few VIP local customers who have their shops very near our facility, that during the day will come and get spare parts that we sell, every time they need it, from morning to evening.
And at the end of the day they place the final order for all the pieces they bought during the day, and they pay us.But we have to manually reduce quantity every time they come to avoid possibility to oversell the stock during the day… or otherwise they should place an order every time they need a spare part and come to our store.
So to have your plugin work only for these very few customers (just the functionality of stock manipulation as soon as they add/update/remove from cart), would be of great help. They could start their cart in the morning, adding items the whole day, and at the end of the day just place the order.
Do you think that it could be possible with your plugin?
Great!
doing exactly what you wrote created the two missing MySQL tables.
Many many thanks for your quick reply
Can’t wait for your premium PO Add-on!
Hi,
here is an excerpt of the log:
Jul 17 16:15:18 192.168.130.239 apache2[20249]: [u1614] [xxxxxxxx.onpressidium.com] [xxx.xxx.xxx.xxx] [error] [pid 20249:rid MbRYQNycqa8:tid 139683619112704] mod_proxy_fcgi.c(673): [client xxx.xxx.xxx.xxx:57412] AH01071: Got error 'Table->display_rows,... PHP message: WordPress error on database Table 'db_xxxxxxxx.wp_atum_order_items' doesn't exist for query SELECT SUM(oim2.<code>meta_value</code>) AS quantity FROM <code>wp_atum_order_items</code> AS oi LEFT JOIN <code>wp_atum_order_itemmeta</code> AS oim ON oi.<code>order_item_id</code> = oim.<code>order_item_id</code> LEFT JOIN <code>wp_atum_order_itemmeta</code> AS oim2 ON oi.<code>order_item_id</code> = oim2.<code>order_item_id</code> LEFT JOIN <code>wp_posts</code> AS p ON oi.<code>order_id</code> = p.<code>ID</code> WHERE oim.<code>meta_key</code> IN ('_product_id', '_variation_id') AND <code>order_item_type</code> = 'line_item' AND p.<code>post_type</code> = 'atum_purchase_order' AND oim.<code>meta_value</code> = 76803 AND <code>post_status</code> = 'atum_pending' AND oim2.<code>meta_key</code> = '_qty' GROUP BY oim.<code>meta_value</code>; fatta da do_action('wp_ajax_atum_fetch_stock_central_list'), WP_Hook->do_action, WP_Hook->apply_filters, Atum\\Inc\\Ajax->fetch_stock_central_list, Atum\\Components\\AtumListTables\\AtumListTable->ajax_response, WP_List_Table->display_rows_or_placeholder, WP_List_Table->display_rows,... PHP message: WordPress error on database Table 'db_xxxxxxxxxxxx.wp_atum_order_items' doesn't exist for query SELECT SUM(oim2.<code>meta_value</code>) AS quantity FROM <code>wp_atum_order_items</code> AS oi LEFT JOIN <code>wp_atum_order_itemmeta</code> AS oim ON oi.<code>order_item_id</code> = oim.<code>order_item_id</code> LEFT JOIN <code>wp_atum_order_itemmeta</code> AS oim2 ON oi.<code>order_item_id</code> = oim2.<code>order_item_id</code> LEFT JOIN <code>wp_posts</code> AS p ON oi.<code>order_id</code> = p.<code>ID</code> WHERE oim.<code>meta_key</code> IN ('_product_id', '_variation_id') AND <code>order_item_type</code> = 'line_item' AND p.<code>post_type</code> = 'atum_purchase_order' AND oim.<code>meta_value</code> = 77081 AND <code>post_status</code> = 'atum_pending' AND oim2.<code>meta_key</code> = '_qty'\t GROUP BY oim.<code>meta_value</code>; fatta da do_action('wp_ajax_atum_fetch_stock_central_list'), WP_Hook->do_action, WP_Hook->apply_filters, Atum\\Inc\\Ajax->fetch_stock_central_list, Atum\\Components\\AtumListTables\\AtumListTable->ajax_response, WP_List_Table->display_rows_or_placeholder, WP_List_Table->display_rows,...
we checked the database and the two tables really do not exist…
WP: 4.9.7
WC: 3.2.5
PHP: 7.0.xThanks in advance
I agree, this would be a wonderful feature, and make this product perfect!
Forum: Plugins
In reply to: [WooCommerce Order Search Admin] Search for Products in Order Creation?that would be a very nice feature, I agree!
+1