Perfect Brands for WooCommerce - Version 1.5

Version Description

  • Feature (Tool): Install dummy data (generate generic brands and assigns them to available products randomly)
  • Feature: Restrict coupon by brands
  • Feature: Get system status details for a better plugin support
  • Feature: Import brands from "Ultimate WooCommerce Brands"
  • Dev: 'pwb_before_single_product_brands' and 'pwb_after_single_product_brands' hooks added
  • Dev: Basic WordPress REST API support
  • Enhancement: Better HTML markup for the brand banner and the brand description for the archive product page
  • Enhancement: Brands importer improvements
  • Enhancement: New params for "pwb-all-brands" shortcode
  • Fix: The brand description is appearing twice
  • Fix: Product filter widget does not seems to work in product category page (thanks hassandad)
  • Fix: Support for php 5.3 again
  • Fix: Removed ES6 code from admin for better browser support
  • Other minor bug fixes and code improvements
Download this release

Release Info

Developer titodevera
Plugin Icon 128x128 Perfect Brands for WooCommerce
Version 1.5
Comparing to
See all releases

Code changes from version 1.4.5 to 1.5

assets/css/styles-admin.css CHANGED
@@ -45,6 +45,23 @@
45
  }
46
  /* ----------------------- /Taxonomy pwb-brand ----------------------- */
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  .pwb-display-as-logo{
49
  display: none;
50
  }
45
  }
46
  /* ----------------------- /Taxonomy pwb-brand ----------------------- */
47
 
48
+ /* ----------------------- Widgets page ----------------------- */
49
+ .widgets-php .widget[id*="_pwb_"] .widget-title{
50
+ border-left: 2px solid #cda000;
51
+ }
52
+ /* ----------------------- /Widgets page ----------------------- */
53
+
54
+ /* ----------------------- Settings page ----------------------- */
55
+ #wc_pwb_admin_status_result{
56
+ display: none;
57
+ background-color: #f6f6f6;
58
+ padding: 14px;
59
+ }
60
+ #wc_pwb_admin_tab_tools_system_status{
61
+ display: none!important;
62
+ }
63
+ /* ----------------------- /Settings page ----------------------- */
64
+
65
  .pwb-display-as-logo{
66
  display: none;
67
  }
assets/css/styles-frontend.css CHANGED
@@ -7,6 +7,12 @@
7
  /* ----------------------- /Global ----------------------- */
8
 
9
  /* ----------------------- PWB Carousel ----------------------- */
 
 
 
 
 
 
10
  .pwb-carousel .slick-loading .slick-list, .pwb-product-carousel .slick-loading .slick-list{
11
  background: #fff url('./ajax-loader.gif') center center no-repeat;
12
  }
@@ -107,9 +113,10 @@
107
  width: 20%;
108
  float: left;
109
  }
110
- .pwb-all-brands .pwb-brands-cols-outer .pwb-brands-col3 > div:first-child{
111
  height: 25px;
112
  overflow: hidden;
 
113
  }
114
  /* ----------------------- /PWB All Brands ----------------------- */
115
 
@@ -150,7 +157,7 @@
150
  width: 100%;
151
  float: none;
152
  }
153
- .pwb-all-brands .pwb-brands-cols-outer .pwb-brands-col3 > div:first-child{
154
  height: auto;
155
  }
156
  .pwb-columns-3, .pwb-columns-4{
7
  /* ----------------------- /Global ----------------------- */
8
 
9
  /* ----------------------- PWB Carousel ----------------------- */
10
+ .pwb-carousel .slick-slide a{
11
+ display: block;
12
+ }
13
+ .pwb-carousel .slick-slide a > img{
14
+ margin: 0 auto;
15
+ }
16
  .pwb-carousel .slick-loading .slick-list, .pwb-product-carousel .slick-loading .slick-list{
17
  background: #fff url('./ajax-loader.gif') center center no-repeat;
18
  }
113
  width: 20%;
114
  float: left;
115
  }
116
+ .pwb-all-brands .pwb-brands-cols-outer .pwb-brands-col3 > p:first-child{
117
  height: 25px;
118
  overflow: hidden;
119
+ font-size: 14px;
120
  }
121
  /* ----------------------- /PWB All Brands ----------------------- */
122
 
157
  width: 100%;
158
  float: none;
159
  }
160
+ .pwb-all-brands .pwb-brands-cols-outer .pwb-brands-col3 > p:first-child{
161
  height: auto;
162
  }
