woothemes

Calculate different order status count and total cash for each order status in Woocommerce

五迷三道 提交于 2019-12-09 18:38:23
问题 I need to get the order total of a different status in between some days in woocommerce query. For it to loop through all orders in between some day I use the following query: $args = array( 'post_type' => 'shop_order', 'post_status' => 'publish', 'posts_per_page' => -1, 'date_query' => array( array( 'after' => array( 'year' => 2016, 'month' =>01, 'day' =>01, ), 'before' => array( 'year' => 2016, 'month' => 01, 'day' =>30, ), 'inclusive' => true, ), ), ); $loop=new WP_Query($args); By using

How to get the Order status changed date in Woocoomerce?

点点圈 提交于 2019-12-08 14:09:08
问题 I need to get the date in which the order status is changed. For example 123 is order id , the order is created in 12-12-2015 , and order is confirmed in 13-12-2015 . So I need to know in which date order is confirmed from order id? 回答1: In woocommerce, Try $order = new WC_Order($order_id); echo $order->modified_date; 回答2: Never access order properties directly. Use this to get the order modified date: $order = new WC_Order($order_id); $modified_date = get_the_modified_date( $order ); echo

Display additional information in cart page instead of checkout page

大憨熊 提交于 2019-12-08 09:58:48
问题 I created an eCommerce using the plugin woocommerce . I need to get a few information from user before checkout , so used the WooCommerce Checkout Manager plugin and its working. But this is displaying the additional information in checkout page.I need it to display it in cart page so that the user can proceed to checkout after filling the required informations like a feedback one. How can i code it to display in cart page instead of checkout page? Any help please 回答1: You will need to hook

WooCommerce search products between price range using WP_Query

杀马特。学长 韩版系。学妹 提交于 2019-12-08 07:50:22
问题 I am currently building my own custom advanced search functionality for a WordPress website with Woocommerce. You should be able to search using filter: Category Min/Max price My current progress is attached below. This enables you to specify category slugs in the URL parameter. Returned will be posts that matches: /** * Default arguments * @var array */ $query = array( 'post_status' => 'publish', 'post_type' => 'product', 'posts_per_page' => 10, ); /** * Category search */ if(isset($_GET[

WooCommerce add a custom fee using ajax to cart totals on checkout page

穿精又带淫゛_ 提交于 2019-12-07 11:38:59
问题 I am trying make it when user changes the Shipping address select dropdown it dynamically add a fee to cart totals using ajax.I could able to to get the value but when select a another state it wont update the totals. My ajax request: jQuery(document).ready(function () { jQuery('#shipping_state').change(function () { var data = { action: 'woocommerce_custom_fee', security: wc_checkout_params.update_order_review_nonce, add_order_fee: 'state', post_data: jQuery('form.checkout').serialize() };

show woocommerce messages in overlay div or tooltip without page refresh

旧城冷巷雨未停 提交于 2019-12-06 11:36:07
问题 I am trying to get rid of the redirect/reload when the user is adding a product or gets a info message in my woocommerce shop. I just want to show the "added to cart" message in a tooltip or overlay div and let them continue shopping without renavigate to the shop. AJAX add to cart is enabled so my question is: what can I do to display this messages without refreshing the whole page? EDIT: maybe useful for anyone, heres my FINAL CODE: $('.add_to_cart_button, .single_add_to_cart_button').click

Woothemes Flexslider - one unique flexslider inside another flexslider - is it posible?

牧云@^-^@ 提交于 2019-12-06 07:24:05
I am using the newest flexslider from Woothemes, and I am trying to init one flexslider inside another. Like this: function initFrontpageSliders() { $('#flexsliderFrontpage01').flexslider({ animation: "slide", animationLoop: false, pauseOnHover: true, start: function(slider) { //Fires when the slider loads the first slide $('#flexsliderFrontpage02').flexslider({ animation: "fade", directionNav: false, animationLoop: false, pauseOnHover: true }); } }); } but when I call the script, is generates flexsliderFrontpage02 ul below flexsliderFrontpage01 and not inside the slide (list element) - like

WooCommerce add a custom fee using ajax to cart totals on checkout page

百般思念 提交于 2019-12-05 13:44:26
I am trying make it when user changes the Shipping address select dropdown it dynamically add a fee to cart totals using ajax.I could able to to get the value but when select a another state it wont update the totals. My ajax request: jQuery(document).ready(function () { jQuery('#shipping_state').change(function () { var data = { action: 'woocommerce_custom_fee', security: wc_checkout_params.update_order_review_nonce, add_order_fee: 'state', post_data: jQuery('form.checkout').serialize() }; jQuery.ajax({ type: 'POST', url: wc_checkout_params.ajax_url, data: data, success: function (code) { var

Woocommerce - external/affiliate product image to external link (buy URL)

可紊 提交于 2019-12-04 21:58:14
(Warning: I'm not a programmer) Straight to the point. I have a product catalogue http://adidassuperstar.cz , and I want images (thumbnails) point to the affiliate link - the same link as the link of a buy button under the image. I googled everything, but none of the answers actually worked for me. However, I found something which helped me just half the way. When I insert this code to functions.php it makes this: Every link point to the affiliate link - I mean even a title of a product. I want only the image to have an affiliate link, not the title. The title should point to the product page

offcanvas menu link broken

让人想犯罪 __ 提交于 2019-12-04 19:51:01
I'm working on a project for school, and I'm having an issue that I hope someone will be able to help with (and possibly curb my festering hatred for joomla, but that's beside the point :) First, here's the URL: http://edcc3.cloudaccess.net The issue is, when you resize the browser or use an emulator to see the rendering on 480px devices, the offcanvas menu links won't work. Meaning they don't scroll to the targetted sections within the one page layout, and I cant figure out why. I'm betting it's an ordering issue but for the life of me I can't find the problem. Any help would be appreciated!