Commit Graph

146 Commits

Author SHA1 Message Date
Dan - Lucian Ștefancu 9176861959 Result count for languages with multiple plurals
There are languages with two or more plural forms.

For example in Romanian plural forms can be defined like this:
`Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2);`

 `_n()` and `_nx()` can handle all those special cases for results count texts.

This fix will not add any extra strings in the i18n package, just allows for better translations.
2016-02-16 21:37:18 +02:00
Mike Jolley bd4c90dbec Docblocks
Fixes #10336
2016-02-12 11:28:44 +00:00
Mike Jolley e49c288e8f [2.5] false to add_args
Fixes #10231
2016-02-01 12:19:11 +00:00
Mike Jolley 1093d2f64c Check passed in variables are set
#9983
2016-01-06 11:52:18 +00:00
Mike Jolley 948a8f5c47 Filters for loop add to cart
Closes #9753
2015-12-04 11:50:37 +00:00
mitogh 4d86d8a6ad Add strict comparission on another templates 2015-11-14 20:35:00 -06:00
Claudio Sanches 5893875b0c Removed period for file headers 2015-11-03 11:53:50 -02:00
Claudio Sanches ee30b5b308 Fixed php docs standards 2015-11-03 11:31:20 -02:00
Mike Jolley aec0e0e327 supports() method which mirrors gateways
Closes #9471
2015-11-02 11:23:50 +00:00
Kathy Darling 856d192bff Use generic `ajax_add_to_cart` class for adding items in the loop to the cart via ajax. 2015-10-30 12:54:49 -05:00
Caleb Burks ee2757c08f Specific template override paths 2015-10-03 02:58:08 -05:00
James Koster 2c00927c0b Remove the product loop title template
Provides consistency with the product category template. This template
was really too simple to require it’s own file. It can be plugged or
unhooked to edit.
2015-10-01 17:58:33 +01:00
James Koster fe689d3d24 Let's not create template files for such simple code. #8575
Also removes pluggability of code that simply shouldn’t have any need
to be overwritten.
2015-10-01 15:20:05 +01:00
Mike Jolley de4a80f950 Add disclaimer to template files
Closes #8942
2015-10-01 16:07:35 +02:00
James Koster 02ddb7fc4d product archive anchors are now hooked into templates rather than hard coded. #8575 2015-10-01 14:49:40 +01:00
Claudio Sanches f0b3d2fd9b Code tweaks for #8620 2015-07-20 14:36:12 -03:00
Jodi Warren 2d63d4fc94 fix version number 2015-07-20 18:12:41 +01:00
Jodi Warren 2fb5f5bf78 Change product title to a hooked function. Fixes #8601 2015-07-20 18:10:56 +01:00
Mike Jolley 7f2a6b5e41 Fix pagination by preventing old query args from being re-added to the link
Fixes #7164
2015-01-20 09:43:56 +00:00
splashingpixels 08703842ee fixes the encoding issue with pagination on default permalinks setting closes #7011 2015-01-01 14:15:47 -08:00
Mike Jolley 1c51ff6ec4 get_pagenum_link is wrapped in an escape
Closes #6407
2014-10-03 16:54:56 +01:00
shivapoudel fbf0314bb6 Absolute path should have curly braces - part 1 2014-09-22 22:16:03 +05:45
Mike Jolley 22788e505d Encoding of pagination link when using default permalinks.
Fixes #6220
2014-09-11 15:00:44 +01:00
Geert De Deckere 24d588544b Removed unused global $woocommerce variable from the templates
The WC() function is to be used since v2.1
2014-08-17 22:29:51 +02:00
Mike Jolley b72d33f563 Move orderby logic out of template file
cc @jameskoster @claudiosmweb
2014-07-30 17:23:28 +01:00
Mike Jolley cab8f8c9dd Only show default ordering option when relevant
Closes #5893
2014-07-30 17:23:28 +01:00
Mike Jolley 39469b89d7 Fix pagination when add-to-cart is in the URL
Fixes #5857
2014-07-30 10:35:52 +01:00
Nicola Mustone 9d2b70942d Using &ndash; for compatibility 2014-06-13 15:36:36 +02:00
Nicola Mustone abd7b2a989 Wrong non ASCII content
Issue with PoEdit translating content on line 32 due to non-ASCII content.
2014-06-13 12:47:51 +02:00
Mike Jolley b04ca15952 Only add add_to_cart_button if purchasable and in stock
Fixes #5132
2014-06-03 14:35:42 +01:00
Mike Jolley 5e769e65e7 Merge pull request #4996 from robdvr/master
Ability to add custom quantity using shortcode
2014-05-22 10:16:20 +01:00
splashingpixels 1e998f776e template coding standard fixes 2014-04-07 19:29:39 -07:00
splashingpixels bbde465924 orderby - skip adding hidden input of submit on a GET so JS can submit properly fixes #5221 2014-03-27 09:37:56 -07:00
Rob Davarnia e3116a4a2b Update add-to-cart.php 2014-02-28 15:42:14 -08:00
Rob Davarnia e7ca60b2a2 Ability to add custom quantity using shortcode 2014-02-28 13:43:31 -08:00
splashingpixels 454b97080a coding standards fixes 2014-01-22 20:36:24 -08:00
splashingpixels b16d5195c8 coding standards fixes 2014-01-14 21:53:37 -08:00
justinstern e96a6ae3f3 Fix Non-Purchasable Simple Product in Product Loop
add_to_cart_button class is only applied if the product is purchasable
2014-01-09 21:38:05 -05:00
Mike Jolley 1f7c249429 Grammar of no products found message Closes #4217 2013-11-27 15:14:47 +00:00
Mike Jolley b774e84e29 Revert "Replaced templates functions"
This reverts commit 4ce301a080.
2013-11-25 14:16:26 +00:00
Mike Jolley 4ce301a080 Replaced templates functions 2013-11-25 14:01:37 +00:00
Mike Jolley ef49977905 add_to_cart_url add_to_cart_text and single_add_to_cart_text class methods allowing greater control with custom classes.
Closes #3484 and Closes #3143. Pinging @thenbrent as the handler was
originally his idea and I've killed it.