163
  .pwb-columns-3, .pwb-columns-4{
assets/img/dummy-data/brand1.png ADDED
Binary file
assets/img/dummy-data/brand10.png ADDED
Binary file
assets/img/dummy-data/brand2.png ADDED
Binary file
assets/img/dummy-data/brand3.png ADDED
Binary file
assets/img/dummy-data/brand4.png ADDED
Binary file
assets/img/dummy-data/brand5.png ADDED
Binary file
assets/img/dummy-data/brand6.png ADDED
Binary file
assets/img/dummy-data/brand7.png ADDED
Binary file
assets/img/dummy-data/brand8.png ADDED
Binary file
assets/img/dummy-data/brand9.png ADDED
Binary file
assets/js/pwb_admin_functions.js CHANGED
@@ -58,7 +58,7 @@ jQuery(document).ready(function( $ ) {
58
  //clear custom fields when brand is added
59
  jQuery( document ).ajaxSuccess(function( event, xhr, settings ) {
60
  //Check ajax action of request that succeeded
61
- if( ~settings.data.indexOf("action=add-tag") && ~settings.data.indexOf("taxonomy=pwb-brand") ) {
62
  $('#pwb_brand_image').val('');
63
  $('#pwb_brand_banner').val('');
64
  $('.pwb_brand_image_selected').remove();
@@ -85,6 +85,7 @@ jQuery(document).ready(function( $ ) {
85
 
86
  /* ····························· Settings tab ····························· */
87
 
 
88
  $('#wc_pwb_admin_tab_tools_migrate').on( 'change', function(){
89
 
90
  if( $(this).val() != '-' ){
@@ -116,6 +117,76 @@ jQuery(document).ready(function( $ ) {
116
 
117
  } );
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  /* ····························· /Settings tab ····························· */
120
 
121
  /* ····························· Admin notices ····························· */
@@ -146,9 +217,9 @@ jQuery(document).ready(function( $ ) {
146
  jQuery(document).on('widget-updated', function(e, widget){
147
  pwbBindEventsToWigets( widget );
148
  });
149
- function pwbBindEventsToWigets( widget = null ){
150
  $currentWidget = $(".pwb-select-display-as");
151
- if( widget != null ){
152
  $currentWidget = $(".pwb-select-display-as", widget);
153
  }
154
  $currentWidget.on("change",function(){
58
  //clear custom fields when brand is added
59
  jQuery( document ).ajaxSuccess(function( event, xhr, settings ) {
60
  //Check ajax action of request that succeeded
61
+ if( typeof settings != "undefined" && settings.data && ~settings.data.indexOf("action=add-tag") && ~settings.data.indexOf("taxonomy=pwb-brand") ) {
62
  $('#pwb_brand_image').val('');
63
  $('#pwb_brand_banner').val('');
64
  $('.pwb_brand_image_selected').remove();
85
 
86
  /* ····························· Settings tab ····························· */
87
 
88
+ // migrate brands
89
  $('#wc_pwb_admin_tab_tools_migrate').on( 'change', function(){
90
 
91
  if( $(this).val() != '-' ){
117
 
118
  } );
119
 
120
+ // dummy data
121
+ $('#wc_pwb_admin_tab_tools_dummy_data').on( 'change', function(){
122
+
123
+ if( $(this).val() != '-' ){
124
+
125
+ if( confirm(ajax_object.translations.dummy_data_notice) ){
126
+
127
+ $('html').append('<div class="pwb-modal"><div class="pwb-modal-inner"></div></div>');
128
+ $('.pwb-modal-inner').html('<p>'+ajax_object.translations.dummy_data+'</p>');
129
+
130
+ var data = {
131
+ 'action': 'pwb_admin_dummy_data',
132
+ 'from': $(this).val()
133
+ };
134
+ $.post(ajax_object.ajax_url, data, function(response) {
135
+
136
+ setTimeout( function(){
137
+ location.href = ajax_object.brands_url;
138
+ }, 1000 );
139
+
140
+ });
141
+
142
+ }else{
143
+
144
+ }
145
+
146
+ }
147
+
148
+ $(this).val('-');//reset to default value
149
+
150
+ } );
151
+
152
+ var $systemStatusBtn = $('#wc_pwb_admin_tab_tools_system_status').siblings('p');
153
+ $systemStatusBtn.addClass('button wc_pwb_admin_tab_status_btn');
154
+ $('.wc_pwb_admin_tab_status_btn').on( 'click', function(e){
155
+ e.preventDefault();
156
+ if( !$('#wc_pwb_admin_status_result').length ){
157
+ $systemStatusTextarea = $('#wc_pwb_admin_tab_tools_system_status');
158
+ $('<pre id="wc_pwb_admin_status_result"></pre>').insertAfter($systemStatusTextarea);
159
+ jQuery( '#wc_pwb_admin_status_result' ).click( function(e) {
160
+ e.preventDefault();
161
+ var refNode = $( this )[0];
162
+ if ( $.browser.msie ) {
163
+ var range = document.body.createTextRange();
164
+ range.moveToElementText( refNode );
165
+ range.select();
166
+ } else if ( $.browser.mozilla || $.browser.opera ) {
167
+ var selection = window.getSelection();
168
+ var range = document.createRange();
169
+ range.selectNodeContents( refNode );
170
+ selection.removeAllRanges();
171
+ selection.addRange( range );
172
+ } else if ( $.browser.safari ) {
173
+ var selection = window.getSelection();
174
+ selection.setBaseAndExtent( refNode, 0, refNode, 1 );
175
+ }
176
+ } );
177
+ }
178
+ $('#wc_pwb_admin_status_result').html('<img src="'+ajax_object.site_url+'/wp-admin/images/spinner.gif'+'" alt="Loading" height="20" width="20">');
179
+ $('#wc_pwb_admin_status_result').show();
180
+ var data = {
181
+ 'action': 'pwb_system_status'
182
+ };
183
+ jQuery.post(ajaxurl, data, function(response) {
184
+ $('#wc_pwb_admin_status_result').html(response);
185
+ $('#wc_pwb_admin_status_result').trigger('click');
186
+ });
187
+
188
+ } );
189
+
190
  /* ····························· /Settings tab ····························· */
191
 
192
  /* ····························· Admin notices ····························· */
217
  jQuery(document).on('widget-updated', function(e, widget){
218
  pwbBindEventsToWigets( widget );
219
  });
220
+ function pwbBindEventsToWigets( widget ){
221
  $currentWidget = $(".pwb-select-display-as");
222
+ if( widget != undefined ){
223
  $currentWidget = $(".pwb-select-display-as", widget);
224
  }
225
  $currentWidget.on("change",function(){
classes/{class-pwb-admin-tab.php → admin/class-pwb-admin-tab.php} RENAMED
@@ -77,6 +77,7 @@
77
  'slug' => array(
78
  'name' => __( 'Slug', 'perfect-woocommerce-brands' ),
79
  'type' => 'text',
 
80
  'desc' => __( 'Brands taxonomy slug', 'perfect-woocommerce-brands' ),
81
  'id' => 'wc_pwb_admin_tab_slug',
82
  'placeholder' => get_taxonomy('pwb-brand')->rewrite['slug']
@@ -91,6 +92,7 @@
91
  'show_brand_on_loop' => array(
92
  'name' => __( 'Show brands in loop', 'perfect-woocommerce-brands' ),
93
  'type' => 'select',
 
94
  'desc' => __( 'Show brand logo (or name) in product loop', 'perfect-woocommerce-brands' ),
95
  'id' => 'wc_pwb_admin_tab_brands_in_loop',
96
  'options' => array(
@@ -102,6 +104,7 @@
102
  'show_brand_in_single' => array(
103
  'name' => __( 'Show brands in single product', 'perfect-woocommerce-brands' ),
104
  'type' => 'select',
 
105
  'desc' => __( 'Show brand logo (or name) in single product', 'perfect-woocommerce-brands' ),
106
  'default' => 'brand_image',
107
  'id' => 'wc_pwb_admin_tab_brands_in_single',
@@ -114,15 +117,17 @@
114
  'brand_logo_size' => array(
115
  'name' => __( 'Brand logo size', 'perfect-woocommerce-brands' ),
116
  'type' => 'select',
 
117
  'desc' => __( 'Brand logo size for single product view', 'perfect-woocommerce-brands' ),
118
  'id' => 'wc_pwb_admin_tab_brand_logo_size',
119
  'options' => $available_image_sizes_adapted
120
  ),
121
  'brand_single_position' => array(
122
- 'name' => __( 'Brand position', 'perfect-woocommerce-brands' ),
123
- 'type' => 'select',
124
- 'desc' => __( 'For single product', 'perfect-woocommerce-brands' ),
125
- 'id' => 'wc_pwb_admin_tab_brand_single_position',
 
126
  'options' => array(
127
  'before_title' => __( 'Before title', 'perfect-woocommerce-brands' ),
128
  'after_title' => __( 'After title', 'perfect-woocommerce-brands' ),
@@ -152,16 +157,38 @@
152
  'desc' => '',
153
  'id' => 'wc_pwb_admin_tab_section_tools_title'
154
  ),
155
- 'slug' => array(
156
- 'name' => __( 'Import brands', 'perfect-woocommerce-brands' ),
157
- 'type' => 'select',
158
- 'desc' => __( 'Import brands from other brand plugin. <strong>Both plugins should be installed and active</strong>', 'perfect-woocommerce-brands' ),
159
- 'id' => 'wc_pwb_admin_tab_tools_migrate',
 
 
 
 
160
  'options' => array(
161
- '-' => __( '-', 'perfect-woocommerce-brands' ),
162
- 'yith' => __( 'YITH WooCommerce Brands Add-On', 'perfect-woocommerce-brands' )
 
 
 
 
 
 
 
 
 
 
 
 
163
  )
164
  ),
 
 
 
 
 
 
165
  'section_end' => array(
166
  'type' => 'sectionend',
167
  'id' => 'wc_pwb_admin_tab_section_tools_end'
77
  'slug' => array(
78
  'name' => __( 'Slug', 'perfect-woocommerce-brands' ),
79
  'type' => 'text',
80
+ 'css' => 'min-width:350px;display:block;',
81
  'desc' => __( 'Brands taxonomy slug', 'perfect-woocommerce-brands' ),
82
  'id' => 'wc_pwb_admin_tab_slug',
83
  'placeholder' => get_taxonomy('pwb-brand')->rewrite['slug']
92
  'show_brand_on_loop' => array(
93
  'name' => __( 'Show brands in loop', 'perfect-woocommerce-brands' ),
94
  'type' => 'select',
95
+ 'css' => 'min-width:350px;display:block;',
96
  'desc' => __( 'Show brand logo (or name) in product loop', 'perfect-woocommerce-brands' ),
97
  'id' => 'wc_pwb_admin_tab_brands_in_loop',
98
  'options' => array(
104
  'show_brand_in_single' => array(
105
  'name' => __( 'Show brands in single product', 'perfect-woocommerce-brands' ),
106
  'type' => 'select',
107
+ 'css' => 'min-width:350px;display:block;',
108
  'desc' => __( 'Show brand logo (or name) in single product', 'perfect-woocommerce-brands' ),
109
  'default' => 'brand_image',
110
  'id' => 'wc_pwb_admin_tab_brands_in_single',
117
  'brand_logo_size' => array(
118
  'name' => __( 'Brand logo size', 'perfect-woocommerce-brands' ),
119
  'type' => 'select',
120
+ 'css' => 'min-width:350px;display:block;',
121
  'desc' => __( 'Brand logo size for single product view', 'perfect-woocommerce-brands' ),
122
  'id' => 'wc_pwb_admin_tab_brand_logo_size',
123
  'options' => $available_image_sizes_adapted
124
  ),
125
  'brand_single_position' => array(
126
+ 'name' => __( 'Brand position', 'perfect-woocommerce-brands' ),
127
+ 'type' => 'select',
128
+ 'css' => 'min-width:350px;display:block;',
129
+ 'desc' => __( 'For single product', 'perfect-woocommerce-brands' ),
130
+ 'id' => 'wc_pwb_admin_tab_brand_single_position',
131
  'options' => array(
132
  'before_title' => __( 'Before title', 'perfect-woocommerce-brands' ),
133
  'after_title' => __( 'After title', 'perfect-woocommerce-brands' ),
157
  'desc' => '',
158
  'id' => 'wc_pwb_admin_tab_section_tools_title'
159
  ),
160
+ 'brand_import' => array(
161
+ 'name' => __( 'Import brands', 'perfect-woocommerce-brands' ),
162
+ 'type' => 'select',
163
+ 'css' => 'min-width:350px;display:block;',
164
+ 'desc' => sprintf(
165
+ __( 'Import brands from other brand plugin. <a href="%s" target="_blank">Click here for more details</a>', 'perfect-woocommerce-brands' ),
166
+ 'https://github.com/titodevera/perfect-woocommerce-brands/wiki/How-to-import-brands-from-other-brands-plugin'
167
+ ),
168
+ 'id' => 'wc_pwb_admin_tab_tools_migrate',
169
  'options' => array(
170
+ '-' => __( '-', 'perfect-woocommerce-brands' ),
171
+ 'yith' => __( 'YITH WooCommerce Brands Add-On', 'perfect-woocommerce-brands' ),
172
+ 'ultimate' => __( 'Ultimate WooCommerce Brands', 'perfect-woocommerce-brands' )
173
+ )
174
+ ),
175
+ 'brand_dummy_data' => array(
176
+ 'name' => __( 'Dummy data', 'perfect-woocommerce-brands' ),
177
+ 'type' => 'select',
178
+ 'css' => 'min-width:350px;display:block;',
179
+ 'desc' => __( 'Import generic brands and assign it to products randomly', 'perfect-woocommerce-brands' ),
180
+ 'id' => 'wc_pwb_admin_tab_tools_dummy_data',
181
+ 'options' => array(
182
+ '-' => __( '-', 'perfect-woocommerce-brands' ),
183
+ 'start_import' => __( 'Start import', 'perfect-woocommerce-brands' )
184
  )
185
  ),
186
+ 'brands_system_status' => array(
187
+ 'name' => __( 'System status', 'perfect-woocommerce-brands' ),
188
+ 'type' => 'textarea',
189
+ 'desc' => __( 'Show system status', 'perfect-woocommerce-brands' ),
190
+ 'id' => 'wc_pwb_admin_tab_tools_system_status'
191
+ ),
192
  'section_end' => array(
193
  'type' => 'sectionend',
194
  'id' => 'wc_pwb_admin_tab_section_tools_end'
classes/admin/class-pwb-coupon.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Perfect_Woocommerce_Brands\Admin;
3
+
4
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
5
+
6
+ class PWB_Coupon{
7
+
8
+ function __construct(){
9
+ add_action( 'woocommerce_coupon_options_usage_restriction', array( $this, 'coupon_restriction' ) );
10
+ add_action( 'woocommerce_coupon_options_save', array( $this, 'coupon_save' ) );
11
+ add_filter( 'woocommerce_coupon_is_valid', array( $this, 'is_valid_coupon' ), 10, 2 );
12
+ }
13
+
14
+ public function coupon_restriction() {
15
+ global $thepostid, $post;
16
+ $thepostid = empty( $thepostid ) ? $post->get_ID() : $thepostid;
17
+
18
+ $selected_brands = get_post_meta( $thepostid, '_pwb_coupon_restriction', true );
19
+
20
+ ob_start();
21
+ ?>
22
+ <p class="form-field"><label for="_pwb_coupon_restriction"><?php _e( 'Brands restriction', 'perfect-woocommerce-brands' ); ?></label>
23
+ <select id="_pwb_coupon_restriction" name="_pwb_coupon_restriction[]" style="width: 50%;" class="wc-enhanced-select" multiple="multiple" data-placeholder="<?php esc_attr_e( 'Any brand', 'perfect-woocommerce-brands' ); ?>">
24
+ <?php
25
+ $categories = get_terms( 'pwb-brand', 'orderby=name&hide_empty=0' );
26
+ if ( $categories ) {
27
+ foreach ( $categories as $cat ) {
28
+ echo '<option value="' . esc_attr( $cat->term_id ) . '"' . selected( in_array( $cat->term_id, $selected_brands ), true, false ) . '>' . esc_html( $cat->name ) . '</option>';
29
+ }
30
+ }
31
+ ?>
32
+ </select> <?php echo wc_help_tip( __( 'Coupon will be valid if there are at least one product of this brands in the cart', 'perfect-woocommerce-brands' ) ); ?></p>
33
+ <?php
34
+ echo ob_get_clean();
35
+
36
+ }
37
+
38
+ public function coupon_save( $post_id ){
39
+ $_pwb_coupon_restriction = isset( $_POST['_pwb_coupon_restriction'] ) ? $_POST['_pwb_coupon_restriction'] : '';
40
+ update_post_meta( $post_id, '_pwb_coupon_restriction', $_pwb_coupon_restriction );
41
+ }
42
+
43
+ public function is_valid_coupon( $availability, $coupon ){
44
+ $selected_brands = get_post_meta( $coupon->get_ID(), '_pwb_coupon_restriction', true );
45
+ if( !empty( $selected_brands ) ){
46
+ global $woocommerce;
47
+ $products = $woocommerce->cart->get_cart();
48
+ foreach( $products as $product ) {
49
+ $product_brands = wp_get_post_terms( $product['product_id'], 'pwb-brand', array( 'fields' => 'ids' ) );
50
+ if( !empty( array_intersect( $selected_brands, $product_brands ) ) ) return true;
51
+ }
52
+ return false;
53
+ }
54
+ return true;
55
+ }
56
+
57
+ }
classes/admin/class-pwb-dummy-data.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Perfect_Woocommerce_Brands\Admin;
3
+
4
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
5
+
6
+ class PWB_Dummy_Data {
7
+
8
+ function __construct(){
9
+ add_action( 'wp_ajax_pwb_admin_dummy_data', array( $this, 'dummy_data' ) );
10
+ }
11
+
12
+ private static function get_attachment_id_from_src($image_src){
13
+ global $wpdb;
14
+ $query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'";
15
+ $id = $wpdb->get_var($query);
16
+ return $id;
17
+ }
18
+
19
+ private static function retrieve_img_src( $img ) {
20
+ if (preg_match('/<img(\s+?)([^>]*?)src=(\"|\')([^>\\3]*?)\\3([^>]*?)>/is', $img, $m) && isset($m[4]))
21
+ return $m[4];
22
+ return false;
23
+ }
24
+
25
+ private static function upload_image( $post_id, $img_url ){
26
+
27
+ require_once ABSPATH . "wp-admin" . '/includes/image.php';
28
+ require_once ABSPATH . "wp-admin" . '/includes/file.php';
29
+ require_once ABSPATH . "wp-admin" . '/includes/media.php';
30
+
31
+ //solves media_sideload_image bug with spaces in filenames
32
+ $parsed_file = parse_url($img_url);
33
+ $path = $parsed_file['path'];
34
+ $file_name = basename($path);
35
+ $encoded_file_name = rawurlencode($file_name);
36
+ $path = str_replace($file_name, $encoded_file_name, $path);
37
+ $img_url = $parsed_file['scheme'] . "://" . $parsed_file['host'] . $path;
38
+ $image = '';
39
+
40
+ preg_match('/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $img_url, $file_matches);
41
+ if(isset($file_matches[0])){
42
+ $image = media_sideload_image($img_url, $post_id );
43
+ }
44
+
45
+ //media_sideload_image returns a html image
46
+ //extract the src value for get the attachment id
47
+ $image_src = self::retrieve_img_src( $image );
48
+ return self::get_attachment_id_from_src( $image_src );
49
+
50
+ }
51
+
52
+ public function dummy_data(){
53
+
54
+ for( $i=1; $i<11; $i++ ) {
55
+ $brand_name = 'brand'.$i;
56
+ $attachment_id = self::upload_image( false, PWB_PLUGIN . '/assets/img/dummy-data/'.$brand_name.'.png' );
57
+ $inserted_brand = wp_insert_term( ucfirst( $brand_name ), 'pwb-brand' );
58
+ if( !is_wp_error( $inserted_brand ) && isset( $inserted_brand['term_id'] ) ){
59
+ add_term_meta( $inserted_brand['term_id'], 'pwb_brand_image', $attachment_id );
60
+ }
61
+ }
62
+
63
+ $this->set_brands_randomly();
64
+
65
+ wp_die();
66
+
67
+ }
68
+
69
+ public function set_brands_randomly(){
70
+
71
+ $brands = \Perfect_Woocommerce_Brands\Perfect_Woocommerce_Brands::get_brands_array();
72
+
73
+ $the_query = new \WP_Query( array( 'posts_per_page' => -1 , 'post_type' => 'product' ) );
74
+
75
+ while ( $the_query->have_posts() ) {
76
+ $the_query->the_post();
77
+ wp_set_object_terms( get_the_ID(), array_rand( $brands ), 'pwb-brand' );
78
+ }
79
+ wp_reset_postdata();
80
+
81
+ }
82
+
83
+ }
classes/admin/class-pwb-migrate.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Perfect_Woocommerce_Brands\Admin;
3
+
4
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
5
+
6
+ class PWB_Migrate {
7
+
8
+ function __construct(){
9
+ add_action( 'wp_ajax_pwb_admin_migrate_brands', array( $this, 'migrate_from' ) );
10
+ }
11
+
12
+ public function migrate_from(){
13
+
14
+ if( isset( $_POST['from'] ) ){
15
+
16
+ switch( $_POST['from'] ) {
17
+ case 'yith':
18
+ $this->migrate_from_yith();
19
+ break;
20
+ case 'ultimate':
21
+ $this->migrate_from_ultimate();
22
+ break;
23
+ }
24
+
25
+
26
+ }
27
+
28
+ wp_die();
29
+ }
30
+
31
+ public function migrate_from_yith(){
32
+
33
+ global $wpdb;
34
+ $terms = $wpdb->get_col( 'SELECT term_id FROM '.$wpdb->prefix.'term_taxonomy WHERE taxonomy LIKE "yith_product_brand"' );
35
+
36
+ foreach( $terms as $term_id ) {
37
+
38
+ //change taxonomy
39
+ $wpdb->update(
40
+ $wpdb->prefix . 'term_taxonomy',
41
+ array(
42
+ 'taxonomy' => 'pwb-brand'
43
+ ),
44
+ array(
45
+ 'term_id' => $term_id
46
+ )
47
+ );
48
+
49
+ //update term meta
50
+ $wpdb->update(
51
+ $wpdb->prefix . 'termmeta',
52
+ array(
53
+ 'meta_key' => 'pwb_brand_image'
54
+ ),
55
+ array(
56
+ 'meta_key' => 'thumbnail_id',
57
+ 'term_id' => $term_id
58
+ )
59
+ );
60
+
61
+ }
62
+
63
+ }
64
+
65
+ public function migrate_from_ultimate(){
66
+
67
+ global $wpdb;
68
+ $terms = $wpdb->get_col( 'SELECT term_id FROM '.$wpdb->prefix.'term_taxonomy WHERE taxonomy LIKE "product_brand"' );
69
+
70
+ foreach( $terms as $term_id ) {
71
+
72
+ //change taxonomy
73
+ $wpdb->update(
74
+ $wpdb->prefix . 'term_taxonomy',
75
+ array(
76
+ 'taxonomy' => 'pwb-brand'
77
+ ),
78
+ array(
79
+ 'term_id' => $term_id
80
+ )
81
+ );
82
+
83
+ /**
84
+ * Ultimate WooCommerce Brands uses tax-meta-class, tax meta are really options
85
+ * @link https://github.com/bainternet/Tax-Meta-Class
86
+ */
87
+ $term_meta = get_option('tax_meta_'.$term_id);
88
+ if( isset( $term_meta['mgwb_image_brand_thumb']['id'] ) )
89
+ add_term_meta( $term_id, 'pwb_brand_image', $term_meta['mgwb_image_brand_thumb']['id'] );
90
+
91
+ }
92
+
93
+ }
94
+
95
+ }
classes/admin/class-pwb-system-status.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Perfect_Woocommerce_Brands\Admin;
3
+
4
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
5
+
6
+ class PWB_System_Status{
7
+
8
+ function __construct(){
9
+ add_action( 'wp_ajax_pwb_system_status', array( $this, 'pwb_system_status' ) );
10
+ }
11
+
12
+ public function pwb_system_status(){
13
+ print_r(array(
14
+ 'home_url' => get_option( 'home' ),
15
+ 'site_url' => get_option( 'siteurl' ),
16
+ 'version' => WC()->version,
17
+ 'wp_version' => get_bloginfo( 'version' ),
18
+ 'wp_multisite' => is_multisite(),
19
+ 'wp_memory_limit' => WP_MEMORY_LIMIT,
20
+ 'wp_debug_mode' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ),
21
+ 'wp_cron' => !( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ),
22
+ 'language' => get_locale(),
23
+ 'server_info' => $_SERVER['SERVER_SOFTWARE'],
24
+ 'php_version' => phpversion(),
25
+ 'php_post_max_size' => ini_get( 'post_max_size' ),
26
+ 'php_max_execution_time' => ini_get( 'max_execution_time' ),
27
+ 'php_max_input_vars' => ini_get( 'max_input_vars' ),
28
+ 'max_upload_size' => wp_max_upload_size(),
29
+ 'default_timezone' => date_default_timezone_get(),
30
+ 'theme' => $this->theme_info(),
31
+ 'active_plugins' => get_option( 'active_plugins' ),
32
+ 'pwb_options' => $this->pwb_options()
33
+ ));
34
+ wp_die();
35
+ }
36
+
37
+ private function theme_info(){
38
+ $current_theme = wp_get_theme();
39
+ return array(
40
+ 'name' => $current_theme->__get('name'),
41
+ 'version' => $current_theme->__get('version'),
42
+ 'parent_theme' => $current_theme->__get('parent_theme')
43
+ );
44
+ }
45
+
46
+ private function pwb_options(){
47
+ return array(
48
+ 'wc_pwb_admin_tab_brand_single_position' => get_option( 'wc_pwb_admin_tab_brand_single_position' ),
49
+ 'old_wc_pwb_admin_tab_slug' => get_option( 'old_wc_pwb_admin_tab_slug' ),
50
+ 'wc_pwb_notice_plugin_review' => get_option( 'wc_pwb_notice_plugin_review' ),
51
+ 'wc_pwb_admin_tab_slug' => get_option( 'wc_pwb_admin_tab_slug' ),
52
+ 'wc_pwb_admin_tab_brand_desc' => get_option( 'wc_pwb_admin_tab_brand_desc' ),
53
+ 'wc_pwb_admin_tab_brands_in_loop' => get_option( 'wc_pwb_admin_tab_brands_in_loop' ),
54
+ 'wc_pwb_admin_tab_brands_in_single' => get_option( 'wc_pwb_admin_tab_brands_in_single' ),
55
+ 'wc_pwb_admin_tab_brand_logo_size' => get_option( 'wc_pwb_admin_tab_brand_logo_size' )
56
+ );
57
+ }
58
+
59
+ }
classes/class-perfect-woocommerce-brands.php CHANGED
@@ -6,6 +6,7 @@
6
  class Perfect_Woocommerce_Brands{
7
 
8
  function __construct(){
 
9
  add_action( 'woocommerce_init', array( $this, 'register_brands_taxonomy' ), 10, 0 );
10
  add_action( 'init', array( $this, 'add_brands_metafields' ) );
11
  add_action( 'pwb-brand_add_form_fields', array( $this, 'add_brands_metafields_form' ) );
@@ -17,7 +18,6 @@
17
  add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );
18
  $this->brand_logo_position();
19
  add_action( 'woocommerce_before_shop_loop', array( $this, 'archive_page_banner' ), 9);
20
- add_action( 'woocommerce_before_shop_loop', array( $this, 'show_brand_description' ), 9);
21
  add_action( 'woocommerce_after_shop_loop_item_title', array( $this, 'show_brands_in_loop' ) );
22
 
23
  if ( !is_admin() ) {
@@ -32,11 +32,11 @@
32
 
33
  add_action( 'widgets_init', array( $this, 'register_widgets' ) );
34
  add_action( 'woocommerce_after_single_product_summary' , array( $this, 'product_microdata' ), 40 );
35
- add_action( 'wp_ajax_pwb_admin_migrate_brands', array( $this, 'migrate_brands' ) );
36
  add_action( 'pre_get_posts', array( $this, 'pwb_brand_filter' ) );
37
  add_filter( 'plugin_action_links_' . PWB_PLUGIN_BASENAME, array( $this, 'plugin_action_links' ) );
38
  add_action( 'wp_ajax_dismiss_pwb_notice', array( $this, 'dismiss_pwb_notice' ) );
39
  add_action( 'admin_notices', array( $this, 'review_notice' ) );
 
40
 
41
  }
42
 
@@ -82,13 +82,15 @@
82
  $terms_array = explode(',',$_GET['pwb-brand-filter']);
83
 
84
  //remove invalid terms (security)
85
- for ($i=0; $i < count($terms_array); $i++) {
86
- if( !term_exists( $terms_array[$i], 'pwb-brand' ) ){
87
- unset($terms_array[$i]);
88
- }
89
  }
90
 
91
- if ( !is_admin() && is_post_type_archive( 'product' ) && $query->is_main_query() ) {
 
 
 
 
92
 
93
  $query->set('tax_query', array(
94
  array (
@@ -104,60 +106,12 @@
104
 
105
  }
106
 
107
- public function migrate_brands(){
108
-
109
- if( isset( $_POST['from'] ) ){
110
-
111
- switch ($_POST['from']) {
112
- case 'yith':
113
-
114
- $terms = get_terms( 'yith_product_brand', array(
115
- 'hide_empty' => false
116
- ) );
117
-
118
- foreach ($terms as $term) {
119
-
120
- global $wpdb;
121
-
122
- //change taxonomy
123
- $wpdb->update(
124
- $wpdb->prefix . 'term_taxonomy',
125
- array(
126
- 'taxonomy' => 'pwb-brand'
127
- ),
128
- array(
129
- 'term_id' => $term->term_id
130
- )
131
- );
132
-
133
- //update term meta
134
- $wpdb->update(
135
- $wpdb->prefix . 'termmeta',
136
- array(
137
- 'meta_key' => 'pwb_brand_image'
138
- ),
139
- array(
140
- 'meta_key' => 'thumbnail_id',
141
- 'term_id' => $term->term_id
142
- )
143
- );
144
-
145
- }
146
-
147
- break;
148
- }
149
-
150
- }
151
-
152
- wp_die();
153
- }
154
-
155
  /*
156
  * Adds microdata (brands) to single products
157
  */
158
  public function product_microdata(){
159
  global $product;
160
- $brands = wp_get_post_terms( $product->id, 'pwb-brand');
161
 
162
  foreach ($brands as $brand) {
163
  echo '<meta itemprop="brand" content="'.$brand->name.'">';
@@ -190,16 +144,6 @@
190
  register_widget( '\Perfect_Woocommerce_Brands\Widgets\PWB_Filter_By_Brand_Widget' );
191
  }
192
 
193
- public function show_brand_description(){
194
- $show_desc = get_option('wc_pwb_admin_tab_brand_desc');
195
- $queried_object = get_queried_object();
196
- if(is_a($queried_object,'WP_Term') && $queried_object->taxonomy == 'pwb-brand' && $queried_object->description != '' && $show_desc !== 'no'){
197
- echo '<div class="pwb-brand-description">';
198
- echo $queried_object->description;
199
- echo '</div>';
200
- }
201
- }
202
-
203
  public function show_brands_in_loop(){
204
 
205
  $brands_in_loop = get_option('wc_pwb_admin_tab_brands_in_loop');
@@ -207,7 +151,7 @@
207
  if( $brands_in_loop == 'brand_link' || $brands_in_loop == 'brand_image' ){
208
 
209
  global $product;
210
- $product_id = $product->id;
211
  $product_brands = wp_get_post_terms($product_id, 'pwb-brand');
212
  if(!empty($product_brands)){
213
  echo '<div class="pwb-brands-in-loop">';
@@ -305,7 +249,7 @@
305
  "heading" => __( "Brand", "perfect-woocommerce-brands" ),
306
  "param_name" => "brand",
307
  "admin_label" => true,
308
- "value" => $this->get_brands_array()
309
  ),
310
  array(
311
  "type" => "textfield",
@@ -429,6 +373,40 @@
429
  "admin_label" => true,
430
  "value" => $available_image_sizes_adapted
431
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
  array(
433
  "type" => "checkbox",
434
  "holder" => "div",
@@ -475,16 +453,18 @@
475
  public function action_woocommerce_single_product_summary() {
476
  $brands = wp_get_post_terms( get_the_ID(), 'pwb-brand');
477
 
478
- if(!is_wp_error($brands)){
479
 
480
- if(sizeof($brands>0)){
481
 
482
  $show_as = get_option( 'wc_pwb_admin_tab_brands_in_single' );
483
 
484
  if( $show_as!='no' ){
485
 
 
 
486
  echo '<div class="pwb-single-product-brands pwb-clearfix">';
487
- foreach($brands as $brand){
488
  $brand_link = get_term_link ( $brand->term_id, 'pwb-brand' );
489
  $attachment_id = get_term_meta( $brand->term_id, 'pwb_brand_image', 1 );
490
 
@@ -495,7 +475,8 @@
495
  }
496
 
497
  $attachment_html = wp_get_attachment_image($attachment_id,$image_size);
498
- if( !empty($attachment_html) && $show_as=='brand_image' ){
 
499
  echo '<a href="'.$brand_link.'" title="'.__( 'View brand', 'perfect-woocommerce-brands' ).'">'.$attachment_html.'</a>';
500
  }else{
501
  echo '<a href="'.$brand_link.'" title="'.__( 'View brand', 'perfect-woocommerce-brands' ).'">'.$brand->name.'</a>';
@@ -503,6 +484,8 @@
503
  }
504
  echo '</div>';
505
 
 
 
506
  }
507
 
508
  }
@@ -552,8 +535,8 @@
552
  public function register_admin_scripts($hook){
553
  $screen = get_current_screen();
554
 
555
- wp_register_style('pwb_styles_brands', plugins_url('perfect-woocommerce-brands/assets/css/styles-admin.css'), array(), PWB_PLUGIN_VERSION);
556
- wp_register_script('pwb_brands_js', plugins_url('perfect-woocommerce-brands/assets/js/pwb_admin_functions.js'), array('jquery'), PWB_PLUGIN_VERSION, true);
557
 
558
  if ($hook == 'edit-tags.php' && $screen->taxonomy == 'pwb-brand' || $hook == 'term.php' && $screen->taxonomy == 'pwb-brand') {
559
  wp_enqueue_media();
@@ -562,11 +545,14 @@
562
  wp_enqueue_style( 'pwb_styles_brands' );
563
  wp_enqueue_script( 'pwb_brands_js' );
564
  wp_localize_script( 'pwb_brands_js', 'ajax_object', array(
565
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
566
- 'brands_url' => admin_url( 'edit-tags.php?taxonomy=pwb-brand&post_type=product' ),
 
567
  'translations' => array(
568
- 'migrate_notice' => __('¿Start migration?','perfect-woocommerce-brands'),
569
- 'migrating' => __('We are migrating the product brands. ¡Don´t close this window until the process is finished!','perfect-woocommerce-brands')
 
 
570
  )
571
  ) );
572
 
@@ -764,7 +750,7 @@
764
 
765
  public function brand_taxonomy_columns_head($defaults) {
766
  $newColumns = array(
767
- 'cb' => $defaults['cb'],
768
  'logo' => __( 'Logo', 'perfect-woocommerce-brands' )
769
  );
770
 
@@ -783,11 +769,13 @@
783
  }
784
  }
785
 
786
- public static function get_brands( $hide_empty = false ){
787
  $result = array();
788
 
789
  $brands = get_terms('pwb-brand',array(
790
- 'hide_empty' => $hide_empty
 
 
791
  ));
792
 
793
  if(is_array($brands) && count($brands)>0){
@@ -798,9 +786,12 @@
798
 
799
  }
800
 
801
- public static function get_brands_array(){
802
  $result = array();
803
- $result[0] = 'all';
 
 
 
804
 
805
  $brands = get_terms('pwb-brand',array(
806
  'hide_empty' => false
@@ -840,14 +831,14 @@
840
  ob_start();
841
 
842
  $loop = new \WP_Query( $args );
843
- if ( $loop->have_posts() && function_exists('get_product') && function_exists('woocommerce_template_loop_add_to_cart') && function_exists('woocommerce_get_product_thumbnail') ) {
844
  while ( $loop->have_posts() ) : $loop->the_post();
845
- $product = get_product( get_the_ID() );
846
 
847
  echo '<div>';
848
  echo '<a href="'.get_the_permalink().'">';
849
  echo woocommerce_get_product_thumbnail();
850
- echo '<h3>'.$product->post->post_title.'</h3>';
851
  echo '<span class="pwb-amount">'.$product->get_price_html().'</span>';
852
  woocommerce_template_loop_add_to_cart();
853
  echo '</a>';
@@ -866,21 +857,55 @@
866
  public function archive_page_banner(){
867
  $queried_object = get_queried_object();
868
 
869
- if(is_a($queried_object,'WP_Term') && $queried_object->taxonomy == 'pwb-brand'){
870
- //pwb-brand archive
871
  $brand_banner = get_term_meta( $queried_object->term_id, 'pwb_brand_banner', true );
872
  $brand_banner_link = get_term_meta( $queried_object->term_id, 'pwb_brand_banner_link', true );
873
- if($brand_banner!=''){
874
- echo '<div class="pwb-brand-banner pwb-clearfix">';
875
- if($brand_banner_link!=''){
876
- echo '<a href="'.site_url($brand_banner_link).'">'.wp_get_attachment_image ( $brand_banner, 'full', false ).'</a>';
877
- }else{
878
- echo wp_get_attachment_image ( $brand_banner, 'full', false );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
879
  }
 
 
880
  echo '</div>';
881
  }
 
882
  }
883
 
884
  }
885
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
886
  }
6
  class Perfect_Woocommerce_Brands{
7
 
8
  function __construct(){
9
+
10
  add_action( 'woocommerce_init', array( $this, 'register_brands_taxonomy' ), 10, 0 );
11
  add_action( 'init', array( $this, 'add_brands_metafields' ) );
12
  add_action( 'pwb-brand_add_form_fields', array( $this, 'add_brands_metafields_form' ) );
18
  add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );
19
  $this->brand_logo_position();
20
  add_action( 'woocommerce_before_shop_loop', array( $this, 'archive_page_banner' ), 9);
 
21
  add_action( 'woocommerce_after_shop_loop_item_title', array( $this, 'show_brands_in_loop' ) );
22
 
23
  if ( !is_admin() ) {
32
 
33
  add_action( 'widgets_init', array( $this, 'register_widgets' ) );
34
  add_action( 'woocommerce_after_single_product_summary' , array( $this, 'product_microdata' ), 40 );
 
35
  add_action( 'pre_get_posts', array( $this, 'pwb_brand_filter' ) );
36
  add_filter( 'plugin_action_links_' . PWB_PLUGIN_BASENAME, array( $this, 'plugin_action_links' ) );
37
  add_action( 'wp_ajax_dismiss_pwb_notice', array( $this, 'dismiss_pwb_notice' ) );
38
  add_action( 'admin_notices', array( $this, 'review_notice' ) );
39
+ add_filter( 'term_description', array( $this, 'filter_default_brand_desc' ), 10, 1 );
40
 
41
  }
42
 
82
  $terms_array = explode(',',$_GET['pwb-brand-filter']);
83
 
84
  //remove invalid terms (security)
85
+ for($i=0; $i < count($terms_array); $i++) {
86
+ if( !term_exists( $terms_array[$i], 'pwb-brand' ) ) unset($terms_array[$i]);
 
 
87
  }
88
 
89
+ $filterable_product = false;
90
+ if( is_product_category() || is_post_type_archive( 'product' ) )
91
+ $filterable_product = true;
92
+
93
+ if( $filterable_product && $query->is_main_query() ) {
94
 
95
  $query->set('tax_query', array(
96
  array (
106
 
107
  }
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  /*
110
  * Adds microdata (brands) to single products
111
  */
112
  public function product_microdata(){
113
  global $product;
114
+ $brands = wp_get_post_terms( $product->get_id(), 'pwb-brand');
115
 
116
  foreach ($brands as $brand) {
117
  echo '<meta itemprop="brand" content="'.$brand->name.'">';
144
  register_widget( '\Perfect_Woocommerce_Brands\Widgets\PWB_Filter_By_Brand_Widget' );
145
  }
146
 
 
 
 
 
 
 
 
 
 
 
147
  public function show_brands_in_loop(){
148
 
149
  $brands_in_loop = get_option('wc_pwb_admin_tab_brands_in_loop');
151
  if( $brands_in_loop == 'brand_link' || $brands_in_loop == 'brand_image' ){
152
 
153
  global $product;
154
+ $product_id = $product->get_id();
155
  $product_brands = wp_get_post_terms($product_id, 'pwb-brand');
156
  if(!empty($product_brands)){
157
  echo '<div class="pwb-brands-in-loop">';
249
  "heading" => __( "Brand", "perfect-woocommerce-brands" ),
250
  "param_name" => "brand",
251
  "admin_label" => true,
252
+ "value" => self::get_brands_array( true )
253
  ),
254
  array(
255
  "type" => "textfield",
373
  "admin_label" => true,
374
  "value" => $available_image_sizes_adapted
375
  ),
376
+ array(
377
+ "type" => "dropdown",
378
+ "heading" => __( "Order by", "perfect-woocommerce-brands" ),
379
+ "param_name" => "order_by",
380
+ "admin_label" => true,
381
+ "value" => array(
382
+ 'name' => 'name',
383
+ 'slug' => 'slug',
384
+ 'term_id' => 'term_id',
385
+ 'id' => 'id',
386
+ 'description' => 'description',
387
+ 'rand' => 'rand'
388
+ )
389
+ ),
390
+ array(
391
+ "type" => "dropdown",
392
+ "heading" => __( "Order", "perfect-woocommerce-brands" ),
393
+ "param_name" => "order",
394
+ "admin_label" => true,
395
+ "value" => array(
396
+ 'ASC' => 'ASC',
397
+ 'DSC' => 'DSC'
398
+ )
399
+ ),
400
+ array(
401
+ "type" => "dropdown",
402
+ "heading" => __( "Title position", "perfect-woocommerce-brands" ),
403
+ "param_name" => "title_position",
404
+ "admin_label" => true,
405
+ "value" => array(
406
+ __( "Before image", "perfect-woocommerce-brands" ) => 'before',
407
+ __( "After image", "perfect-woocommerce-brands" ) => 'after'
408
+ )
409
+ ),
410
  array(
411
  "type" => "checkbox",
412
  "holder" => "div",
453
  public function action_woocommerce_single_product_summary() {
454
  $brands = wp_get_post_terms( get_the_ID(), 'pwb-brand');
455
 
456
+ if( !is_wp_error( $brands ) ){
457
 
458
+ if( sizeof( $brands>0 ) ){
459
 
460
  $show_as = get_option( 'wc_pwb_admin_tab_brands_in_single' );
461
 
462
  if( $show_as!='no' ){
463
 
464
+ do_action( 'pwb_before_single_product_brands', $brands );
465
+
466
  echo '<div class="pwb-single-product-brands pwb-clearfix">';
467
+ foreach( $brands as $brand ){
468
  $brand_link = get_term_link ( $brand->term_id, 'pwb-brand' );
469
  $attachment_id = get_term_meta( $brand->term_id, 'pwb_brand_image', 1 );
470
 
475
  }
476
 
477
  $attachment_html = wp_get_attachment_image($attachment_id,$image_size);
478
+
479
+ if( !empty($attachment_html) && $show_as=='brand_image' || !empty($attachment_html) && !$show_as ){
480
  echo '<a href="'.$brand_link.'" title="'.__( 'View brand', 'perfect-woocommerce-brands' ).'">'.$attachment_html.'</a>';
481
  }else{
482
  echo '<a href="'.$brand_link.'" title="'.__( 'View brand', 'perfect-woocommerce-brands' ).'">'.$brand->name.'</a>';
484
  }
485
  echo '</div>';
486
 
487
+ do_action( 'pwb_after_single_product_brands', $brands );
488
+
489
  }
490
 
491
  }
535
  public function register_admin_scripts($hook){
536
  $screen = get_current_screen();
537
 
538
+ wp_register_style('pwb_styles_brands', PWB_PLUGIN . '/assets/css/styles-admin.css', array(), PWB_PLUGIN_VERSION);
539
+ wp_register_script('pwb_brands_js', PWB_PLUGIN . '/assets/js/pwb_admin_functions.js', array('jquery'), PWB_PLUGIN_VERSION, true);
540
 
541
  if ($hook == 'edit-tags.php' && $screen->taxonomy == 'pwb-brand' || $hook == 'term.php' && $screen->taxonomy == 'pwb-brand') {
542
  wp_enqueue_media();
545
  wp_enqueue_style( 'pwb_styles_brands' );
546
  wp_enqueue_script( 'pwb_brands_js' );
547
  wp_localize_script( 'pwb_brands_js', 'ajax_object', array(
548
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
549
+ 'site_url' => site_url(),
550
+ 'brands_url' => admin_url( 'edit-tags.php?taxonomy=pwb-brand&post_type=product' ),
551
  'translations' => array(
552
+ 'migrate_notice' => __('¿Start migration?','perfect-woocommerce-brands'),
553
+ 'migrating' => __('We are migrating the product brands. ¡Don´t close this window until the process is finished!','perfect-woocommerce-brands'),
554
+ 'dummy_data_notice' => __('¿Start loading dummy data?','perfect-woocommerce-brands'),
555
+ 'dummy_data' => __('We are importing the dummy data. ¡Don´t close this window until the process is finished!','perfect-woocommerce-brands')
556
  )
557
  ) );
558
 
750
 
751
  public function brand_taxonomy_columns_head($defaults) {
752
  $newColumns = array(
753
+ 'cb' => $defaults['cb'],
754
  'logo' => __( 'Logo', 'perfect-woocommerce-brands' )
755
  );
756
 
769
  }
770
  }
771
 
772
+ public static function get_brands( $hide_empty = false, $order_by = 'name', $order = 'ASC' ){
773
  $result = array();
774
 
775
  $brands = get_terms('pwb-brand',array(
776
+ 'hide_empty' => $hide_empty,
777
+ 'order_by' => $order_by,
778
+ 'order' => $order
779
  ));
780
 
781
  if(is_array($brands) && count($brands)>0){
786
 
787
  }
788
 
789
+ public static function get_brands_array( $is_select = false ){
790
  $result = array();
791
+
792
+ //if is for select input adds default value
793
+ if( $is_select )
794
+ $result[0] = __( 'All', 'perfect-woocommerce-brands' );
795
 
796
  $brands = get_terms('pwb-brand',array(
797
  'hide_empty' => false
831
  ob_start();
832
 
833
  $loop = new \WP_Query( $args );
834
+ if ( $loop->have_posts() && function_exists('wc_get_product') && function_exists('woocommerce_template_loop_add_to_cart') && function_exists('woocommerce_get_product_thumbnail') ) {
835
  while ( $loop->have_posts() ) : $loop->the_post();
836
+ $product = wc_get_product( get_the_ID() );
837
 
838
  echo '<div>';
839
  echo '<a href="'.get_the_permalink().'">';
840
  echo woocommerce_get_product_thumbnail();
841
+ echo '<h3>'.$product->get_title().'</h3>';
842
  echo '<span class="pwb-amount">'.$product->get_price_html().'</span>';
843
  woocommerce_template_loop_add_to_cart();
844
  echo '</a>';
857
  public function archive_page_banner(){
858
  $queried_object = get_queried_object();
859
 
860
+ if( self::is_brand_archive_page() ){
861
+
862
  $brand_banner = get_term_meta( $queried_object->term_id, 'pwb_brand_banner', true );
863
  $brand_banner_link = get_term_meta( $queried_object->term_id, 'pwb_brand_banner_link', true );
864
+ $show_desc = get_option('wc_pwb_admin_tab_brand_desc');
865
+
866
+ if( $brand_banner!='' || $queried_object->description != '' && $show_desc !== 'no' ){
867
+ echo '<div class="pwb-brand-banner-cont">';
868
+ }
869
+
870
+ //pwb-brand archive
871
+ if( $brand_banner!='' ){
872
+ echo '<div class="pwb-brand-banner pwb-clearfix">';
873
+ if($brand_banner_link!=''){
874
+ echo '<a href="'.site_url($brand_banner_link).'">'.wp_get_attachment_image ( $brand_banner, 'full', false ).'</a>';
875
+ }else{
876
+ echo wp_get_attachment_image ( $brand_banner, 'full', false );
877
+ }
878
+ echo '</div>';
879
+ }
880
+
881
+ //show brand description
882
+ if( $queried_object->description != '' && $show_desc !== 'no' ){
883
+ echo '<div class="pwb-brand-description">';
884
+ echo $queried_object->description;
885
+ echo '</div>';
886
  }
887
+
888
+ if( $brand_banner!='' || $queried_object->description != '' && $show_desc !== 'no' ){
889
  echo '</div>';
890
  }
891
+
892
  }
893
 
894
  }
895
 
896
+ public function filter_default_brand_desc( $desc_kses ){
897
+ if( self::is_brand_archive_page() ){
898
+ return false;
899
+ }
900
+ return $desc_kses;
901
+ }
902
+
903
+ public static function is_brand_archive_page(){
904
+ $queried_object = get_queried_object();
905
+ if( is_a( $queried_object,'WP_Term' ) && $queried_object->taxonomy == 'pwb-brand' ){
906
+ return true;
907
+ }
908
+ return false;
909
+ }
910
+
911
  }
classes/class-pwb-api-support.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Perfect_Woocommerce_Brands;
3
+
4
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
5
+
6
+ class PWB_API_Support{
7
+
8
+ function __construct(){
9
+ add_action( 'rest_api_init', array( $this, 'register_endpoints' ) );
10
+
11
+ /**
12
+ * register_rest_field() was introduced in WordPress 4.7.0
13
+ */
14
+ if( version_compare( PWB_WP_VERSION, '4.7.0', '>=' ) ){
15
+ add_action( 'rest_api_init', array( $this, 'register_fields' ) );
16
+ }
17
+
18
+ }
19
+
20
+ public function register_endpoints(){
21
+
22
+ register_rest_route( 'wc/v1', '/brands', array(
23
+ // By using this constant we ensure that when the WP_REST_Server changes our readable endpoints will work as intended.
24
+ 'methods' => \WP_REST_Server::READABLE,
25
+ 'callback' => function(){
26
+ return rest_ensure_response(
27
+ \Perfect_Woocommerce_Brands\Perfect_Woocommerce_Brands::get_brands()
28
+ );
29
+ }
30
+ ) );
31
+
32
+ }
33
+
34
+ public function register_fields(){
35
+
36
+ register_rest_field( 'product', 'brands', array(
37
+ 'get_callback' => function( $product ) {
38
+ $result_brands_array = array();
39
+ $brands = wp_get_post_terms($product['id'], 'pwb-brand' );
40
+ foreach($brands as $brand) {
41
+ $result_brands_array[$brand->term_id] = $brand->name;
42
+ }
43
+ return $result_brands_array;
44
+ },
45
+ 'schema' => array(
46
+ 'description' => __( 'Product brands' , 'perfect-woocommerce-brands' ),
47
+ 'type' => 'text'
48
+ )
49
+ ) );
50
+
51
+ }
52
+
53
+ }
classes/shortcodes/class-pwb-all-brands.php CHANGED
@@ -8,32 +8,42 @@
8
  public static function all_brands_shortcode( $atts ) {
9
 
10
  $atts = shortcode_atts( array(
11
- 'per_page' => "10",
12
- 'image_size' => "thumbnail",
13
- 'hide_empty' => false
 
 
 
14
  ), $atts, 'pwb-all-brands' );
15
 
16
  $hide_empty = true;
17
- if($atts['hide_empty']!='true'){
18
  $hide_empty = false;
19
  }
20
 
21
  ob_start();
22
 
23
- $brands = \Perfect_Woocommerce_Brands\Perfect_Woocommerce_Brands::get_brands( $hide_empty );
 
 
 
 
 
 
 
24
  ?>
25
  <div class="pwb-all-brands">
26
- <?php static::pagination($brands, $atts['per_page'], $atts['image_size']);?>
27
  </div>
28
  <?php
29
 
30
  return ob_get_clean();
31
  }
32
 
33
- public static function pagination($display_array, $show_per_page, $image_size) {
34
  $page = 1;
35
 
36
- if(isset($_GET['pwb-page']) && filter_var($_GET['pwb-page'], FILTER_VALIDATE_INT) == true){
37
  $page = $_GET['pwb-page'];
38
  }
39
 
@@ -68,13 +78,25 @@
68
 
69
  ?>
70
  <div class="pwb-brands-col3">
71
- <div>
72
- <?php echo $brand_name;?>
73
- <small>(<?php echo $brand->count;?>)</small>
74
- </div>
 
 
 
 
75
  <div>
76
  <a href="<?php echo $brand_link;?>" title="<?php _e( 'View brand', 'perfect-woocommerce-brands' );?>"><?php echo $attachment_html;?></a>
77
  </div>
 
 
 
 
 
 
 
 
78
  </div>
79
  <?php
80
  }
8
  public static function all_brands_shortcode( $atts ) {
9
 
10
  $atts = shortcode_atts( array(
11
+ 'per_page' => "10",
12
+ 'image_size' => "thumbnail",
13
+ 'hide_empty' => false,
14
+ 'order_by' => 'name',
15
+ 'order' => 'ASC',
16
+ 'title_position' => 'before'
17
  ), $atts, 'pwb-all-brands' );
18
 
19
  $hide_empty = true;
20
+ if( $atts['hide_empty'] != 'true' ){
21
  $hide_empty = false;
22
  }
23
 
24
  ob_start();
25
 
26
+ $brands = array();
27
+ if( $atts['order_by'] == 'rand' ){
28
+ $brands = \Perfect_Woocommerce_Brands\Perfect_Woocommerce_Brands::get_brands( $hide_empty );
29
+ shuffle( $brands );
30
+ }else{
31
+ $brands = \Perfect_Woocommerce_Brands\Perfect_Woocommerce_Brands::get_brands( $hide_empty, $atts['order_by'], $atts['order'] );
32
+ }
33
+
34
  ?>
35
  <div class="pwb-all-brands">
36
+ <?php static::pagination( $brands, $atts['per_page'], $atts['image_size'], $atts['title_position'] );?>
37
  </div>
38
  <?php
39
 
40
  return ob_get_clean();
41
  }
42
 
43
+ public static function pagination( $display_array, $show_per_page, $image_size, $title_position ) {
44
  $page = 1;
45
 
46
+ if( isset( $_GET['pwb-page'] ) && filter_var( $_GET['pwb-page'], FILTER_VALIDATE_INT ) == true ){
47
  $page = $_GET['pwb-page'];
48
  }
49
 
78
 
79
  ?>
80
  <div class="pwb-brands-col3">
81
+
82
+ <?php if( $title_position != 'after' ): ?>
83
+ <p>
84
+ <?php echo $brand_name;?>
85
+ <small>(<?php echo $brand->count;?>)</small>
86
+ </p>
87
+ <?php endif; ?>
88
+
89
  <div>
90
  <a href="<?php echo $brand_link;?>" title="<?php _e( 'View brand', 'perfect-woocommerce-brands' );?>"><?php echo $attachment_html;?></a>
91
  </div>
92
+
93
+ <?php if( $title_position == 'after' ): ?>
94
+ <p>
95
+ <?php echo $brand_name;?>
96
+ <small>(<?php echo $brand->count;?>)</small>
97
+ </p>
98
+ <?php endif; ?>
99
+
100
  </div>
101
  <?php
102
  }
classes/shortcodes/class-pwb-carousel.php CHANGED
@@ -11,20 +11,23 @@
11
  'items_to_show' => "5",
12
  'items_to_scroll' => "1",
13
  'image_size' => "thumbnail",
14
- 'autoplay' => false,
15
- 'arrows' => false
16
  ), $atts, 'pwb-carousel' );
17
 
18
- ob_start();
19
-
20
  $foreach_iterator = 0;
21
 
22
- $slick_settings = [
 
 
 
23
  'slidesToShow' => (int)$atts['items_to_show'],
24
  'slidesToScroll' => (int)$atts['items_to_scroll'],
25
  'autoplay' => (bool)$atts['autoplay'],
26
- 'arrows' => (bool)$atts['arrows'],
27
- ];
 
 
28
  ?>
29
 
30
  <div class="pwb-carousel" data-slick='<?php echo json_encode($slick_settings); ?>'>
11
  'items_to_show' => "5",
12
  'items_to_scroll' => "1",
13
  'image_size' => "thumbnail",
14
+ 'autoplay' => "false",
15
+ 'arrows' => "false"
16
  ), $atts, 'pwb-carousel' );
17
 
 
 
18
  $foreach_iterator = 0;
19
 
20
+ $atts['autoplay'] = ( $atts['autoplay'] === 'true' ) ? true: false;
21
+ $atts['arrows'] = ( $atts['arrows'] === 'true' ) ? true: false;
22
+
23
+ $slick_settings = array(
24
  'slidesToShow' => (int)$atts['items_to_show'],
25
  'slidesToScroll' => (int)$atts['items_to_scroll'],
26
  'autoplay' => (bool)$atts['autoplay'],
27
+ 'arrows' => (bool)$atts['arrows']
28
+ );
29
+
30
+ ob_start();
31
  ?>
32
 
33
  <div class="pwb-carousel" data-slick='<?php echo json_encode($slick_settings); ?>'>
classes/shortcodes/class-pwb-product-carousel.php CHANGED
@@ -11,18 +11,21 @@
11
  'products' => "10",
12
  'products_to_show' => "5",
13
  'products_to_scroll' => "1",
14
- 'autoplay' => false,
15
- 'arrows' => false
16
  ), $atts, 'pwb-product-carousel' );
17
 
18
- ob_start();
 
19
 
20
- $slick_settings = [
21
  'slidesToShow' => (int)$atts['products_to_show'],
22
  'slidesToScroll' => (int)$atts['products_to_scroll'],
23
  'autoplay' => (bool)$atts['autoplay'],
24
- 'arrows' => (bool)$atts['arrows'],
25
- ];
 
 
26
  ?>
27
 
28
  <div class="pwb-product-carousel" data-slick='<?php echo json_encode($slick_settings); ?>'>
11
  'products' => "10",
12
  'products_to_show' => "5",
13
  'products_to_scroll' => "1",
14
+ 'autoplay' => "false",
15
+ 'arrows' => "false"
16
  ), $atts, 'pwb-product-carousel' );
17
 
18
+ $atts['autoplay'] = ( $atts['autoplay'] === 'true' ) ? true: false;
19
+ $atts['arrows'] = ( $atts['arrows'] === 'true' ) ? true: false;
20
 
21
+ $slick_settings = array(
22
  'slidesToShow' => (int)$atts['products_to_show'],
23
  'slidesToScroll' => (int)$atts['products_to_scroll'],
24
  'autoplay' => (bool)$atts['autoplay'],
25
+ 'arrows' => (bool)$atts['arrows']
26
+ );
27
+
28
+ ob_start();
29
  ?>
30
 
31
  <div class="pwb-product-carousel" data-slick='<?php echo json_encode($slick_settings); ?>'>
classes/widgets/class-pwb-filter-by-brand.php CHANGED
@@ -14,11 +14,7 @@
14
  }
15
 
16
  public function form( $instance ) {
17
- if ( isset( $instance[ 'title' ] ) ) {
18
- $title = $instance[ 'title' ];
19
- }else {
20
- $title = 'Marcas';
21
- }
22
  ?>
23
  <p>
24
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
@@ -29,7 +25,8 @@
29
 
30
  public function widget( $args, $instance ) {
31
 
32
- $title = apply_filters( 'widget_title', $instance['title'] );
 
33
 
34
  echo $args['before_widget'];
35
  if ( ! empty( $title ) )
@@ -99,7 +96,7 @@
99
 
100
  }else{
101
  //no product category
102
- $cate_url = get_permalink( woocommerce_get_page_id( 'shop' ));
103
  shuffle($brands_ids);
104
  $result_brands = array_slice($brands_ids, 0, 20);
105
  }
14
  }
15
 
16
  public function form( $instance ) {
17
+ $title = ( isset( $instance[ 'title' ] ) ) ? $instance[ 'title' ] : __('Brands', 'perfect-woocommerce-brands');
 
 
 
 
18
  ?>
19
  <p>
20
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
25
 
26
  public function widget( $args, $instance ) {
27
 
28
+ $title = ( isset( $instance[ 'title' ] ) ) ? $instance[ 'title' ] : __('Brands', 'perfect-woocommerce-brands');
29
+ $title = apply_filters( 'widget_title', $title );
30
 
31
  echo $args['before_widget'];
32
  if ( ! empty( $title ) )
96
 
97
  }else{
98
  //no product category
99
+ $cate_url = get_permalink( wc_get_page_id( 'shop' ));
100
  shuffle($brands_ids);
101
  $result_brands = array_slice($brands_ids, 0, 20);
102
  }
classes/widgets/class-pwb-list.php CHANGED
@@ -15,6 +15,9 @@
15
 
16
  public function form($instance){
17
  extract($instance);
 
 
 
18
  ?>
19
 
20
  <p>
@@ -65,6 +68,8 @@
65
  echo $before_title . $title . $after_title;
66
  }
67
 
 
 
68
  PWB_List_Widget::get_brands( $display_as, $columns );
69
 
70
  echo $after_widget;
15
 
16
  public function form($instance){
17
  extract($instance);
18
+
19
+ if( !isset( $display_as ) ) $display_as = 'brand_logo';
20
+ if( !isset( $columns ) ) $columns = '2';
21
  ?>
22
 
23
  <p>
68
  echo $before_title . $title . $after_title;
69
  }
70
 
71
+ if( !isset( $display_as ) ) $display_as = 'brand_logo';
72
+ if( !isset( $columns ) ) $columns = '2';
73
  PWB_List_Widget::get_brands( $display_as, $columns );
74
 
75
  echo $after_widget;
lang/perfect-woocommerce-brands-es_ES.mo CHANGED
Binary file
lang/perfect-woocommerce-brands-es_ES.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Perfect WooCommerce Brands\n"
4
- "POT-Creation-Date: 2017-03-11 20:47+0100\n"
5
- "PO-Revision-Date: 2017-03-11 20:47+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: es_ES\n"
@@ -10,7 +10,7 @@ msgstr ""
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-Generator: Poedit 1.8.12\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-WPHeader: main.php\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
@@ -20,6 +20,181 @@ msgstr ""
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  #: classes/class-perfect-woocommerce-brands.php:47
24
  msgid ""
25
  "We are offering you maybe the best WooCommerce brands plugin completely "
@@ -57,156 +232,169 @@ msgstr ""
57
  msgid "Settings"
58
  msgstr "Ajustes"
59
 
60
- #: classes/class-perfect-woocommerce-brands.php:296
61
  msgid "PWB Product carousel"
62
  msgstr "PWB Carrusel de productos"
63
 
64
- #: classes/class-perfect-woocommerce-brands.php:297
65
  msgid "Product carousel by brand or by category"
66
  msgstr "Carrusel de productos por marca o categoría"
67
 
68
- #: classes/class-perfect-woocommerce-brands.php:305
69
- #: classes/class-perfect-woocommerce-brands.php:578
70
  msgid "Brand"
71
  msgstr "Marca"
72
 
73
- #: classes/class-perfect-woocommerce-brands.php:313
74
  msgid "Products"
75
  msgstr "Productos"
76
 
77
- #: classes/class-perfect-woocommerce-brands.php:316
78
  msgid "Number of products to load"
79
  msgstr "Número de productos que cargar"
80
 
81
- #: classes/class-perfect-woocommerce-brands.php:321
82
  msgid "Products to show"
83
  msgstr "Productos a mostrar"
84
 
85
- #: classes/class-perfect-woocommerce-brands.php:324
86
  msgid "Number of products to show"
87
  msgstr "Número de productos que mostrar"
88
 
89
- #: classes/class-perfect-woocommerce-brands.php:329
90
  msgid "Products to scroll"
91
  msgstr "Número de productos por scroll"
92
 
93
- #: classes/class-perfect-woocommerce-brands.php:332
94
  msgid "Number of products to scroll"
95
  msgstr "Número de productos por cada scroll"
96
 
97
- #: classes/class-perfect-woocommerce-brands.php:337
98
- #: classes/class-perfect-woocommerce-brands.php:386
99
  msgid "Autoplay"
100
  msgstr "Modo automático"
101
 
102
- #: classes/class-perfect-woocommerce-brands.php:339
103
- #: classes/class-perfect-woocommerce-brands.php:388
104
  msgid "Autoplay carousel"
105
  msgstr "Modo automático para el carrusel"
106
 
107
- #: classes/class-perfect-woocommerce-brands.php:344
108
- #: classes/class-perfect-woocommerce-brands.php:393
109
  msgid "Arrows"
110
  msgstr "Flechas de navegación"
111
 
112
- #: classes/class-perfect-woocommerce-brands.php:346
113
- #: classes/class-perfect-woocommerce-brands.php:395
114
  msgid "Display prev and next arrows"
115
  msgstr "Mostrar flechas de navegación"
116
 
117
- #: classes/class-perfect-woocommerce-brands.php:352
118
  msgid "PWB Brands carousel"
119
  msgstr "PWB Carrusel de marcas"
120
 
121
- #: classes/class-perfect-woocommerce-brands.php:353
122
  msgid "Brands carousel"
123
  msgstr "Carrusel de marcas"
124
 
125
- #: classes/class-perfect-woocommerce-brands.php:362
126
  msgid "Items"
127
  msgstr "Elementos"
128
 
129
- #: classes/class-perfect-woocommerce-brands.php:365
130
  msgid "Number of items to load"
131
  msgstr "Número de elementos que cargar"
132
 
133
- #: classes/class-perfect-woocommerce-brands.php:370
134
  msgid "Items to show"
135
  msgstr "Elementos a mostrar"
136
 
137
- #: classes/class-perfect-woocommerce-brands.php:373
138
  msgid "Number of items to show"
139
  msgstr "Número de elementos a mostrar"
140
 
141
- #: classes/class-perfect-woocommerce-brands.php:378
142
  msgid "Items to scroll"
143
  msgstr "Número de elementos por scroll"
144
 
145
- #: classes/class-perfect-woocommerce-brands.php:381
146
  msgid "Number of items to scroll"
147
  msgstr "Número de elementos por cada scroll"
148
 
149
- #: classes/class-perfect-woocommerce-brands.php:399
150
- #: classes/class-perfect-woocommerce-brands.php:427
151
- #: classes/class-perfect-woocommerce-brands.php:463
152
- #: classes/class-pwb-admin-tab.php:115
153
- msgid "Brand logo size"
154
- msgstr "Tamaño del logo de la marca"
155
-
156
- #: classes/class-perfect-woocommerce-brands.php:410
157
  msgid "PWB All brands"
158
  msgstr "PWB Todas las marcas"
159
 
160
- #: classes/class-perfect-woocommerce-brands.php:411
161
  msgid "Show all brands"
162
  msgstr "Mostrar todas las marcas"
163
 
164
- #: classes/class-perfect-woocommerce-brands.php:420
165
  msgid "Brands per page"
166
  msgstr "Marcas por página"
167
 
168
- #: classes/class-perfect-woocommerce-brands.php:423
169
  msgid "Show x brands per page"
170
  msgstr "Mostrar x marcas por página"
171
 
172
- #: classes/class-perfect-woocommerce-brands.php:435
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  msgid "Hide empty"
174
  msgstr "Ocultar vacías"
175
 
176
- #: classes/class-perfect-woocommerce-brands.php:437
177
  msgid "Hide brands that have not been assigned to any product"
178
  msgstr "Ocultar marcas que no han sido asignadas a ningún producto"
179
 
180
- #: classes/class-perfect-woocommerce-brands.php:445
181
  msgid "PWB brand"
182
  msgstr "PWB Marca"
183
 
184
- #: classes/class-perfect-woocommerce-brands.php:446
185
  msgid "Show brand for a specific product"
186
  msgstr "Ver marcas de un producto específico"
187
 
188
- #: classes/class-perfect-woocommerce-brands.php:456
189
  msgid "Product id"
190
  msgstr "Id del producto"
191
 
192
- #: classes/class-perfect-woocommerce-brands.php:459
193
  msgid "Product id (post id)"
194
  msgstr "Id del producto (id del post)"
195
 
196
- #: classes/class-perfect-woocommerce-brands.php:499
197
- #: classes/class-perfect-woocommerce-brands.php:501
198
- #: classes/shortcodes/class-pwb-all-brands.php:76
199
  #: classes/shortcodes/class-pwb-brand.php:29
200
  #: classes/shortcodes/class-pwb-brand.php:31
201
- #: classes/shortcodes/class-pwb-carousel.php:47
202
  msgid "View brand"
203
  msgstr "Ver marca"
204
 
205
- #: classes/class-perfect-woocommerce-brands.php:568
206
  msgid "¿Start migration?"
207
  msgstr "¿Comenzar la migración?"
208
 
209
- #: classes/class-perfect-woocommerce-brands.php:569
210
  msgid ""
211
  "We are migrating the product brands. ¡Don´t close this window until the "
212
  "process is finished!"
@@ -214,239 +402,141 @@ msgstr ""
214
  "Estamos migrando las marcas de producto. ¡No cierres esta ventana hasta que "
215
  "el proceso finalice!"
216
 
217
- #: classes/class-perfect-woocommerce-brands.php:577
218
- #: classes/class-perfect-woocommerce-brands.php:579
219
- #: classes/class-pwb-admin-tab.php:21 classes/widgets/class-pwb-dropdown.php:56
220
- msgid "Brands"
221
- msgstr "Marcas"
 
 
 
 
 
 
222
 
223
- #: classes/class-perfect-woocommerce-brands.php:580
224
  msgid "All Brands"
225
  msgstr "Todas las marcas"
226
 
227
- #: classes/class-perfect-woocommerce-brands.php:581
228
  msgid "Edit Brand"
229
  msgstr "Editar marca"
230
 
231
- #: classes/class-perfect-woocommerce-brands.php:582
232
  msgid "View Brand"
233
  msgstr "Ver marca"
234
 
235
- #: classes/class-perfect-woocommerce-brands.php:583
236
  msgid "Update Brand"
237
  msgstr "Actualizar marca"
238
 
239
- #: classes/class-perfect-woocommerce-brands.php:584
240
  msgid "Add New Brand"
241
  msgstr "Añadir nueva marca"
242
 
243
- #: classes/class-perfect-woocommerce-brands.php:585
244
  msgid "New Brand Name"
245
  msgstr "Nuevo nombre de marca"
246
 
247
- #: classes/class-perfect-woocommerce-brands.php:586
248
  msgid "Parent Brand"
249
  msgstr "Marca Padre"
250
 
251
- #: classes/class-perfect-woocommerce-brands.php:587
252
  msgid "Parent Brand:"
253
  msgstr "Marca Padre:"
254
 
255
- #: classes/class-perfect-woocommerce-brands.php:588
256
  msgid "Search Brands"
257
  msgstr "Buscar Marcas"
258
 
259
- #: classes/class-perfect-woocommerce-brands.php:589
260
  msgid "Popular Brands"
261
  msgstr "Marcas Populares"
262
 
263
- #: classes/class-perfect-woocommerce-brands.php:590
264
  msgid "Separate brands with commas"
265
  msgstr "Separar marcas con comas"
266
 
267
- #: classes/class-perfect-woocommerce-brands.php:591
268
  msgid "Add or remove brands"
269
  msgstr "Añadir o eliminar marcas"
270
 
271
- #: classes/class-perfect-woocommerce-brands.php:592
272
  msgid "Choose from the most used brands"
273
  msgstr "Seleccionar de las marcas más utilizadas"
274
 
275
- #: classes/class-perfect-woocommerce-brands.php:593
276
  msgid "No brands found"
277
  msgstr "No se han encontrado marcas"
278
 
279
- #: classes/class-perfect-woocommerce-brands.php:637
280
- #: classes/class-perfect-woocommerce-brands.php:670
281
- #: classes/widgets/class-pwb-list.php:36
282
  msgid "Brand logo"
283
  msgstr "Logo de la marca"
284
 
285
- #: classes/class-perfect-woocommerce-brands.php:639
286
- #: classes/class-perfect-woocommerce-brands.php:645
287
- #: classes/class-perfect-woocommerce-brands.php:674
288
- #: classes/class-perfect-woocommerce-brands.php:694
289
  msgid "Select image"
290
  msgstr "Seleccionar imagen"
291
 
292
- #: classes/class-perfect-woocommerce-brands.php:643
293
- #: classes/class-perfect-woocommerce-brands.php:690
294
  msgid "Brand banner"
295
  msgstr "Banner de la marca"
296
 
297
- #: classes/class-perfect-woocommerce-brands.php:646
298
  msgid "This image will be shown on brand page"
299
  msgstr "Esta imagen se mostrará en la página de la marca"
300
 
301
- #: classes/class-perfect-woocommerce-brands.php:650
302
- #: classes/class-perfect-woocommerce-brands.php:710
303
  msgid "Brand banner link"
304
  msgstr "Enlace para el banner de la marca"
305
 
306
- #: classes/class-perfect-woocommerce-brands.php:652
307
- #: classes/class-perfect-woocommerce-brands.php:714
308
  msgid "This link should be relative to site url. Example: product/product-name"
309
  msgstr ""
310
  "Este enlace ha de ser relativo a la url del sitio web. Ejemplo: producto/"
311
  "nombre-del-producto"
312
 
313
- #: classes/class-perfect-woocommerce-brands.php:768
314
  msgid "Logo"
315
  msgstr "Logo"
316
 
317
- #: classes/class-perfect-woocommerce-brands.php:858
 
 
 
 
318
  msgid "No products found"
319
  msgstr "No se han encontrado productos"
320
 
321
- #: classes/class-pwb-admin-tab.php:72
322
- msgid "Brands settings"
323
- msgstr "Ajustes de las marcas"
324
-
325
- #: classes/class-pwb-admin-tab.php:78
326
- msgid "Slug"
327
- msgstr "Slug"
328
-
329
- #: classes/class-pwb-admin-tab.php:80
330
- msgid "Brands taxonomy slug"
331
- msgstr "Slug de la taxonomía marcas"
332
-
333
- #: classes/class-pwb-admin-tab.php:85
334
- msgid "Show brand description"
335
- msgstr "Mostrar descripción de la marca"
336
-
337
- #: classes/class-pwb-admin-tab.php:88
338
- msgid "Show brand description (if is set) on brand archive page"
339
- msgstr "Mostrar descripción de la marca en la página de archivo"
340
 
341
- #: classes/class-pwb-admin-tab.php:92
342
- msgid "Show brands in loop"
343
- msgstr "Mostrar marcas en el loop"
344
-
345
- #: classes/class-pwb-admin-tab.php:94
346
- msgid "Show brand logo (or name) in product loop"
347
- msgstr "Mostrar el logo de la marca (o el nombre) en el loop"
348
-
349
- #: classes/class-pwb-admin-tab.php:97 classes/class-pwb-admin-tab.php:109
350
- msgid "No"
351
- msgstr "No"
352
-
353
- #: classes/class-pwb-admin-tab.php:98 classes/class-pwb-admin-tab.php:110
354
- msgid "Show brand link"
355
- msgstr "Mostrar el link de la marca"
356
-
357
- #: classes/class-pwb-admin-tab.php:99 classes/class-pwb-admin-tab.php:111
358
- msgid "Show brand image (if is set)"
359
- msgstr "Mostrar el logo de la marca (si tiene uno asignado)"
360
-
361
- #: classes/class-pwb-admin-tab.php:103
362
- msgid "Show brands in single product"
363
- msgstr "Mostrar marcas en la página del producto"
364
-
365
- #: classes/class-pwb-admin-tab.php:105
366
- msgid "Show brand logo (or name) in single product"
367
- msgstr "Mostrar el logo de la marca (o el nombre) en la página del producto"
368
-
369
- #: classes/class-pwb-admin-tab.php:117
370
- msgid "Brand logo size for single product view"
371
- msgstr "Tamaño del logo para la vista individual de producto"
372
-
373
- #: classes/class-pwb-admin-tab.php:122
374
- msgid "Brand position"
375
- msgstr "Posición de la marca"
376
-
377
- #: classes/class-pwb-admin-tab.php:124
378
- msgid "For single product"
379
- msgstr "En la página individual de cada producto"
380
-
381
- #: classes/class-pwb-admin-tab.php:127
382
- msgid "Before title"
383
- msgstr "Antes del título"
384
-
385
- #: classes/class-pwb-admin-tab.php:128
386
- msgid "After title"
387
- msgstr "Después del título"
388
-
389
- #: classes/class-pwb-admin-tab.php:129
390
- msgid "After price"
391
- msgstr "Después del precio"
392
-
393
- #: classes/class-pwb-admin-tab.php:130
394
- msgid "After excerpt"
395
- msgstr "Después de la descripción corta"
396
-
397
- #: classes/class-pwb-admin-tab.php:131
398
- msgid "After add to cart"
399
- msgstr "Después del botón de comprar"
400
-
401
- #: classes/class-pwb-admin-tab.php:132
402
- msgid "After meta"
403
- msgstr "Después del meta"
404
-
405
- #: classes/class-pwb-admin-tab.php:133
406
- msgid "After sharing"
407
- msgstr "Después de compartir"
408
-
409
- #: classes/class-pwb-admin-tab.php:150
410
- msgid "Tools"
411
- msgstr "Herramientas"
412
-
413
- #: classes/class-pwb-admin-tab.php:156
414
- msgid "Import brands"
415
- msgstr "Importar marcas"
416
-
417
- #: classes/class-pwb-admin-tab.php:158
418
- msgid ""
419
- "Import brands from other brand plugin. <strong>Both plugins should be "
420
- "installed and active</strong>"
421
- msgstr ""
422
- "Importar marcas de otro plugin. <strong>Ambos plugins han de encontrarse "
423
- "instalados y activados</strong>"
424
-
425
- #: classes/class-pwb-admin-tab.php:161
426
- msgid "-"
427
- msgstr "-"
428
-
429
- #: classes/class-pwb-admin-tab.php:162
430
- msgid "YITH WooCommerce Brands Add-On"
431
- msgstr "YITH WooCommerce Brands Add-On"
432
-
433
- #: classes/shortcodes/class-pwb-all-brands.php:89
434
  msgid "First page"
435
  msgstr "Primera página"
436
 
437
- #: classes/shortcodes/class-pwb-all-brands.php:92
438
  msgid "Previous page"
439
  msgstr "Página anterior"
440
 
441
- #: classes/shortcodes/class-pwb-all-brands.php:96
442
  msgid "Next page"
443
  msgstr "Siguiente página"
444
 
445
- #: classes/shortcodes/class-pwb-all-brands.php:99
446
  msgid "Last page"
447
  msgstr "Última página"
448
 
449
- #: classes/shortcodes/class-pwb-all-brands.php:104
450
  msgid "No results"
451
  msgstr "No se han encontrado resultados"
452
 
@@ -463,7 +553,7 @@ msgid "Title"
463
  msgstr "Título"
464
 
465
  #: classes/widgets/class-pwb-dropdown.php:64
466
- #: classes/widgets/class-pwb-list.php:100
467
  msgid "There is not available brands"
468
  msgstr "No se encuentran marcas disponibles"
469
 
@@ -475,12 +565,12 @@ msgstr "Recomendado para las categorías de producto y la página de la tienda"
475
  msgid "Filter products by brand"
476
  msgstr "Filtrar productos por marca"
477
 
478
- #: classes/widgets/class-pwb-filter-by-brand.php:24
479
- #: classes/widgets/class-pwb-list.php:21
480
  msgid "Title:"
481
  msgstr "Título:"
482
 
483
- #: classes/widgets/class-pwb-filter-by-brand.php:117
484
  msgid "Apply filter"
485
  msgstr "Filtrar"
486
 
@@ -492,23 +582,23 @@ msgstr "Añade una lista de marcas a tu sitio"
492
  msgid "Brands list"
493
  msgstr "Lista de marcas"
494
 
495
- #: classes/widgets/class-pwb-list.php:30
496
  msgid "Display as:"
497
  msgstr "Mostrar como:"
498
 
499
- #: classes/widgets/class-pwb-list.php:35
500
  msgid "Brand name"
501
  msgstr "Nombre de la marca"
502
 
503
- #: classes/widgets/class-pwb-list.php:41
504
  msgid "Columns:"
505
  msgstr "Columnas:"
506
 
507
- #: classes/widgets/class-pwb-list.php:92 classes/widgets/class-pwb-list.php:94
508
  msgid "Go to"
509
  msgstr "Ir a"
510
 
511
- #: main.php:68
512
  msgid ""
513
  "Perfect WooCommerce Brands needs WooCommerce to run. Please, install and "
514
  "active WooCommerce plugin."
@@ -540,6 +630,13 @@ msgstr "Alberto de Vera Sevilla"
540
  msgid "https://profiles.wordpress.org/titodevera/"
541
  msgstr "https://profiles.wordpress.org/titodevera/"
542
 
 
 
 
 
 
 
 
543
  #~ msgid ""
544
  #~ "We are offering you maybe the best WooCommerce brands plugin completly "
545
  #~ "free. You can help us making Perfect WooCommerce Brands a bit better. "
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Perfect WooCommerce Brands\n"
4
+ "POT-Creation-Date: 2017-06-28 20:51+0200\n"
5
+ "PO-Revision-Date: 2017-06-28 20:53+0200\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: es_ES\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-Generator: Poedit 2.0.1\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-WPHeader: main.php\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
23
+ #: classes/admin/class-pwb-admin-tab.php:21
24
+ #: classes/class-perfect-woocommerce-brands.php:563
25
+ #: classes/class-perfect-woocommerce-brands.php:565
26
+ #: classes/widgets/class-pwb-dropdown.php:56
27
+ #: classes/widgets/class-pwb-filter-by-brand.php:17
28
+ #: classes/widgets/class-pwb-filter-by-brand.php:28
29
+ msgid "Brands"
30
+ msgstr "Marcas"
31
+
32
+ #: classes/admin/class-pwb-admin-tab.php:72
33
+ msgid "Brands settings"
34
+ msgstr "Ajustes de las marcas"
35
+
36
+ #: classes/admin/class-pwb-admin-tab.php:78
37
+ msgid "Slug"
38
+ msgstr "Slug"
39
+
40
+ #: classes/admin/class-pwb-admin-tab.php:81
41
+ msgid "Brands taxonomy slug"
42
+ msgstr "Slug de la taxonomía marcas"
43
+
44
+ #: classes/admin/class-pwb-admin-tab.php:86
45
+ msgid "Show brand description"
46
+ msgstr "Mostrar descripción de la marca"
47
+
48
+ #: classes/admin/class-pwb-admin-tab.php:89
49
+ msgid "Show brand description (if is set) on brand archive page"
50
+ msgstr "Mostrar descripción de la marca en la página de archivo"
51
+
52
+ #: classes/admin/class-pwb-admin-tab.php:93
53
+ msgid "Show brands in loop"
54
+ msgstr "Mostrar marcas en el loop"
55
+
56
+ #: classes/admin/class-pwb-admin-tab.php:96
57
+ msgid "Show brand logo (or name) in product loop"
58
+ msgstr "Mostrar el logo de la marca (o el nombre) en el loop"
59
+
60
+ #: classes/admin/class-pwb-admin-tab.php:99
61
+ #: classes/admin/class-pwb-admin-tab.php:112
62
+ msgid "No"
63
+ msgstr "No"
64
+
65
+ #: classes/admin/class-pwb-admin-tab.php:100
66
+ #: classes/admin/class-pwb-admin-tab.php:113
67
+ msgid "Show brand link"
68
+ msgstr "Mostrar el link de la marca"
69
+
70
+ #: classes/admin/class-pwb-admin-tab.php:101
71
+ #: classes/admin/class-pwb-admin-tab.php:114
72
+ msgid "Show brand image (if is set)"
73
+ msgstr "Mostrar el logo de la marca (si tiene uno asignado)"
74
+
75
+ #: classes/admin/class-pwb-admin-tab.php:105
76
+ msgid "Show brands in single product"
77
+ msgstr "Mostrar marcas en la página del producto"
78
+
79
+ #: classes/admin/class-pwb-admin-tab.php:108
80
+ msgid "Show brand logo (or name) in single product"
81
+ msgstr "Mostrar el logo de la marca (o el nombre) en la página del producto"
82
+
83
+ #: classes/admin/class-pwb-admin-tab.php:118
84
+ #: classes/class-perfect-woocommerce-brands.php:343
85
+ #: classes/class-perfect-woocommerce-brands.php:371
86
+ #: classes/class-perfect-woocommerce-brands.php:441
87
+ msgid "Brand logo size"
88
+ msgstr "Tamaño del logo de la marca"
89
+
90
+ #: classes/admin/class-pwb-admin-tab.php:121
91
+ msgid "Brand logo size for single product view"
92
+ msgstr "Tamaño del logo para la vista individual de producto"
93
+
94
+ #: classes/admin/class-pwb-admin-tab.php:126
95
+ msgid "Brand position"
96
+ msgstr "Posición de la marca"
97
+
98
+ #: classes/admin/class-pwb-admin-tab.php:129
99
+ msgid "For single product"
100
+ msgstr "En la página individual de cada producto"
101
+
102
+ #: classes/admin/class-pwb-admin-tab.php:132
103
+ msgid "Before title"
104
+ msgstr "Antes del título"
105
+
106
+ #: classes/admin/class-pwb-admin-tab.php:133
107
+ msgid "After title"
108
+ msgstr "Después del título"
109
+
110
+ #: classes/admin/class-pwb-admin-tab.php:134
111
+ msgid "After price"
112
+ msgstr "Después del precio"
113
+
114
+ #: classes/admin/class-pwb-admin-tab.php:135
115
+ msgid "After excerpt"
116
+ msgstr "Después de la descripción corta"
117
+
118
+ #: classes/admin/class-pwb-admin-tab.php:136
119
+ msgid "After add to cart"
120
+ msgstr "Después del botón de comprar"
121
+
122
+ #: classes/admin/class-pwb-admin-tab.php:137
123
+ msgid "After meta"
124
+ msgstr "Después del meta"
125
+
126
+ #: classes/admin/class-pwb-admin-tab.php:138
127
+ msgid "After sharing"
128
+ msgstr "Después de compartir"
129
+
130
+ #: classes/admin/class-pwb-admin-tab.php:155
131
+ msgid "Tools"
132
+ msgstr "Herramientas"
133
+
134
+ #: classes/admin/class-pwb-admin-tab.php:161
135
+ msgid "Import brands"
136
+ msgstr "Importar marcas"
137
+
138
+ #: classes/admin/class-pwb-admin-tab.php:165
139
+ #, php-format
140
+ msgid ""
141
+ "Import brands from other brand plugin. <a href=\"%s\" target=\"_blank"
142
+ "\">Click here for more details</a>"
143
+ msgstr ""
144
+ "Importar marcas de producto de otro plugin de marcas. <a href=\"%s\" target="
145
+ "\"_blank\">Pulsa aquí para ver la documentación</a>"
146
+
147
+ #: classes/admin/class-pwb-admin-tab.php:170
148
+ #: classes/admin/class-pwb-admin-tab.php:182
149
+ msgid "-"
150
+ msgstr "-"
151
+
152
+ #: classes/admin/class-pwb-admin-tab.php:171
153
+ msgid "YITH WooCommerce Brands Add-On"
154
+ msgstr "YITH WooCommerce Brands Add-On"
155
+
156
+ #: classes/admin/class-pwb-admin-tab.php:172
157
+ msgid "Ultimate WooCommerce Brands"
158
+ msgstr "Ultimate WooCommerce Brands"
159
+
160
+ #: classes/admin/class-pwb-admin-tab.php:176
161
+ msgid "Dummy data"
162
+ msgstr "Datos ficticios"
163
+
164
+ #: classes/admin/class-pwb-admin-tab.php:179
165
+ msgid "Import generic brands and assign it to products randomly"
166
+ msgstr ""
167
+ "Importar marcas genéricas y asignarlas a los productos existentes de forma "
168
+ "aleatoria"
169
+
170
+ #: classes/admin/class-pwb-admin-tab.php:183
171
+ msgid "Start import"
172
+ msgstr "Comenzar importación"
173
+
174
+ #: classes/admin/class-pwb-admin-tab.php:187
175
+ msgid "System status"
176
+ msgstr "Estado del sistema"
177
+
178
+ #: classes/admin/class-pwb-admin-tab.php:189
179
+ msgid "Show system status"
180
+ msgstr "Ver estado del sistema"
181
+
182
+ #: classes/admin/class-pwb-coupon.php:22
183
+ msgid "Brands restriction"
184
+ msgstr "Restricciones de marca"
185
+
186
+ #: classes/admin/class-pwb-coupon.php:23
187
+ msgid "Any brand"
188
+ msgstr "Cualquier marca"
189
+
190
+ #: classes/admin/class-pwb-coupon.php:32
191
+ msgid ""
192
+ "Coupon will be valid if there are at least one product of this brands in the "
193
+ "cart"
194
+ msgstr ""
195
+ "El cupón será válido si existe al menos un producto de la marca señalada en "
196
+ "el carrito"
197
+
198
  #: classes/class-perfect-woocommerce-brands.php:47
199
  msgid ""
200
  "We are offering you maybe the best WooCommerce brands plugin completely "
232
  msgid "Settings"
233
  msgstr "Ajustes"
234
 
235
+ #: classes/class-perfect-woocommerce-brands.php:240
236
  msgid "PWB Product carousel"
237
  msgstr "PWB Carrusel de productos"
238
 
239
+ #: classes/class-perfect-woocommerce-brands.php:241
240
  msgid "Product carousel by brand or by category"
241
  msgstr "Carrusel de productos por marca o categoría"
242
 
243
+ #: classes/class-perfect-woocommerce-brands.php:249
244
+ #: classes/class-perfect-woocommerce-brands.php:564
245
  msgid "Brand"
246
  msgstr "Marca"
247
 
248
+ #: classes/class-perfect-woocommerce-brands.php:257
249
  msgid "Products"
250
  msgstr "Productos"
251
 
252
+ #: classes/class-perfect-woocommerce-brands.php:260
253
  msgid "Number of products to load"
254
  msgstr "Número de productos que cargar"
255
 
256
+ #: classes/class-perfect-woocommerce-brands.php:265
257
  msgid "Products to show"
258
  msgstr "Productos a mostrar"
259
 
260
+ #: classes/class-perfect-woocommerce-brands.php:268
261
  msgid "Number of products to show"
262
  msgstr "Número de productos que mostrar"
263
 
264
+ #: classes/class-perfect-woocommerce-brands.php:273
265
  msgid "Products to scroll"
266
  msgstr "Número de productos por scroll"
267
 
268
+ #: classes/class-perfect-woocommerce-brands.php:276
269
  msgid "Number of products to scroll"
270
  msgstr "Número de productos por cada scroll"
271
 
272
+ #: classes/class-perfect-woocommerce-brands.php:281
273
+ #: classes/class-perfect-woocommerce-brands.php:330
274
  msgid "Autoplay"
275
  msgstr "Modo automático"
276
 
277
+ #: classes/class-perfect-woocommerce-brands.php:283
278
+ #: classes/class-perfect-woocommerce-brands.php:332
279
  msgid "Autoplay carousel"
280
  msgstr "Modo automático para el carrusel"
281
 
282
+ #: classes/class-perfect-woocommerce-brands.php:288
283
+ #: classes/class-perfect-woocommerce-brands.php:337
284
  msgid "Arrows"
285
  msgstr "Flechas de navegación"
286
 
287
+ #: classes/class-perfect-woocommerce-brands.php:290
288
+ #: classes/class-perfect-woocommerce-brands.php:339
289
  msgid "Display prev and next arrows"
290
  msgstr "Mostrar flechas de navegación"
291
 
292
+ #: classes/class-perfect-woocommerce-brands.php:296
293
  msgid "PWB Brands carousel"
294
  msgstr "PWB Carrusel de marcas"
295
 
296
+ #: classes/class-perfect-woocommerce-brands.php:297
297
  msgid "Brands carousel"
298
  msgstr "Carrusel de marcas"
299
 
300
+ #: classes/class-perfect-woocommerce-brands.php:306
301
  msgid "Items"
302
  msgstr "Elementos"
303
 
304
+ #: classes/class-perfect-woocommerce-brands.php:309
305
  msgid "Number of items to load"
306
  msgstr "Número de elementos que cargar"
307
 
308
+ #: classes/class-perfect-woocommerce-brands.php:314
309
  msgid "Items to show"
310
  msgstr "Elementos a mostrar"
311
 
312
+ #: classes/class-perfect-woocommerce-brands.php:317
313
  msgid "Number of items to show"
314
  msgstr "Número de elementos a mostrar"
315
 
316
+ #: classes/class-perfect-woocommerce-brands.php:322
317
  msgid "Items to scroll"
318
  msgstr "Número de elementos por scroll"
319
 
320
+ #: classes/class-perfect-woocommerce-brands.php:325
321
  msgid "Number of items to scroll"
322
  msgstr "Número de elementos por cada scroll"
323
 
324
+ #: classes/class-perfect-woocommerce-brands.php:354
 
 
 
 
 
 
 
325
  msgid "PWB All brands"
326
  msgstr "PWB Todas las marcas"
327
 
328
+ #: classes/class-perfect-woocommerce-brands.php:355
329
  msgid "Show all brands"
330
  msgstr "Mostrar todas las marcas"
331
 
332
+ #: classes/class-perfect-woocommerce-brands.php:364
333
  msgid "Brands per page"
334
  msgstr "Marcas por página"
335
 
336
+ #: classes/class-perfect-woocommerce-brands.php:367
337
  msgid "Show x brands per page"
338
  msgstr "Mostrar x marcas por página"
339
 
340
+ #: classes/class-perfect-woocommerce-brands.php:378
341
+ msgid "Order by"
342
+ msgstr "Ordenar por"
343
+
344
+ #: classes/class-perfect-woocommerce-brands.php:392
345
+ msgid "Order"
346
+ msgstr "Orden"
347
+
348
+ #: classes/class-perfect-woocommerce-brands.php:402
349
+ msgid "Title position"
350
+ msgstr "Posición del título"
351
+
352
+ #: classes/class-perfect-woocommerce-brands.php:406
353
+ msgid "Before image"
354
+ msgstr "Antes de la imagen"
355
+
356
+ #: classes/class-perfect-woocommerce-brands.php:407
357
+ msgid "After image"
358
+ msgstr "Después de la imagen"
359
+
360
+ #: classes/class-perfect-woocommerce-brands.php:413
361
  msgid "Hide empty"
362
  msgstr "Ocultar vacías"
363
 
364
+ #: classes/class-perfect-woocommerce-brands.php:415
365
  msgid "Hide brands that have not been assigned to any product"
366
  msgstr "Ocultar marcas que no han sido asignadas a ningún producto"
367
 
368
+ #: classes/class-perfect-woocommerce-brands.php:423
369
  msgid "PWB brand"
370
  msgstr "PWB Marca"
371
 
372
+ #: classes/class-perfect-woocommerce-brands.php:424
373
  msgid "Show brand for a specific product"
374
  msgstr "Ver marcas de un producto específico"
375
 
376
+ #: classes/class-perfect-woocommerce-brands.php:434
377
  msgid "Product id"
378
  msgstr "Id del producto"
379
 
380
+ #: classes/class-perfect-woocommerce-brands.php:437
381
  msgid "Product id (post id)"
382
  msgstr "Id del producto (id del post)"
383
 
384
+ #: classes/class-perfect-woocommerce-brands.php:480
385
+ #: classes/class-perfect-woocommerce-brands.php:482
386
+ #: classes/shortcodes/class-pwb-all-brands.php:90
387
  #: classes/shortcodes/class-pwb-brand.php:29
388
  #: classes/shortcodes/class-pwb-brand.php:31
389
+ #: classes/shortcodes/class-pwb-carousel.php:50
390
  msgid "View brand"
391
  msgstr "Ver marca"
392
 
393
+ #: classes/class-perfect-woocommerce-brands.php:552
394
  msgid "¿Start migration?"
395
  msgstr "¿Comenzar la migración?"
396
 
397
+ #: classes/class-perfect-woocommerce-brands.php:553
398
  msgid ""
399
  "We are migrating the product brands. ¡Don´t close this window until the "
400
  "process is finished!"
402
  "Estamos migrando las marcas de producto. ¡No cierres esta ventana hasta que "
403
  "el proceso finalice!"
404
 
405
+ #: classes/class-perfect-woocommerce-brands.php:554
406
+ msgid "¿Start loading dummy data?"
407
+ msgstr "¿Comenzar con la importación?"
408
+
409
+ #: classes/class-perfect-woocommerce-brands.php:555
410
+ msgid ""
411
+ "We are importing the dummy data. ¡Don´t close this window until the process "
412
+ "is finished!"
413
+ msgstr ""
414
+ "En este momento estamos importando las marcas ficticias. ¡No cierre esta "
415
+ "ventana hasta que termine el proceso!"
416
 
417
+ #: classes/class-perfect-woocommerce-brands.php:566
418
  msgid "All Brands"
419
  msgstr "Todas las marcas"
420
 
421
+ #: classes/class-perfect-woocommerce-brands.php:567
422
  msgid "Edit Brand"
423
  msgstr "Editar marca"
424
 
425
+ #: classes/class-perfect-woocommerce-brands.php:568
426
  msgid "View Brand"
427
  msgstr "Ver marca"
428
 
429
+ #: classes/class-perfect-woocommerce-brands.php:569
430
  msgid "Update Brand"
431
  msgstr "Actualizar marca"
432
 
433
+ #: classes/class-perfect-woocommerce-brands.php:570
434
  msgid "Add New Brand"
435
  msgstr "Añadir nueva marca"
436
 
437
+ #: classes/class-perfect-woocommerce-brands.php:571
438
  msgid "New Brand Name"
439
  msgstr "Nuevo nombre de marca"
440
 
441
+ #: classes/class-perfect-woocommerce-brands.php:572
442
  msgid "Parent Brand"
443
  msgstr "Marca Padre"
444
 
445
+ #: classes/class-perfect-woocommerce-brands.php:573
446
  msgid "Parent Brand:"
447
  msgstr "Marca Padre:"
448
 
449
+ #: classes/class-perfect-woocommerce-brands.php:574
450
  msgid "Search Brands"
451
  msgstr "Buscar Marcas"
452
 
453
+ #: classes/class-perfect-woocommerce-brands.php:575
454
  msgid "Popular Brands"
455
  msgstr "Marcas Populares"
456
 
457
+ #: classes/class-perfect-woocommerce-brands.php:576
458
  msgid "Separate brands with commas"
459
  msgstr "Separar marcas con comas"
460
 
461
+ #: classes/class-perfect-woocommerce-brands.php:577
462
  msgid "Add or remove brands"
463
  msgstr "Añadir o eliminar marcas"
464
 
465
+ #: classes/class-perfect-woocommerce-brands.php:578
466
  msgid "Choose from the most used brands"
467
  msgstr "Seleccionar de las marcas más utilizadas"
468
 
469
+ #: classes/class-perfect-woocommerce-brands.php:579
470
  msgid "No brands found"
471
  msgstr "No se han encontrado marcas"
472
 
473
+ #: classes/class-perfect-woocommerce-brands.php:623
474
+ #: classes/class-perfect-woocommerce-brands.php:656
475
+ #: classes/widgets/class-pwb-list.php:39
476
  msgid "Brand logo"
477
  msgstr "Logo de la marca"
478
 
479
+ #: classes/class-perfect-woocommerce-brands.php:625
480
+ #: classes/class-perfect-woocommerce-brands.php:631
481
+ #: classes/class-perfect-woocommerce-brands.php:660
482
+ #: classes/class-perfect-woocommerce-brands.php:680
483
  msgid "Select image"
484
  msgstr "Seleccionar imagen"
485
 
486
+ #: classes/class-perfect-woocommerce-brands.php:629
487
+ #: classes/class-perfect-woocommerce-brands.php:676
488
  msgid "Brand banner"
489
  msgstr "Banner de la marca"
490
 
491
+ #: classes/class-perfect-woocommerce-brands.php:632
492
  msgid "This image will be shown on brand page"
493
  msgstr "Esta imagen se mostrará en la página de la marca"
494
 
495
+ #: classes/class-perfect-woocommerce-brands.php:636
496
+ #: classes/class-perfect-woocommerce-brands.php:696
497
  msgid "Brand banner link"
498
  msgstr "Enlace para el banner de la marca"
499
 
500
+ #: classes/class-perfect-woocommerce-brands.php:638
501
+ #: classes/class-perfect-woocommerce-brands.php:700
502
  msgid "This link should be relative to site url. Example: product/product-name"
503
  msgstr ""
504
  "Este enlace ha de ser relativo a la url del sitio web. Ejemplo: producto/"
505
  "nombre-del-producto"
506
 
507
+ #: classes/class-perfect-woocommerce-brands.php:754
508
  msgid "Logo"
509
  msgstr "Logo"
510
 
511
+ #: classes/class-perfect-woocommerce-brands.php:794
512
+ msgid "All"
513
+ msgstr "Todas"
514
+
515
+ #: classes/class-perfect-woocommerce-brands.php:849
516
  msgid "No products found"
517
  msgstr "No se han encontrado productos"
518
 
519
+ #: classes/class-pwb-api-support.php:46
520
+ msgid "Product brands"
521
+ msgstr "Marcas del producto"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
522
 
523
+ #: classes/shortcodes/class-pwb-all-brands.php:111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  msgid "First page"
525
  msgstr "Primera página"
526
 
527
+ #: classes/shortcodes/class-pwb-all-brands.php:114
528
  msgid "Previous page"
529
  msgstr "Página anterior"
530
 
531
+ #: classes/shortcodes/class-pwb-all-brands.php:118
532
  msgid "Next page"
533
  msgstr "Siguiente página"
534
 
535
+ #: classes/shortcodes/class-pwb-all-brands.php:121
536
  msgid "Last page"
537
  msgstr "Última página"
538
 
539
+ #: classes/shortcodes/class-pwb-all-brands.php:126
540
  msgid "No results"
541
  msgstr "No se han encontrado resultados"
542
 
553
  msgstr "Título"
554
 
555
  #: classes/widgets/class-pwb-dropdown.php:64
556
+ #: classes/widgets/class-pwb-list.php:105
557
  msgid "There is not available brands"
558
  msgstr "No se encuentran marcas disponibles"
559
 
565
  msgid "Filter products by brand"
566
  msgstr "Filtrar productos por marca"
567
 
568
+ #: classes/widgets/class-pwb-filter-by-brand.php:20
569
+ #: classes/widgets/class-pwb-list.php:24
570
  msgid "Title:"
571
  msgstr "Título:"
572
 
573
+ #: classes/widgets/class-pwb-filter-by-brand.php:114
574
  msgid "Apply filter"
575
  msgstr "Filtrar"
576
 
582
  msgid "Brands list"
583
  msgstr "Lista de marcas"
584
 
585
+ #: classes/widgets/class-pwb-list.php:33
586
  msgid "Display as:"
587
  msgstr "Mostrar como:"
588
 
589
+ #: classes/widgets/class-pwb-list.php:38
590
  msgid "Brand name"
591
  msgstr "Nombre de la marca"
592
 
593
+ #: classes/widgets/class-pwb-list.php:44
594
  msgid "Columns:"
595
  msgstr "Columnas:"
596
 
597
+ #: classes/widgets/class-pwb-list.php:97 classes/widgets/class-pwb-list.php:99
598
  msgid "Go to"
599
  msgstr "Ir a"
600
 
601
+ #: main.php:87
602
  msgid ""
603
  "Perfect WooCommerce Brands needs WooCommerce to run. Please, install and "
604
  "active WooCommerce plugin."
630
  msgid "https://profiles.wordpress.org/titodevera/"
631
  msgstr "https://profiles.wordpress.org/titodevera/"
632
 
633
+ #~ msgid ""
634
+ #~ "Import brands from other brand plugin. <strong>Both plugins should be "
635
+ #~ "installed and active</strong>"
636
+ #~ msgstr ""
637
+ #~ "Importar marcas de otro plugin. <strong>Ambos plugins han de encontrarse "
638
+ #~ "instalados y activados</strong>"
639
+
640
  #~ msgid ""
641
  #~ "We are offering you maybe the best WooCommerce brands plugin completly "
642
  #~ "free. You can help us making Perfect WooCommerce Brands a bit better. "
main.php CHANGED
@@ -3,14 +3,14 @@
3
  Plugin Name: Perfect WooCommerce Brands
4
  Plugin URI: https://wordpress.org/plugins/perfect-woocommerce-brands/
5
  Description: Perfect WooCommerce Brands allows you to show product brands in your WooCommerce based store.
6
- Version: 1.4.5
7
  Author: Alberto de Vera Sevilla
8
  Author URI: https://profiles.wordpress.org/titodevera/
9
  Text Domain: perfect-woocommerce-brands
10
  Domain Path: /lang
11
  License: GPL3
12
 
13
- Perfect WooCommerce Brands version 1.4.5, Copyright (C) 2016 Alberto de Vera Sevilla
14
 
15
  Perfect WooCommerce Brands is free software: you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
@@ -35,7 +35,9 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
35
  define( 'PWB_PLUGIN', plugins_url( '', __FILE__ ) );
36
  define( 'PWB_PLUGIN_PATH', plugin_basename( dirname( __FILE__ ) ) );
37
  define( 'PWB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
38
- define( 'PWB_PLUGIN_VERSION', '1.4.5' );
 
 
39
 
40
  //clean brands slug on plugin deactivation
41
  register_deactivation_hook( __FILE__, function(){
@@ -58,10 +60,27 @@ if( is_plugin_active( 'woocommerce/woocommerce.php' ) ){
58
  require 'classes/shortcodes/class-pwb-all-brands.php';
59
  require 'classes/shortcodes/class-pwb-brand.php';
60
  require 'classes/class-perfect-woocommerce-brands.php';
61
- require 'classes/class-pwb-admin-tab.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
  new \Perfect_Woocommerce_Brands\Perfect_Woocommerce_Brands();
64
 
 
65
  }elseif( is_admin() ){
66
 
67
  add_action( 'admin_notices', function() {
3
  Plugin Name: Perfect WooCommerce Brands
4
  Plugin URI: https://wordpress.org/plugins/perfect-woocommerce-brands/
5
  Description: Perfect WooCommerce Brands allows you to show product brands in your WooCommerce based store.
6
+ Version: 1.5
7
  Author: Alberto de Vera Sevilla
8
  Author URI: https://profiles.wordpress.org/titodevera/
9
  Text Domain: perfect-woocommerce-brands
10
  Domain Path: /lang
11
  License: GPL3
12
 
13
+ Perfect WooCommerce Brands version 1.5, Copyright (C) 2016 Alberto de Vera Sevilla
14
 
15
  Perfect WooCommerce Brands is free software: you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
35
  define( 'PWB_PLUGIN', plugins_url( '', __FILE__ ) );
36
  define( 'PWB_PLUGIN_PATH', plugin_basename( dirname( __FILE__ ) ) );
37
  define( 'PWB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
38
+ define( 'PWB_PLUGIN_VERSION', '1.5' );
39
+ define( 'PWB_WP_VERSION', get_bloginfo( 'version' ) );
40
+ define( 'PWB_WC_VERSION', get_option( 'woocommerce_version' ) );
41
 
42
  //clean brands slug on plugin deactivation
43
  register_deactivation_hook( __FILE__, function(){
60
  require 'classes/shortcodes/class-pwb-all-brands.php';
61
  require 'classes/shortcodes/class-pwb-brand.php';
62
  require 'classes/class-perfect-woocommerce-brands.php';
63
+
64
+ if( defined('PWB_WC_VERSION') && version_compare( PWB_WC_VERSION, '2.6', '>=' ) ){
65
+ require 'classes/class-pwb-api-support.php';
66
+ new PWB_API_Support();
67
+ require 'classes/admin/class-pwb-coupon.php';
68
+ new Admin\PWB_Coupon();
69
+ }
70
+
71
+ if( is_admin() ){
72
+ require 'classes/admin/class-pwb-system-status.php';
73
+ new Admin\PWB_System_Status();
74
+ require 'classes/admin/class-pwb-admin-tab.php';
75
+ require 'classes/admin/class-pwb-migrate.php';
76
+ new Admin\PWB_Migrate();
77
+ require 'classes/admin/class-pwb-dummy-data.php';
78
+ new Admin\PWB_Dummy_Data();
79
+ }
80
 
81
  new \Perfect_Woocommerce_Brands\Perfect_Woocommerce_Brands();
82
 
83
+
84
  }elseif( is_admin() ){
85
 
86
  add_action( 'admin_notices', function() {
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: titodevera
3
  Donate link: mailto:hola@albertodevera.es
4
  Tags: woocommerce, brands, brand taxonomy, product brands, woocommerce manufacturer, woocommerce supplier, e-commerce
5
  Requires at least: 4.4
6
- Tested up to: 4.7.3
7
- Stable tag: 1.4.5
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.en.html
10
 
@@ -26,18 +26,20 @@ With this extension you can add product brands to your WooCommerce site.
26
  > * Assign brands to products
27
  > * Associate a banner and a link to each brand
28
  > * Translation-ready (English and Spanish included)
 
 
 
29
  > * Shortcode: Display all brands
30
  > * Shortcode: Display brands carousel
31
  > * Shortcode: Display product carousel by brand
32
  > * Shortcode: Display brands for a specific product
33
- > * Visual Composer support
34
  > * Widget: Display brands as dropdown
35
  > * Widget: Display brands as list (brand names or brand logos)
36
  > * Widget: Filter products by brand
37
- > * Import brands from other brands plugins
38
- > * Minimalist design and fully responsive
39
- > * Very lightweight
40
  > * Customizable brands slug
 
 
 
41
  > * And much more!
42
 
43
 
@@ -54,11 +56,10 @@ Yes, of course. This plugin is 100% free. No ads, no premium version exists.
54
  Go to `WooCommerce/Settings/` and click on `Brands` tab
55
 
56
  = How can i use the available shortcodes without Visual Composer? =
57
- There are four shortcodes available:
58
- > * Display all brands: [pwb-all-brands per_page="10" image_size="thumbnail" hide_empty="false"]
59
- > * Display brands carousel: [pwb-carousel items="10" items_to_show="5" items_to_scroll="1" image_size="thumbnail" autoplay="true" arrows="true"]
60
- > * Display product carousel by brand: [pwb-product-carousel brand="all" products="10" products_to_show="4" products_to_scroll="2" image_size="" items_to_show="2" autoplay="true" arrows="true"]
61
- > * Display brands for a specific product: [pwb-brand product_id="5" image_size="thumbnail"]
62
 
63
 
64
  == Screenshots ==
@@ -70,6 +71,21 @@ There are four shortcodes available:
70
 
71
 
72
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  = 1.4.5 =
74
  * Fix carousel shortcodes bugs
75
  * WooCommerce 2.7 support
3
  Donate link: mailto:hola@albertodevera.es
4
  Tags: woocommerce, brands, brand taxonomy, product brands, woocommerce manufacturer, woocommerce supplier, e-commerce
5
  Requires at least: 4.4
6
+ Tested up to: 4.8
7
+ Stable tag: 1.5
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.en.html
10
 
26
  > * Assign brands to products
27
  > * Associate a banner and a link to each brand
28
  > * Translation-ready (English and Spanish included)
29
+ > * Visual Composer support
30
+ > * Minimalist design and fully responsive
31
+ > * Very lightweight
32
  > * Shortcode: Display all brands
33
  > * Shortcode: Display brands carousel
34
  > * Shortcode: Display product carousel by brand
35
  > * Shortcode: Display brands for a specific product
 
36
  > * Widget: Display brands as dropdown
37
  > * Widget: Display brands as list (brand names or brand logos)
38
  > * Widget: Filter products by brand
 
 
 
39
  > * Customizable brands slug
40
+ > * Show the brands in products loop
41
+ > * Import brands (migrate) from other brands plugins
42
+ > * Dummy data installer (logos by heroturko)
43
  > * And much more!
44
 
45
 
56
  Go to `WooCommerce/Settings/` and click on `Brands` tab
57
 
58
  = How can i use the available shortcodes without Visual Composer? =
59
+ [Click here](https://github.com/titodevera/perfect-woocommerce-brands/wiki/How-can-i-use-the-available-shortcodes-without-Visual-Composer%3F)
60
+
61
+ = How to import brands from other brands plugin? =
62
+ [Click here](https://github.com/titodevera/perfect-woocommerce-brands/wiki/How-to-import-brands-from-other-brands-plugin)
 
63
 
64
 
65
  == Screenshots ==
71
 
72
 
73
  == Changelog ==
74
+ = 1.5 =
75
+ * Feature (Tool): Install dummy data (generate generic brands and assigns them to available products randomly)
76
+ * Feature: Restrict coupon by brands
77
+ * Feature: Get system status details for a better plugin support
78
+ * Feature: Import brands from "Ultimate WooCommerce Brands"
79
+ * Dev: 'pwb_before_single_product_brands' and 'pwb_after_single_product_brands' hooks added
80
+ * Dev: Basic WordPress REST API support
81
+ * Enhancement: Better HTML markup for the brand banner and the brand description for the archive product page
82
+ * Enhancement: Brands importer improvements
83
+ * Enhancement: New params for "pwb-all-brands" shortcode
84
+ * Fix: The brand description is appearing twice
85
+ * Fix: Product filter widget does not seems to work in product category page (thanks hassandad)
86
+ * Fix: Support for php 5.3 again
87
+ * Fix: Removed ES6 code from admin for better browser support
88
+ * Other minor bug fixes and code improvements
89
  = 1.4.5 =
90
  * Fix carousel shortcodes bugs
91
  * WooCommerce 2.7 support