Commit Graph

168 Commits

Author SHA1 Message Date
James Kemp b2bf294e03 Min/Max Modifications
CAST min/max as decimal. Otherwise, a max of 59.99 will return 59 instead of 60 - so the product will be missed when using the filter.

Added filter on post_type so I can add product_variation for compatibility with one of my plugins.
2016-09-15 12:05:59 +01:00
Aristeides Stathopoulos 9668247b95 WordPress.PHP.YodaConditions.NotYoda 2016-09-09 03:14:28 +03:00
Aristeides Stathopoulos d4e3faf014 PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket 2016-09-02 04:51:31 +03:00
Aristeides Stathopoulos 0516e96843 PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket 2016-09-02 04:33:57 +03:00
Aristeides Stathopoulos c823236098 Fix failing tests. 2016-09-02 00:33:36 +03:00
Aristeides Stathopoulos fde1037757 fix failing tests. 2016-09-01 23:50:14 +03:00
Mike Jolley 402d0ff077 Merge branch 'master' into pr/11797
# Conflicts:
#	includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php
#	includes/api/class-wc-rest-coupons-controller.php
#	includes/class-wc-coupon.php
#	tests/unit-tests/api/coupons.php
#	tests/unit-tests/coupon/crud.php
2016-09-01 11:43:31 +01:00
Caleb Burks 417d707996 Cast as decimal when querying prices 2016-08-27 01:03:06 -05:00
Aristeides Stathopoulos f2730eea02 WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd 2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos b063bcfe4c last item in a multiline-array should end in a comma 2016-08-27 04:46:45 +03:00
Caleb Burks 306e1dfa39 Sort “Recently Viewed” products by the view order
orderby ‘post__in’, and reverse the array so the most recently viewed product shows up on top.
2016-08-24 17:46:23 -05:00
Claudio Sanches b3c0bee7fc Sort by top rated widget with meta
ref #11711

cc @mikejolley
2016-08-19 19:57:42 -03:00
Mike Jolley 644cf79866 Move all query string vars to form in price widget using wc_query_string_form_fields
Closes #11593

@claudiosmweb @justinshreve look fine to you?
2016-08-04 13:37:39 +01:00
Claudio Sanches e0bfe9f9fa Merge pull request #11168 from zakalwe2016/master
Add Filters For Product Lists in Widgets
2016-07-27 12:15:20 -03:00
Mike Jolley 84e883657c Merge pull request #11412 from jlad26/master
Fix layered nav links on product attribute archives
2016-07-19 15:20:47 +02:00
Mike Jolley d79f21a501 Better search handling 2016-07-19 14:09:56 +01:00
Leon Francis Shelhamer a9e7c67230 fix search results layered nav counts issue 2016-07-13 21:44:00 -04:00
jlad26 ce0485a97c Fix layered nav links on product attribute archives
If the option 'Enable archives' is selected for a product attribute, then the layered nav widget can also be used to filter that archive.
However the widget then doesn't work correctly in 'List' and 'OR' mode for that archive (although it works fine on the main shop page).

Example:
The attribute "product-type" is created and archives are enabled. It has values like "Courses", "One-to-one-tuition", "Equipment rental" and so on. Another product attribute "teaching-level" is created which uses values of "Beginner", "Intermediate" and "Advanced".
When the archive http://www.domain.com/pa_product-type/courses/ is visited the correct products are displayed. A layered nav widget is added in 'List' and 'OR' mode for the attribute 'teaching-level'. Clicking on any of "Beginner", "Intermediate" and "Advanced" will work fine the first time as the links are correctly generated in the form http://www.domain.com/pa_product-type/courses/?filter_teaching-level=advanced&query_type_teaching-level=or. (Advanced used for the example). However once one has been clicked, the links generated are now incorrect - they are in the form http://www.domain.com/?taxonomy=pa_teaching-level&term=advanced&filter_teaching-level=advanced%2Cbeginner&query_type_teaching-level=or.

