Igor Jerosimić
Forum Replies Created
-
Forum: Plugins
In reply to: [I Order Terms] White Screen of DeathI’m glad you found plugin that can do what you needed.
For anyone else looking for the same functionality you can try plugin that @renegademonster mentioned in previous post, my plugin does not sort posts in relation to terms, only terms.
Forum: Plugins
In reply to: [I Order Terms] White Screen of DeathHi,
In
add_filter( 'get_the_terms', 'get_the_terms_sort', 10, 3 );number 10 is for filter priority and number 3 is the number of arguments that WP will pass to my function. When you added some weird numbers in their place WP must have gone haywire, so no, that is not the correct way to do it 🙂If I’m understanding correctly you need something likes this:
– category 1
— post 1
— post 2
– category 2
— post 3
— post 4You can’t do that with my plugin, you would need some custom programming to be able to use sort order from my plugin in this way.
Yes, version 3.6.6 solves the issue.
Thanks.
I just updated to WooCommerce Multilingual v3.6.5.1 and still same issue.
Forum: Plugins
In reply to: [I Order Terms] sort in frontend like in backend (3 posts)Hello,
You say that you are not using any custom taxonomy, so you are trying to sort taxonomy from post category, post tags, or some plugin/theme?
Some plugins (for example WooCommerce) already have sort functionality so they conflict when outputting the results.
Forum: Plugins
In reply to: [I Order Terms] Sort search resultsMy plugin can only do term sorting, not posts sorting.
If you would like to order posts by terms order it would require customizing the query via WP query filters.
Thanks for letting me know.
In admin panel your classes WCML_WC_MultiCurrency and WCML_Multi_Currency_Support are initialized even if multi currency is off:
if($woocommerce_wpml->settings['enable_multi_currency'] != WCML_MULTI_CURRENCIES_INDEPENDENT){ $WCML_WC_MultiCurrency = new WCML_WC_MultiCurrency;Can you tell me is this desired behaviour or a bug?
If you still want me to contact you via WPML.org forums I will do so, but I will not be able to provide access to the affected website, I will need to create a new WP instance with sample code.
We resolved the issue with the cut off prices by removing your filters, we don’t need any outside custom programming, thanks.
We use:
WP Version: 4.1.1
WC Version: 2.2.8
decimal_point: .
thousands_sep: N/A (empty string)Currency: EUR
Manage Currencies: No multi-currencyWe display table of prices by country in admin panel, this is our (simplified) code:
foreach ( $prices_by_country as $row ) { echo wc_price( $row->price, array( 'currency' => $row->currency_code ) ); }Our wc_price call is going throw your function price_in_specific_currency (wc_price filter) which detects that currency is changed and passes price through wc_price function one more time. This is the process:
- we call wc_price( ‘14499’, array( ‘currency’ => ‘CZK’ ) )
- your filters change the decimal and thousand separators thus creating ‘14,499.00’
- due to currency being different you send it one more time to wc_price function
- inside wc_price function there is a
floatval( $price )which trims the price to ’14’
Forum: Plugins
In reply to: [I Order Terms] Wrong term orderHi Nadia,
This is intended behaviour. If you drop a term in between child terms it will become child term itself.
To position term bellow “Cat 2” from your example you would need to put it below all children/subcategories.I do realize this can be problematic in certain situations, and I did give this a lot of thought while building, but until I find some free time and develop dragging on the x-axis (so you could actually choose whether you want it to become child or not) it will have to stay the way it is right now.
Forum: Plugins
In reply to: [I Order Terms] Would be great to work for posts and pages also!I’m glad you like my plugin. 🙂
I don’t think I will have time for such endeavours, but I like the idea so I will write it down in my todo list.
Forum: Plugins
In reply to: [I Order Terms] use with get_the_termsThanks for sharing your code.
For anyone needing this functionality:
My way will sort terms for every call to get_the_terms function, even from plugins and WordPress code so it could be useful in some situations, but on the other hand it will add unnecessary overhead. So I would recommend that you first try c00kiemon5ter’s function.Forum: Plugins
In reply to: [I Order Terms] use with get_the_termsI’m afraid you can’t use defined order with that function as it does not support specifying order.
You can add this sort function which uses sort order from my plugin to your functions.php file:
function get_the_terms_sort( $terms, $post_id, $taxonomy ) { function cmp_by_custom_order( $a, $b ) { return $a->custom_order - $b->custom_order; } usort( $terms, 'cmp_by_custom_order' ); return $terms; } add_filter( 'get_the_terms', 'get_the_terms_sort', 10, 3 );Forum: Plugins
In reply to: [I Order Terms] Warning in debug modePlugin is updated, warning should not appear again.
Forum: Plugins
In reply to: [I Order Terms] Warning in debug modeThis warning is caused when plugin tries to redirect after successful save, but it appears that some HTML is already sent to browser. I’m guessing that your environment is setup somewhat differently because I’m developing this plugin under debug mode and haven’t experienced any errors/warnings.
Anyway, I realize now that I should have used WordPress Settings API so I will rewrite plugin settings page and upload new version in a day or two.
Thank you for reporting this bug.