WooCommerce Product Archive Customiser - Version 0.1

Version Description

Initial release.

Download this release

Release Info

Developer jameskoster
Plugin Icon wp plugin WooCommerce Product Archive Customiser
Version 0.1
Comparing to
See all releases

Version 0.1

README.md ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ WooCommerce Product Archive Customiser
2
+ ======================================
3
+
4
+ Allows you to customise WooCommerce product archives. Change the number of product columns and the number of products displayed per page. Toggle the display of core elements and enable some that are not included in WooCommerce core such as stock levels and product categories.
archive-customiser.php ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: WooCommerce Product Archive Customiser
4
+ Plugin URI: http://jameskoster.co.uk/tag/product-archive-customiser/
5
+ Version: 0.1
6
+ Description: Allows you to customise WooCommerce product archives. Change the number of product columns and the number of products displayed per page. Toggle the display of core elements and enable some that are not included in WooCommerce core such as stock levels and product categories.
7
+ Author: jameskoster
8
+ Tested up to: 3.6
9
+ Author URI: http://jameskoster.co.uk
10
+ Text Domain: woocommerce-product-archive-customiser
11
+ Domain Path: /languages/
12
+
13
+ License: GNU General Public License v3.0
14
+ License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
+ */
16
+
17
+ /**
18
+ * Check if WooCommerce is active
19
+ **/
20
+ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
21
+
22
+ /**
23
+ * Localisation
24
+ **/
25
+ load_plugin_textdomain( 'woocommerce-product-archive-customiser', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
26
+
27
+ /**
28
+ * PAC class
29
+ **/
30
+ if ( ! class_exists( 'WC_pac' ) ) {
31
+
32
+ class WC_pac {
33
+
34
+ public function __construct() {
35
+ add_action( 'wp_enqueue_scripts', array( &$this, 'wc_pac_styles' ) );
36
+
37
+ // Init settings
38
+ $this->settings = array(
39
+ array(
40
+ 'name' => __( 'Product Archives', 'woocommerce-product-archive-customiser' ),
41
+ 'desc' => __( 'Toggle the display of various components on product archives and change product layout.', 'woocommerce-product-archive-customiser' ),
42
+ 'type' => 'title',
43
+ 'id' => 'wc_pac_options'
44
+ ),
45
+ array(
46
+ 'title' => __( 'Product Columns', 'woocommerce-product-archive-customiser' ),
47
+ 'desc' => __( 'The number of columns that products are arranged in to on archives', 'woocommerce-product-archive-customiser' ),
48
+ 'id' => 'wc_pac_columns',
49
+ 'default' => '4',
50
+ 'type' => 'select',
51
+ 'options' => array(
52
+ '2' => __( '2', 'woocommerce-product-archive-customiser' ),
53
+ '3' => __( '3', 'woocommerce-product-archive-customiser' ),
54
+ '4' => __( '4', 'woocommerce-product-archive-customiser' ),
55
+ '5' => __( '5', 'woocommerce-product-archive-customiser' )
56
+ )
57
+ ),
58
+ array(
59
+ 'title' => __( 'Products per page', 'woocommerce-product-archive-customiser' ),
60
+ 'desc' => __( 'The number of products displayed per page', 'woocommerce-product-archive-customiser' ),
61
+ 'id' => 'wc_pac_products_per_page',
62
+ 'default' => '10',
63
+ 'type' => 'number',
64
+ ),
65
+ array(
66
+ 'name' => __( 'Display', 'woocommerce-product-archive-customiser' ),
67
+ 'desc' => __( 'Product Count', 'woocommerce-product-archive-customiser' ),
68
+ 'id' => 'wc_pac_product_count',
69
+ 'type' => 'checkbox',
70
+ 'default' => 'yes'
71
+ ),
72
+ array(
73
+ 'desc' => __( 'Product Sorting', 'woocommerce-product-archive-customiser' ),
74
+ 'id' => 'wc_pac_product_sorting',
75
+ 'type' => 'checkbox',
76
+ 'default' => 'yes'
77
+ ),
78
+ array(
79
+ 'desc' => __( 'Sale Flashes', 'woocommerce-product-archive-customiser' ),
80
+ 'id' => 'wc_pac_sale_flash',
81
+ 'type' => 'checkbox',
82
+ 'default' => 'yes'
83
+ ),
84
+ array(
85
+ 'desc' => __( 'Add to cart buttons', 'woocommerce-product-archive-customiser' ),
86
+ 'id' => 'wc_pac_add_to_cart',
87
+ 'type' => 'checkbox',
88
+ 'default' => 'yes'
89
+ ),
90
+ array(
91
+ 'desc' => __( 'Thumbnails', 'woocommerce-product-archive-customiser' ),
92
+ 'id' => 'wc_pac_thumbnail',
93
+ 'type' => 'checkbox',
94
+ 'default' => 'yes'
95
+ ),
96
+ array(
97
+ 'desc' => __( 'Prices', 'woocommerce-product-archive-customiser' ),
98
+ 'id' => 'wc_pac_price',
99
+ 'type' => 'checkbox',
100
+ 'default' => 'yes'
101
+ ),
102
+ array(
103
+ 'desc' => __( 'Ratings', 'woocommerce-product-archive-customiser' ),
104
+ 'id' => 'wc_pac_rating',
105
+ 'type' => 'checkbox',
106
+ 'default' => 'yes'
107
+ ),
108
+ array(
109
+ 'desc' => __( 'Product categories', 'woocommerce-product-archive-customiser' ),
110
+ 'id' => 'wc_pac_categories',
111
+ 'type' => 'checkbox',
112
+ 'default' => 'no'
113
+ ),
114
+ array(
115
+ 'desc' => __( 'Stock', 'woocommerce-product-archive-customiser' ),
116
+ 'id' => 'wc_pac_stock',
117
+ 'type' => 'checkbox',
118
+ 'default' => 'no'
119
+ ),
120
+ array(
121
+ 'desc' => __( '"New" badges', 'woocommerce-product-archive-customiser' ),
122
+ 'id' => 'wc_pac_new_badge',
123
+ 'type' => 'checkbox',
124
+ 'default' => 'no'
125
+ ),
126
+ array(
127
+ 'desc' => __( 'Display the "New" badge for how many days?', 'woocommerce-product-archive-customiser' ),
128
+ 'id' => 'wc_pac_newness',
129
+ 'type' => 'number',
130
+ 'default' => '30'
131
+ ),
132
+ array( 'type' => 'sectionend', 'id' => 'wc_pac_options' ),
133
+ );
134
+
135
+
136
+ // Default options
137
+ add_option( 'wc_pac_columns', '4' );
138
+ add_option( 'wc_pac_products_per_page', '10' );
139
+ add_option( 'wc_pac_product_count', 'yes' );
140
+ add_option( 'wc_pac_product_sorting', 'yes' );
141
+ add_option( 'wc_pac_sale_flash', 'yes' );
142
+ add_option( 'wc_pac_add_to_cart', 'yes' );
143
+ add_option( 'wc_pac_thumbnail', 'yes' );
144
+ add_option( 'wc_pac_price', 'yes' );
145
+ add_option( 'wc_pac_rating', 'yes' );
146
+ add_option( 'wc_pac_new_badge', 'no' );
147
+ add_option( 'wc_pac_categories', 'no' );
148
+ add_option( 'wc_pac_stock', 'no' );
149
+ add_option( 'wc_pac_newness', '30' );
150
+
151
+
152
+ // Admin
153
+ add_action( 'woocommerce_settings_catalog_options_after', array( &$this, 'admin_settings' ), 20);
154
+ add_action( 'woocommerce_update_options_catalog', array( &$this, 'save_admin_settings' ) );
155
+ add_action( 'admin_enqueue_scripts', array( &$this, 'wc_pac_admin_scripts' ) );
156
+ add_action( 'init', array( &$this, 'wc_pac_fire_customisations' ) );
157
+ add_action( 'wp', array( &$this, 'wc_pac_columns' ) ); // This doesn't work when hooked into init :(
158
+
159
+ }
160
+
161
+
162
+ /*-----------------------------------------------------------------------------------*/
163
+ /* Class Functions */
164
+ /*-----------------------------------------------------------------------------------*/
165
+
166
+ // Load the settings
167
+ function admin_settings() {
168
+ woocommerce_admin_fields( $this->settings );
169
+ }
170
+
171
+
172
+ // Save the settings
173
+ function save_admin_settings() {
174
+ woocommerce_update_options( $this->settings );
175
+ }
176
+
177
+ // Admin scripts
178
+ function wc_pac_admin_scripts() {
179
+ $screen = get_current_screen();
180
+ $wc_screen_id = strtolower( __( 'WooCommerce', 'woocommerce' ) );
181
+
182
+ // WooCommerce admin pages
183
+ if ( in_array( $screen->id, apply_filters( 'woocommerce_screen_ids', array( 'toplevel_page_' . $wc_screen_id, $wc_screen_id . '_page_woocommerce_settings' ) ) ) ) {
184
+
185
+ wp_enqueue_script( 'wc-pac-script', plugins_url( '/assets/js/script.min.js', __FILE__ ) );
186
+
187
+ }
188
+ }
189
+
190
+ // Setup styles
191
+ function wc_pac_styles() {
192
+ wp_enqueue_style( 'pac-styles', plugins_url( '/assets/css/pac.css', __FILE__ ) );
193
+ wp_enqueue_style( 'pac-layout-styles', plugins_url( '/assets/css/layout.css', __FILE__ ) );
194
+ }
195
+
196
+ // Fire customisations!
197
+ function wc_pac_fire_customisations() {
198
+
199
+ // Products per page
200
+ add_filter( 'loop_shop_per_page', array( &$this, 'woocommerce_pac_products_per_page' ), 20 );
201
+
202
+ // Sale flash
203
+ if ( get_option( 'wc_pac_sale_flash' ) == 'no' ) {
204
+ remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );
205
+ }
206
+
207
+ // Result Count
208
+ if ( get_option( 'wc_pac_product_count' ) == 'no' ) {
209
+ remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
210
+ }
211
+
212
+ // Product Ordering
213
+ if ( get_option( 'wc_pac_product_sorting' ) == 'no' ) {
214
+ remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
215
+ }
216
+
217
+ // Add to cart button
218
+ if ( get_option( 'wc_pac_add_to_cart' ) == 'no' ) {
219
+ remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
220
+ }
221
+
222
+ // Thumbnail
223
+ if ( get_option( 'wc_pac_thumbnail' ) == 'no' ) {
224
+ remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
225
+ }
226
+
227
+ // Price
228
+ if ( get_option( 'wc_pac_price' ) == 'no' ) {
229
+ remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
230
+ }
231
+
232
+ // Rating
233
+ if ( get_option( 'wc_pac_price' ) == 'no' ) {
234
+ remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
235
+ }
236
+
237
+ // New Badge
238
+ if ( get_option( 'wc_pac_new_badge' ) == 'yes' ) {
239
+ add_action( 'woocommerce_before_shop_loop_item_title', array( &$this, 'woocommerce_pac_show_product_loop_new_badge' ), 30 );
240
+ }
241
+
242
+ // Stock
243
+ if ( get_option( 'wc_pac_stock' ) == 'yes' ) {
244
+ add_action( 'woocommerce_after_shop_loop_item', array( &$this, 'woocommerce_pac_show_product_stock' ), 30 );
245
+ }
246
+
247
+ // Categories
248
+ if ( get_option( 'wc_pac_categories' ) == 'yes' ) {
249
+ add_action( 'woocommerce_after_shop_loop_item', array( &$this, 'woocommerce_pac_show_product_categories' ), 30 );
250
+ }
251
+ }
252
+
253
+ // Product columns
254
+ function wc_pac_columns() {
255
+ // Product columns
256
+ if ( is_post_type_archive( 'product' ) ) {
257
+ add_filter( 'body_class', array( &$this, 'woocommerce_pac_columns' ) );
258
+ add_filter( 'loop_shop_columns', array( &$this, 'woocommerce_pac_products_row' ) );
259
+ }
260
+ }
261
+
262
+
263
+ /*-----------------------------------------------------------------------------------*/
264
+ /* Frontend Functions */
265
+ /*-----------------------------------------------------------------------------------*/
266
+
267
+ // Products per page
268
+ function woocommerce_pac_products_per_page() {
269
+ $per_page = get_option( 'wc_pac_products_per_page' );
270
+ return $per_page;
271
+ }
272
+
273
+ // Product columns
274
+ function woocommerce_pac_columns( $classes ) {
275
+ $columns = get_option( 'wc_pac_columns' );
276
+ $classes[] = 'product-columns-' . $columns;
277
+ return $classes;
278
+ }
279
+
280
+ function woocommerce_pac_products_row() {
281
+ $columns = get_option( 'wc_pac_columns' );
282
+ return $columns;
283
+ }
284
+
285
+ // Display the new badge
286
+ function woocommerce_pac_show_product_loop_new_badge() {
287
+ $postdate = get_the_time( 'Y-m-d' ); // Post date
288
+ $postdatestamp = strtotime( $postdate ); // Timestamped post date
289
+ $newness = get_option( 'wc_pac_newness' ); // Newness in days as defined by option
290
+
291
+ if ( ( time() - ( 60 * 60 * 24 * $newness ) ) < $postdatestamp ) { // If the product was published within the newness time frame display the new badge
292
+ echo '<p><span class="wc-new-badge">' . __( 'New', 'woocommerce-product-archive-customiser' ) . '</span></p>';
293
+ }
294
+ }
295
+
296
+ function woocommerce_pac_show_product_categories() {
297
+ global $post;
298
+ $terms_as_links = get_the_term_list( $post->ID, 'product_cat', '', ', ', '' );
299
+ echo '<p><small class="categories">' . $terms_as_links . '</small></p>';
300
+ }
301
+
302
+ function woocommerce_pac_show_product_stock() {
303
+ global $product;
304
+ $stock = $product->get_total_stock();
305
+ if ( ! $product->is_in_stock() ) {
306
+ echo '<p class="stock out-of-stock"><small>' . __( 'Out of stock', 'woothemes' ) . '</small></p>';
307
+ } elseif ( $stock > 1 ) {
308
+ echo '<p class="stock in-stock"><small>' . $stock . __( ' In stock', 'woothemes' ) . '</small></p>';
309
+ }
310
+ }
311
+ }
312
+
313
+ $WC_pac = new WC_pac();
314
+ }
315
+ }
assets/css/layout.css ADDED
@@ -0,0 +1 @@
 