@helgatheviking In 2.1, add to cart URLs will only be used in loops, so
conditonal logic should no longer be neccessary. Single templates post
to themselves without the need for the URL.
2013-09-25 12:35:06 +01:00
ninnypants bae61b8e1a Fix result count display when posts_per_page is set to -1
When your posts_per_page is set to -1 the display is output as `Showing 1–-1 of 15 results` when displaying all items when it would be better to show `Showing all 15 results`
2013-08-06 16:06:18 -06:00
Joris van der Wel a028cbe1be Fix for issue 2736.
Arrays in query strings are now preserved. For example ?cat[]=5&cat[]=10&cat[]=20
2013-03-16 16:05:11 +01:00
Brent Shepherd 4edd972644 Use handler for add-to-cart button text also
Related to SHA: bd78ca6
2013-03-01 14:52:04 +10:00
James Koster 90d7e20d6e no products found class
left loop-shop as it's deprecated
2013-02-16 19:41:23 +00:00
Mike Jolley 18ab00d10d escape for #2441 2013-02-14 16:50:45 +00:00
yitzchak 2086c66d22 Update templates/loop/add-to-cart.php
Added data-product_sku attribute to allow SKU tracking in analytics from shop loop.
2013-02-13 14:29:33 -05:00
Mike Jolley 30e6beb861 Fix buttons and externals. Closes #2437. 2013-02-13 09:29:00 +00:00
Mike Jolley be254db6f9 no products found 2013-02-10 23:01:09 +00:00
Mike Jolley 55d2237d9f Rename sorting template 2013-02-10 17:32:45 +00:00
James Koster 0fdf9032ec Revert "loop ratings an option"
This reverts commit a23fde9491.
2013-01-12 15:55:52 +00:00
Mike Jolley 813f8b8c2e Merge pull request #2221 from GeertDD/sorting-optimization
Small optimization for showing the sorting selection
2013-01-12 07:21:07 -08:00
Mike Jolley b0d22c079b Merge pull request #2220 from GeertDD/sorting
Simplified code for keeping query string vars intact
2013-01-12 07:20:53 -08:00
Geert De Deckere 74b3f4d032 Small optimization for showing the sorting selection 2013-01-12 16:12:17 +01:00
Geert De Deckere 601ca30600 Simplified code for keeping query string vars intact 2013-01-12 16:08:23 +01:00
James Koster a23fde9491 loop ratings an option 2013-01-12 14:24:22 +00:00
Mike Jolley 624e8fb59a maintain vars when sorting 2013-01-12 12:24:24 +00:00
Mike Jolley 261f413405 Ratings in loops for sort by rating 2013-01-12 10:53:24 +00:00
Mike Jolley 0caca2d401 GET vars for sorting (to work better with cache) 2013-01-12 10:53:08 +00:00
Coen Jacobs f9a0eddbbf found_posts always contains total queried posts. Closes #2136
So no need to check for post_count or is_paged() function.
2013-01-10 12:07:00 +01:00
Mike Jolley 75e1d6a665 sorting is_paged #2136 2013-01-07 16:02:07 +00:00
Mike Jolley e48e280c7a post count check #2136 2013-01-07 14:17:41 +00:00
James Koster 5302eb019f css class name consistency #2086 2013-01-03 11:40:10 +00:00
Justin Stern 1bd820369c Loop 'add to cart' link customizable
added apply_filters to loop 'add to cart' link/button
2012-12-31 17:13:19 -05:00
Geert De Deckere a0b8ee16c5 Improved the result-count template
- Coding style: mid-line indenting which should be done using spaces.
- Renamed `$max` to `$total`.
- Simplified calculation of `$last`.
- Using en dash between range of values: http://en.wikipedia.org/wiki/Dash#Ranges_of_values.
- Tweaks to the “Showing 1–10 of 12 results” result text:
  - Converted `%s` to `%d`.
  - Used numbered placeholders (like `%1$d` and `%2$d`) which allows for more flexible translations since the placeholders can be swapped and repeated now.
  - Used `_x()` with comment to clarify placeholder order.