Using get_queried_object instead of get_query_var fixes the problem.
2016-07-12 11:46:16 +01:00
Claudio Sanches 7d9d091767 Fixed mixed tabs and spaces 2016-07-11 16:56:35 +02:00
zakalwe2016 40675d3c5f Add filter for product list 2016-06-17 13:23:42 +01:00
zakalwe2016 538e791165 Add filter for product list 2016-06-17 13:23:02 +01:00
Mike Jolley cb13f11c14 Allow entire count query to be filtered
Closes #11145
2016-06-16 12:36:18 +01:00
Mike Jolley c8f55cfb8d Layered nav counts when term_id does not match term_taxonomy_id (before splitting).
@claudiosmweb this was a massive pita to fix
2016-06-15 19:20:50 +01:00
Mike Jolley 5ff18ebb12 Layered nav dropdowns - When getting counts, use 'or' to exclude self. We don't need 'and' because dropdown fields can only choose 1 option anyway.
#11123
2016-06-15 00:09:32 +01:00
Mike Jolley 1ff00adcf6 Spacing 2016-06-14 11:02:23 +01:00
Serg 60a4da9660 Fix Layered navigation permalinks issue on category page 2016-06-14 12:35:52 +03:00
Claudio Sanches 21ffc13ab3 Added $count and $term in woocommerce_layered_nav_count filter 2016-06-08 12:55:20 -03:00
Mike Jolley aa9e6542e3 woocommerce_layered_nav_count filter
Closes #11070
2016-06-08 16:29:27 +01:00
Mike Jolley 1dcf6c6058 Fix numeric sort in layered nav
Fixes #11069
2016-06-08 14:39:24 +01:00
Mike Jolley 730019ef18 scrutinizer best practice 2016-06-06 19:39:23 +01:00
Mike Jolley d4d6f3181c Best practice tweaks 2016-06-06 17:24:31 +01:00
Claudio Sanches e39274e753 HTTPS for everybody 2016-05-26 22:48:49 -03:00
Claudio Sanches 9934e512ed Fixed missing docblock 2016-05-20 17:53:18 -03:00
Claudio Sanches 11cea999c1 Added custom titles for products tags items, closes #10958 2016-05-20 17:50:56 -03:00
Mike Jolley 020b8c92c6 Fix URLs with quot; characters
Fixes #10795
2016-04-27 15:24:10 +01:00
Fredrik Forsmo 398ab8a016 Add `public` keyword to public various methods 2016-04-26 19:26:56 +02:00
Mike Jolley df75080858 woocommerce_product_categories_widget_product_terms_args filter
Closes #10555
2016-03-14 15:52:04 +00:00
Mike Jolley 8345f67f6c Tweak price filter + code comments
#10371
2016-02-22 13:23:25 +00:00
Mike Jolley bc83a04c6c Feedback from Justin 2016-02-11 11:13:48 +00:00
Mike Jolley 4ccc1617d5 Absint rating in filters widget 2016-02-10 11:43:35 +00:00
Mike Jolley 39fc5a98ae Fix base URL 2016-02-10 11:16:49 +00:00
Mike Jolley 0197b78b38 Combine all count queries per widget 2016-02-10 11:07:42 +00:00
Mike Jolley bf87d292fe Combine queries 2016-02-10 10:36:06 +00:00
Mike Jolley 0dba78acc0 Remove use of global 2016-02-10 10:19:32 +00:00
Mike Jolley 6bdd12d960 Rating counts 2016-02-10 10:02:50 +00:00
Mike Jolley 5f98720206 Combine count 2016-02-10 00:07:07 +00:00
Mike Jolley 2642454fee > is faster 2016-02-10 00:04:01 +00:00
Mike Jolley 8b922cc710 Cast is faster 2016-02-10 00:01:55 +00:00
Mike Jolley c9cae8b214 No need to include children 2016-02-09 23:11:50 +00:00
Mike Jolley d23c316326 Refactor queries to use WP_QUERY only 2016-02-09 21:14:55 +00:00