1
+ .woocommerce.product-columns-2 ul.products li.product,.woocommerce-page.product-columns-2 ul.products li.product{width:48%}.woocommerce.product-columns-3 ul.products li.product,.woocommerce-page.product-columns-3 ul.products li.product{width:30.75%}.woocommerce.product-columns-5 ul.products li.product,.woocommerce-page.product-columns-5 ul.products li.product{width:16.9%}
assets/css/layout.less ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .woocommerce, .woocommerce-page {
2
+ &.product-columns-2 {
3
+ ul.products {
4
+ li.product {
5
+ width:48%;
6
+ }
7
+ }
8
+ }
9
+ &.product-columns-3 {
10
+ ul.products {
11
+ li.product {
12
+ width:30.75%;
13
+ }
14
+ }
15
+ }
16
+ &.product-columns-5 {
17
+ ul.products {
18
+ li.product {
19
+ width:16.9%;
20
+ }
21
+ }
22
+ }
23
+ }
assets/css/pac.css ADDED
@@ -0,0 +1 @@
 
1
+ ul.products li.product .wc-new-badge{font-size:.75em;text-transform:uppercase;color:white;background:#eb4649;padding:.2em .5em;display:inline-block;font-weight:700;border-radius:2px}ul.products li.product .stock{display:block;padding-top:.5em}ul.products li.product .stock.out-of-stock{color:#eb4649}ul.products li.product .stock.in-stock{color:#85ad74}ul.products li.product .categories{display:block;padding-top:.5em}
assets/css/pac.less ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ul.products {
2
+ li.product {
3
+ .wc-new-badge {
4
+ font-size:.75em;
5
+ text-transform: uppercase;
6
+ color: white;
7
+ background:#eb4649;
8
+ padding:.2em .5em;
9
+ display: inline-block;
10
+ font-weight: 700;
11
+ border-radius:2px;
12
+ }
13
+ .stock {
14
+ display: block;
15
+ padding-top:.5em;
16
+ &.out-of-stock {
17
+ color: #eb4649;
18
+ }
19
+ &.in-stock {
20
+ color: #85ad74;
21
+ }
22
+ }
23
+ .categories {
24
+ display: block;
25
+ padding-top:.5em;
26
+ }
27
+ }
28
+ }
assets/js/script.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+
3
+ jQuery( document ).ready( function( $ ) {
4
+ jQuery( 'input#wc_pac_new_badge' ).change( function() {
5
+ if ( jQuery( this ).is( ':checked' ) ) {
6
+ jQuery( 'input#wc_pac_new_badge' ).parents( ':eq(3)' ).next().show();
7
+ } else {
8
+ jQuery( 'input#wc_pac_new_badge' ).parents( ':eq(3)' ).next().hide();
9
+ }
10
+ }).change();
11
+ });
12
+
13
+ }(jQuery));
assets/js/script.min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(e){jQuery(document).ready(function(e){jQuery("input#wc_pac_new_badge").change(function(){jQuery(this).is(":checked")?jQuery("input#wc_pac_new_badge").parents(":eq(3)").next().show():jQuery("input#wc_pac_new_badge").parents(":eq(3)").next().hide()}).change()})})(jQuery);
languages/woocommerce-product-archive-customiser-en_GB.po ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WooCommerce Product Archive Customiser v0.1\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2013-05-17 20:19:44+0000\n"
7
+ "Last-Translator: admin <james@jameskoster.co.uk>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-Language: English\n"
14
+ "X-Poedit-Country: UNITED KINGDOM\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
17
+ "X-Poedit-Basepath: ../\n"
18
+ "X-Poedit-Bookmarks: \n"
19
+ "X-Poedit-SearchPath-0: .\n"
20
+ "X-Textdomain-Support: yes"
21
+
22
+ #. translators: plugin header field 'Name'
23
+ #: archive-customiser.php:0
24
+ #@ woocommerce-product-archive-customiser
25
+ msgid "WooCommerce Product Archive Customiser"
26
+ msgstr ""
27
+
28
+ #. translators: plugin header field 'PluginURI'
29
+ #: archive-customiser.php:0
30
+ #@ woocommerce-product-archive-customiser
31
+ msgid "http://jameskoster.co.uk/tag/product-archive-customiser/"
32
+ msgstr ""
33
+
34
+ #. translators: plugin header field 'Description'
35
+ #: archive-customiser.php:0
36
+ #@ woocommerce-product-archive-customiser
37
+ msgid "Allows you to customise WooCommerce product archives. Change the number of product columns and the number of products displayed per page. Toggle the display of core elements and enable some that are not included in WooCommerce core such as stock levels and product categories."
38
+ msgstr ""
39
+
40
+ #. translators: plugin header field 'Author'
41
+ #: archive-customiser.php:0
42
+ #@ woocommerce-product-archive-customiser
43
+ msgid "jameskoster"
44
+ msgstr ""
45
+
46
+ #. translators: plugin header field 'AuthorURI'
47
+ #: archive-customiser.php:0
48
+ #@ woocommerce-product-archive-customiser
49
+ msgid "http://jameskoster.co.uk"
50
+ msgstr ""
51
+
52
+ #. translators: plugin header field 'Version'
53
+ #: archive-customiser.php:0
54
+ #@ woocommerce-product-archive-customiser
55
+ msgid "0.1"
56
+ msgstr ""
57
+
58
+ #: archive-customiser.php:40
59
+ #@ woocommerce-product-archive-customiser
60
+ msgid "Product Archives"
61
+ msgstr ""
62
+
63
+ #: archive-customiser.php:41
64
+ #@ woocommerce-product-archive-customiser
65
+ msgid "Toggle the display of various components on product archives and change product layout."
66
+ msgstr ""
67
+
68
+ #: archive-customiser.php:46
69
+ #@ woocommerce-product-archive-customiser
70
+ msgid "Product Columns"
71
+ msgstr ""
72
+
73
+ #: archive-customiser.php:47
74
+ #@ woocommerce-product-archive-customiser
75
+ msgid "The number of columns that products are arranged in to on archives"
76
+ msgstr ""
77
+
78
+ #: archive-customiser.php:52
79
+ #@ woocommerce-product-archive-customiser
80
+ msgid "2"
81
+ msgstr ""
82
+
83
+ #: archive-customiser.php:53
84
+ #@ woocommerce-product-archive-customiser
85
+ msgid "3"
86
+ msgstr ""
87
+
88
+ #: archive-customiser.php:54
89
+ #@ woocommerce-product-archive-customiser
90
+ msgid "4"
91
+ msgstr ""
92
+
93
+ #: archive-customiser.php:55
94
+ #@ woocommerce-product-archive-customiser
95
+ msgid "5"
96
+ msgstr ""
97
+
98
+ #: archive-customiser.php:59
99
+ #@ woocommerce-product-archive-customiser
100
+ msgid "Products per page"
101
+ msgstr ""
102
+
103
+ #: archive-customiser.php:60
104
+ #@ woocommerce-product-archive-customiser
105
+ msgid "The number of products displayed per page"
106
+ msgstr ""
107
+
108
+ #: archive-customiser.php:66
109
+ #@ woocommerce-product-archive-customiser
110
+ msgid "Display"
111
+ msgstr ""
112
+
113
+ #: archive-customiser.php:67
114
+ #@ woocommerce-product-archive-customiser
115
+ msgid "Product Count"
116
+ msgstr ""
117
+
118
+ #: archive-customiser.php:73
119
+ #@ woocommerce-product-archive-customiser
120
+ msgid "Product Sorting"
121
+ msgstr ""
122
+
123
+ #: archive-customiser.php:79
124
+ #@ woocommerce-product-archive-customiser
125
+ msgid "Sale Flashes"
126
+ msgstr ""
127
+
128
+ #: archive-customiser.php:85
129
+ #@ woocommerce-product-archive-customiser
130
+ msgid "Add to cart buttons"
131
+ msgstr ""
132
+
133
+ #: archive-customiser.php:91
134
+ #@ woocommerce-product-archive-customiser
135
+ msgid "Thumbnails"
136
+ msgstr ""
137
+
138
+ #: archive-customiser.php:97
139
+ #@ woocommerce-product-archive-customiser
140
+ msgid "Prices"
141
+ msgstr ""
142
+
143
+ #: archive-customiser.php:103
144
+ #@ woocommerce-product-archive-customiser
145
+ msgid "Ratings"
146
+ msgstr ""
147
+
148
+ #: archive-customiser.php:109
149
+ #@ woocommerce-product-archive-customiser
150
+ msgid "Product categories"
151
+ msgstr ""
152
+
153
+ #: archive-customiser.php:115
154
+ #@ woocommerce-product-archive-customiser
155
+ msgid "Stock"
156
+ msgstr ""
157
+
158
+ #: archive-customiser.php:121
159
+ #@ woocommerce-product-archive-customiser
160
+ msgid "\"New\" badges"
161
+ msgstr ""
162
+
163
+ #: archive-customiser.php:127
164
+ #@ woocommerce-product-archive-customiser
165
+ msgid "Display the \"New\" badge for how many days?"
166
+ msgstr ""
167
+
168
+ #: archive-customiser.php:180
169
+ #@ woocommerce
170
+ msgid "WooCommerce"
171
+ msgstr ""
172
+
173
+ #: archive-customiser.php:292
174
+ #@ woocommerce-product-archive-customiser
175
+ msgid "New"
176
+ msgstr ""
177
+
178
+ #: archive-customiser.php:306
179
+ #@ woothemes
180
+ msgid "Out of stock"
181
+ msgstr ""
182
+
183
+ #: archive-customiser.php:308
184
+ #@ woothemes
185
+ msgid " In stock"
186
+ msgstr ""
187
+
readme.txt ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === WooCommerce Product Archive Customiser ===
2
+ Contributors: jameskoster
3
+ Tags: woocommerce, ecommerce, products
4
+ Requires at least: 3.5
5
+ Tested up to: 3.6
6
+ Stable tag: 0.1
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ Customise the appearnce of product archives in WooCommerce.
11
+
12
+ == Description ==
13
+
14
+ Allows you to customise WooCommerce product archives. Change the number of product columns and the number of products displayed per page. Toggle the display of core elements and enable some that are not included in WooCommerce core such as stock levels and product categories.
15
+
16
+ Please feel free to contribute on <a href="https://github.com/jameskoster/woocommerce-product-archive-customiser">github</a>.
17
+
18
+ == Installation ==
19
+
20
+ 1. Upload `woocommerce-product-archive-customiser` to the `/wp-content/plugins/` directory
21
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
22
+ 3. Configure the options on the Catalog tab of the WooCommerce settings screen.
23
+ 3. Done!
24
+
25
+ == Frequently Asked Questions ==
26
+
27
+ = One / Some of the options don't work. What gives? =
28
+
29
+ If your theme has been integrated with WooCommerce it is possibly already adding or removing some of the archive compontents. If so the plugin options may be overwritten by the theme regardless of the settings you choose.
30
+
31
+ = The categories / new badge / stock don't look very good. Help! =
32
+ It's possible you will need to add a little css to your theme / child theme to tidy up these elements.
33
+
34
+ = I want to style the "new" badge, stock notices and categories myself, how do I remove the default styles? =
35
+
36
+ There are only a couple of styles applied to these components. Although not best practise it's probably safe to just overwrite these with your own css. However, if you want to do it properly (and cut out a http request), add the following code to the functions.php file in your theme / child theme to dequeue the css:
37
+
38
+ `
39
+ add_action( 'wp_enqueue_scripts', 'remove_pac_styles', 30 );
40
+ function remove_pac_styles() {
41
+ wp_dequeue_style( 'pac-styles' );
42
+ }
43
+ `
44
+
45
+ == Screenshots ==
46
+
47
+ 1. The Product Archive Customiser Settings.
48
+ 2. An example product archive with everything enabled.
49
+
50
+ == Changelog ==
51
+
52
+ = 0.1 =
53
+ Initial release.