naresh11381
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Prices not showing correctlyWhen I rolled the WC Dynamic Pricing back to an earlier version it started showing the correct <del> price.
It seems some of the code in update 2.11.5 has stopped this functionality working. Can you pass this on to the relevant people or can you direct me to the best people to let know?
Thanks
NikForum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Two checkboxes for two different listsGreat, thanks
Forum: Plugins
In reply to: [WooCommerce] Order status Complete triggers new order emailAh, I see. Makes sense.
Thanks for the explanation!Forum: Plugins
In reply to: [WooCommerce] Order status Complete triggers new order emailBut when it goes from pending to complete, why would it send a new order email?
Forum: Plugins
In reply to: [WooCommerce] Order status Complete triggers new order emailIt happens when it goes from Pending Payment to Complete.
Triggers the new order email each time without fail.Forum: Plugins
In reply to: [WooCommerce] Ajax add to cart in iOS not workingCorrect, my custom code was missing
WC()->session->set_customer_session_cookie(true);
which is why any guest session wasn’t being added to the cart. Only logged in sessions.Forum: Plugins
In reply to: [WooCommerce] Ajax add to cart in iOS not workingIt turned out it would work for logged in users but not for any guests.
The session cookie wasn’t being set.
This is the updated code that is now working including session->set_customer_session_cookie//Recieved ajax data handler function ajax_cart_callback(){ global $woocommerce; WC()->session->set_customer_session_cookie(true); $result = $woocommerce->cart->add_to_cart($_POST['id'], $_POST['qty']); $count = $woocommerce->cart->get_cart_contents_count(); $post_name = get_post($_POST['id']); if($result){ echo json_encode( array('status'=>1, 'count'=>$count, 'result'=>$result, 'post_name'=> strip_tags($post_name->post_title) ) ); } else { echo json_encode( array('status'=>0) ); } wp_die(); }
Forum: Plugins
In reply to: [WooCommerce] Ajax add to cart in iOS not workingIt’s just on some cheap shared hosting while in development, just a basic setup. Last night I moved a version it to the production server which is Serverpilot > PHP7 PHP-FPM Nginx and it still does the same thing, it doesn’t seem to be a server configuration issue as the Serverpilot server is setup for wordpress (this server is only accessible if you change your hosts file as the domain resolves elsewhere ).
It’s strange that only chrome will run it, if I run chrome in incognito it stops working. Does the code above look ok?
Forum: Plugins
In reply to: [WooCommerce] Ajax add to cart in iOS not workingI think we posted at the same time. I don’t have any caching at all.
https://dcccdev.com/product/cobalt-s-lever-single-pack/Forum: Plugins
In reply to: [WooCommerce] Ajax add to cart in iOS not workingActually it seems to be not working in chrome now. Firefox Safari and iOS just add one item to the cart and then it stays one regardless how many items are added and it is empty when going to checkout.
This is the code from functions
//Pass to front-end URL to admin-ajax handler function js_variables(){ $variables = array ( 'ajax_url' => admin_url('admin-ajax.php'), ); echo('<script type="text/javascript">window.wp_data = '.json_encode($variables).'</script>'); } add_action('wp_head','js_variables'); //Recieved ajax data handler function ajax_cart_callback(){ global $woocommerce; $result = $woocommerce->cart->add_to_cart($_POST['id'], $_POST['qty']); $count = $woocommerce->cart->get_cart_contents_count(); $post_name = get_post($_POST['id']); if($result){ echo json_encode( array('status'=>1, 'count'=>$count, 'post_name'=> strip_tags($post_name->post_title) ) ); } else { echo json_encode( array('status'=>0) ); } wp_die(); } // if both logged in and not logged in users can send this AJAX request, // add both of these actions, otherwise add only the appropriate one add_action( 'wp_ajax_nopriv_ajax_cart', 'ajax_cart_callback' ); add_action( 'wp_ajax_ajax_cart', 'ajax_cart_callback' );
Any ideas/tips would be great.
ThanksForum: Plugins
In reply to: [WooCommerce] Ajax add to cart errorthanks for that.
when I run it like thisif(isset($_POST['action']) && $_POST['action'] == 'ajax_button'){ $woocommerce->cart->add_to_cart($_POST['id'] , $_POST['qty']); }
I still receive the same error.
Forum: Plugins
In reply to: [WooCommerce] Add admin user to invoiceSorry I wasn’t very clear.
I am wanting to show the actual username/id of the admin person processing the order on the email invoice.
It is for reference so we know who processed the order.Forum: Plugins
In reply to: [WooCommerce] Show discount per item on email invoiceThanks for that, ended up using
get_line_subtotal($item);
Forum: Plugins
In reply to: [WooCommerce Geolocation Based Products] Freegeoip.net is being shut downAwesome, thanks
Forum: Plugins
In reply to: [Reusable Text Blocks] Feature Request – Inject Slug not ID in shortcodeNo problem, thanks for a swell plugin ??