- Added two additional texts:
  - One for showing the only single result because “Showing 1–1 of 1 results” is overly verbose.
  - One for when all results are shown on the same page because “Showing 1–8 of 8 results” is a bit too verbose too.
2012-12-25 10:17:15 +01:00
Coen Jacobs 37feabd87f WooCommerce 2.0 is coming! 2012-12-03 20:19:58 +01:00
Mike Jolley b1ec4b289a Nuked whitespace. Closes #1846. 2012-11-27 16:22:47 +00:00
Mike Jolley 75ca794bba Separate classes per product type, with new get_product function and hooks to change the classes which get loaded. #1497 2012-11-21 18:07:45 +00:00
Coen Jacobs 80fc5fc086 [3.2.3] Templates XSS #1575 2012-10-16 17:35:16 +02:00
Mike Jolley 8c3ad31c07 Localisation spacing. 2012-10-16 10:45:33 +01:00
Coen Jacobs 943091d2ca [3.1.4] Prevent direct access to files #1575 2012-10-15 12:57:58 +02:00
Mike Jolley 596c408c27 Pagination + sorting tweaks, new active filters widget, sort both directions for price, fix for #coenfail. Closes #771. 2012-10-14 13:06:41 +01:00
Mike Jolley 2a30cfda0e loop start and end. Closes #1356. 2012-09-30 14:41:07 +01:00
Mike Jolley fdd34e5c0e session -> transient WIP 2012-09-07 18:26:13 +01:00
Mike Jolley ef7ec98f2e templates 2012-08-14 23:43:54 +01:00
Mike Jolley 7c69f3a431 Fix - Missing grouped product cart buttons 2012-08-11 16:41:28 +01:00
kathy f2415b3761 switch get_price() checks to is_purchasable() for displaying Add to Cart button 2012-08-06 19:27:24 -05:00
Mike Jolley cedcca7fe7 is_purchasable. Closes #1331. 2012-08-07 00:33:52 +01:00
Mike Jolley a322a83a7d analytics tracking 2012-07-30 16:01:33 +01:00
Mike Jolley 183a3e096d Hooks. Closes #1224. 2012-07-10 15:39:54 +01:00
Mike Jolley 7bcb3deb62 small markup tweaks 2012-05-26 15:18:44 +01:00
Mike Jolley 2cac2f9d68 Drag and drop ordering for products. Closes #95. Closes #995. 2012-05-08 20:30:18 +01:00
Mike Jolley 6f17cd4d4e nofollow cart buttons 2012-04-11 21:21:40 +01:00
Mike Jolley e19f46c79d Add new terms + printf vs echo sprintf Closes #138. 2012-04-09 00:57:38 +01:00
Mike Jolley 316ed9901a use product id in loop instead of $post global 2012-02-17 21:08:56 +00:00
Mike Jolley 00b3266765 Dumped Get 2012-02-15 20:27:40 +00:00
Mike Jolley 576ec9e42d Front page look fixes 2012-02-10 22:15:29 +00:00
Mike Jolley 35fadb00fe More consistent template file naming, broken checkout into templates 2012-01-29 13:36:33 +00:00
Mike Jolley 48d1fac0d4 Support GET for ordering. Closes #269. 2012-01-07 17:36:32 +00:00
Mike Jolley f74e041a30 Renamed textdomain Closes #444. 2012-01-05 11:31:22 +00:00
Mike Jolley 3cfe43a80e Templates 2011-12-12 11:35:54 +00:00
Mike Jolley f211aac406 More templates 2011-12-11 23:16:34 +00:00
Mike Jolley 35d1d56329 Made product global, setup automatically, and removed the need to call the class directly in the loop
Themes need checking for compat, but the change makes it easier to use
2011-12-11 14:40:25 +00:00
Mike Jolley 58572bf97e Sorting 2011-12-11 01:10:24 +00:00
Mike Jolley d4452dcb18 Template files 2011-12-11 01:08:33 +00:00