kilbot
Forum Replies Created
-
Forum: Plugins
In reply to: [WCPOS - Point of Sale (POS) plugin for WooCommerce] Cannot view POSNo problem. Just double check that you have the
access_woocommerce_poscapability by going to WP Admin > POS Settings > POS Access. This is enabled by default for administrators and shop managers so it shouldn’t really be a problem when you first install the plugin.It sounds like it may be a conflict with another plugin you have installed. If you can email me via support@woopos.com.au with a temporary admin account I can get it working for you.
Forum: Plugins
In reply to: [WCPOS - Point of Sale (POS) plugin for WooCommerce] Cannot view POSIt could possibly be an access issue (ie: you need the
access_woocommerce_poscapability).The Pro plugin should be no different than the free plugin … did you have this problem with just the free plugin installed?
Also, please note that customer creation is part of the Pro plugin. Pre-sale questions should be asked via support@woopos.com.au. Thanks!
So long as you have Automatically generate username from customer email enabled, all you need is an email address to create a new customer. The email needs to be valid but there is no need to issue a password.
Forum: Plugins
In reply to: [WP-SpamShield] special settings for woocommerce?Thanks for the update Scott!
Forum: Plugins
In reply to: [Polylang] Polylang alters the global $.ajaxFrom what I can gather you wish to output some parameters and use them in you ajax call. The way most developers will do this is to create a global variable. For example, WordPress adds global variables
ajaxurl,pagenow,adminpageetc to every WP Admin page. Cluttering the global namespace is also bad practice but it’s certainly better than overwriting a global function.So you could do something like:
<script> var polylang = { foo: 'bar', baz: true }; </script>These parameters will be attached to the global window so you can now access them from within your js function, eg:
(function($) { var data = { action: 'ajax_action', security: 'nonce', foo: polylang.baz ? polylang.foo : 'default'; }; $.post( ajaxurl, data, function( resp ) { alert( "Response: " + resp ); }); })(jQuery);As one last illustration of why overwriting the global jquery functions is bad practice please consider this situation: Another plugin author, let’s call him Leroy, has created a Super Awesome Plugin. Leroy also wants to add parameters to every ajax call so he uses $.ajaxPrefilter. Leroy uses
admin_print_footer_scriptson every page, just like you do, except he uses priority 11, so his script executes just after yours. Now Leroy has overwritten your $.ajaxPrefilter. It’s not like WP filters where things get chained, Leroy has just stomped on your prefilter. Leroy is a c**t.Hi Gercovg,
I will add this to the feature request list for a future version of WooCommerce POS.
You could implement it yourself but it would require rebuilding the project so it’s probably not practical for most users. The controller for the receipt module is located here.
Forum: Plugins
In reply to: [Polylang] Polylang breaking third party AJAX requests on admin panelsPlease see this post for an explanation of the problem.
Forum: Plugins
In reply to: [Polylang] Polylang alters the global $.ajaxSince this feature is included in Polylang, I am aware of only one plugin conflicting with it (raised very recently and hoping to solve it).
The problems I describe will affect any other plugin that uses jQuery.ajax and encodes the request payload as
application/json, for example, any plugin using Backbone with default settings.ajaxPrefilter is just a hook to jQuery ajax calls. I use this possibility offered by jQuery as any other plugin authors would use WP filters to alter WP variables.
$.ajaxPrefilter is a global method. This means that any call to $.ajax will also have to run through your filter. ajaxPrefilter is more like pluggable functions than WP filters. It would be like changing the core code of a filter so it returns a string when the filter only expects arrays.
Do you understand?
I enqueue scripts only when needed.
With your plugin installed, go to the WP Dashboard and View Source. Do a search for ‘ajaxPrefilter’ and you will find your script … is it needed on the Dashboard? Go to any other page in the WP Admin and do the same test and you will find your script.
You should use the
current_screenhook and only enqueue your scripts if the$current_screen->idmatches your page id.Hi Henri, I’ll post my response here just in case others are having this problem.
In this case the save settings error is due to a conflict with Polylang, I have notified the authors about the problem.
Hi Henri, can you contact me through the support email with a temp admin account so I can take a look?
Forum: Plugins
In reply to: [WP-SpamShield] special settings for woocommerce?A similar problem occurs if the WC REST API is used to create customers, eg: http://woothemes.github.io/woocommerce-rest-api-docs/#create-a-customer
Please go to your POS Support page and clear the local storage, this will refresh your products.
An option to use legacy HTTP methods has been added to version 0.4.1, please enable this option if you are having problems saving the settings.
Forum: Plugins
In reply to: [WCPOS - Point of Sale (POS) plugin for WooCommerce] POS not showing in adminThis has been fixed in version 0.4.1.