CTX Feed – WooCommerce Product Feed Manager Plugin - Version 3.5.7

Version Description

(2020-05-26) = * Added: Bestprice template added.

Download this release

Release Info

Developer wahid0003
Plugin Icon 128x128 CTX Feed – WooCommerce Product Feed Manager Plugin
Version 3.5.7
Comparing to
See all releases

Code changes from version 3.5.6 to 3.5.7

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags:product feed,woocommerce product feed,google shopping feed,google shopping,
5
  Requires at least: 3.6
6
  Tested Up To: 5.4
7
  Requires PHP: 5.6
8
- Stable tag: 3.5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -305,6 +305,9 @@ Using pro version:
305
 
306
  == Changelog ==
307
 
 
 
 
308
  = 3.5.6 (2020-05-23) =
309
  * Fix: Skroutz template items wrapper and availability issue fixed.
310
  * Added: Dashboard widget.
5
  Requires at least: 3.6
6
  Tested Up To: 5.4
7
  Requires PHP: 5.6
8
+ Stable tag: 3.5.7
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
305
 
306
  == Changelog ==
307
 
308
+ = 3.5.7 (2020-05-26) =
309
+ * Added: Bestprice template added.
310
+
311
  = 3.5.6 (2020-05-23) =
312
  * Fix: Skroutz template items wrapper and availability issue fixed.
313
  * Added: Dashboard widget.
admin/partials/templates/bestprice.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <mywebstore>
3
+ <date>{DateTimeNow}</date>
4
+ <products>
5
+ {separator}
6
+ </products>
7
+ </mywebstore>
includes/classes/class-woo-feed-default-attributes.php CHANGED
@@ -685,7 +685,35 @@ class Woo_Feed_Default_Attributes {
685
  'weight' => 'Weight',
686
  ];
687
  }
688
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
689
  /**
690
  * Daisycon Attribute List
691
  *
685
  'weight' => 'Weight',
686
  ];
687
  }
688
+ /**
689
+ * BestPrice Attribute List
690
+ *
691
+ * @return array
692
+ */
693
+ public function bestpriceAttributes() {
694
+ return [
695
+ '--1' => 'Required Attributes',
696
+ 'productId' => 'Product ID[productId]',
697
+ 'name' => 'Product Title[name]',
698
+ 'description' => 'Product Description[description]',
699
+ 'link' => 'Product Link[link]',
700
+ 'image' => 'Image Link[image]',
701
+ 'categoryPath' => 'Category Path[categoryPath]',
702
+ 'categoryID' => 'Category Id[categoryID]',
703
+ 'price' => 'Price[price]',
704
+ 'manufacturer' => 'Manufacturer[manufacturer]',
705
+ 'mpn' => 'MPN / ISBN',
706
+ 'availability' => 'Availability',
707
+ '---1' => 'Recommended Attributes',
708
+ 'instock' => 'Stock Status[instock]',
709
+ 'ean' => 'EAN/Barcode',
710
+ 'additional_image' => 'Additional Image Link',
711
+ 'color' => 'Color',
712
+ 'size' => 'Size',
713
+ 'weight' => 'Weight',
714
+ 'features' => 'Features',
715
+ ];
716
+ }
717
  /**
718
  * Daisycon Attribute List
719
  *
includes/classes/class-woo-feed-dropdown.php CHANGED
@@ -410,7 +410,23 @@ class Woo_Feed_Dropdown {
410
  }
411
  return $options;
412
  }
413
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  /**
415
  * Daisycon Advertiser (General) Attribute list
416
  *
410
  }
411
  return $options;
412
  }
413
+
414
+ /**
415
+ * Best Price Attribute list
416
+ *
417
+ * @param string $selected
418
+ *
419
+ * @return string
420
+ */
421
+ public function bestpriceAttributesDropdown( $selected = '' ) {
422
+ $options = $this->get_cached_dropdown( 'bestpriceAttributesDropdown', $selected );
423
+ if ( false === $options ) {
424
+ $attributes = new Woo_Feed_Default_Attributes();
425
+ $options = $this->cache_dropdown( 'bestpriceAttributesDropdown', $attributes->bestpriceAttributes(), $selected );
426
+ }
427
+ return $options;
428
+ }
429
+
430
  /**
431
  * Daisycon Advertiser (General) Attribute list
432
  *
includes/classes/class-woo-feed-merchant.php CHANGED
@@ -349,6 +349,7 @@ class Woo_Feed_Merchant {
349
  'avantlink' => esc_html__( 'Avantlink', 'woo-feed' ),
350
  'become' => esc_html__( 'Become', 'woo-feed' ),
351
  'beslist.nl' => esc_html__( 'Beslist.nl', 'woo-feed' ),
 
352
  'billiger.de' => esc_html__( 'Billiger.de', 'woo-feed' ),
353
  'bol' => esc_html__( 'Bol.com', 'woo-feed' ),
354
  'bonanza' => esc_html__( 'Bonanza', 'woo-feed' ),
349
  'avantlink' => esc_html__( 'Avantlink', 'woo-feed' ),
350
  'become' => esc_html__( 'Become', 'woo-feed' ),
351
  'beslist.nl' => esc_html__( 'Beslist.nl', 'woo-feed' ),
352
+ 'bestprice' => esc_html__( 'Bestprice', 'woo-feed' ),
353
  'billiger.de' => esc_html__( 'Billiger.de', 'woo-feed' ),
354
  'bol' => esc_html__( 'Bol.com', 'woo-feed' ),
355
  'bonanza' => esc_html__( 'Bonanza', 'woo-feed' ),
includes/feeds/merchant_infos.php CHANGED
@@ -152,6 +152,9 @@ return array(
152
  ),
153
  'feed_file_type' => array( 'XML' ),
154
  ),
 
 
 
155
  'google_shopping_action' => array(
156
  'link' => 'https://support.google.com/merchants/answer/9111285',
157
  'video' => '',
@@ -352,6 +355,6 @@ return array(
352
  ), // Daisycon Advertiser: Work & Jobs
353
  'spartoo.fi' => array(
354
  'feed_file_type' => array( 'CSV' ),
355
- ), // Daisycon Advertiser: Work & Jobs
356
  );
357
  // End of file merchant_infos.php
152
  ),
153
  'feed_file_type' => array( 'XML' ),
154
  ),
155
+ 'bestprice' => array(
156
+ 'feed_file_type' => array( 'XML' ),
157
+ ),
158
  'google_shopping_action' => array(
159
  'link' => 'https://support.google.com/merchants/answer/9111285',
160
  'video' => '',
355
  ), // Daisycon Advertiser: Work & Jobs
356
  'spartoo.fi' => array(
357
  'feed_file_type' => array( 'CSV' ),
358
+ ),
359
  );
360
  // End of file merchant_infos.php
includes/feeds/merchant_templates.php CHANGED
@@ -3482,46 +3482,98 @@ return array(
3482
  '',
3483
  ),
3484
  ),
3485
- 'skroutz' => array(
3486
- 'mattributes' => array(
3487
- 'id',
3488
- 'name',
3489
- 'description',
3490
- 'link',
3491
- 'image',
3492
- 'category',
3493
- 'price_with_vat',
3494
- 'mpn',
3495
- 'manufacturer',
3496
- ),
3497
- 'prefix' => array( '', '', '', '', '', '', '', '', '' ),
3498
- 'type' => array(
3499
- 'attribute',
3500
- 'attribute',
3501
- 'attribute',
3502
- 'attribute',
3503
- 'attribute',
3504
- 'attribute',
3505
- 'attribute',
3506
- 'attribute',
3507
- 'pattern',
3508
- ),
3509
- 'attributes' => array(
3510
- 'id',
3511
- 'title',
3512
- 'description',
3513
- 'link',
3514
- 'image',
3515
- 'product_type',
3516
- 'current_price_with_tax',
3517
- 'sku',
3518
- '',
3519
- ),
3520
- 'default' => array( '', '', '', '', '', '', '', '', $this->brand_pattern ),
3521
- 'suffix' => array( '', '', '', '', '', '', '', '', '' ),
3522
- 'output_type' => array( '1', '1', '8', '1', '1', '1', '6', '1', '1' ),
3523
- 'limit' => array( '', '', '', '', '', '', '', '', '' ),
3524
- ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3525
  'google_shopping_action' => array(
3526
  'mattributes' => array(
3527
  'id',
3482
  '',
3483
  ),
3484
  ),
3485
+ 'skroutz' => array(
3486
+ 'mattributes' => array(
3487
+ 'id',
3488
+ 'name',
3489
+ 'description',
3490
+ 'link',
3491
+ 'image',
3492
+ 'category',
3493
+ 'price_with_vat',
3494
+ 'mpn',
3495
+ 'manufacturer',
3496
+ 'availability',
3497
+ ),
3498
+ 'prefix' => array( '', '', '', '', '', '', '', '', '', '' ),
3499
+ 'type' => array(
3500
+ 'attribute',
3501
+ 'attribute',
3502
+ 'attribute',
3503
+ 'attribute',
3504
+ 'attribute',
3505
+ 'attribute',
3506
+ 'attribute',
3507
+ 'attribute',
3508
+ 'pattern',
3509
+ 'pattern',
3510
+ ),
3511
+ 'attributes' => array(
3512
+ 'id',
3513
+ 'title',
3514
+ 'short_description',
3515
+ 'link',
3516
+ 'image',
3517
+ 'product_type',
3518
+ 'current_price_with_tax',
3519
+ 'sku',
3520
+ '',
3521
+ '',
3522
+ ),
3523
+ 'default' => array( '', '', '', '', '', '', '', '', $this->brand_pattern, 'Delivery up to 30 days' ),
3524
+ 'suffix' => array( '', '', '', '', '', '', '', '', '', '' ),
3525
+ 'output_type' => array( '1', '1', '8', '1', '1', '1', '6', '1', '1', '1' ),
3526
+ 'limit' => array( '', '', '', '', '', '', '', '', '','' ),
3527
+ ),
3528
+ 'bestprice' => array(
3529
+ 'mattributes' => array(
3530
+ 'productId',
3531
+ 'name',
3532
+ 'description',
3533
+ 'link',
3534
+ 'image',
3535
+ 'categoryPath',
3536
+ 'categoryID',
3537
+ 'price',
3538
+ 'mpn',
3539
+ 'manufacturer',
3540
+ 'availability',
3541
+ 'instock',
3542
+ ),
3543
+ 'prefix' => array( '', '', '', '', '', '', '', '', '', '', '', '' ),
3544
+ 'type' => array(
3545
+ 'attribute',
3546
+ 'attribute',
3547
+ 'attribute',
3548
+ 'attribute',
3549
+ 'attribute',
3550
+ 'attribute',
3551
+ 'pattern',
3552
+ 'attribute',
3553
+ 'attribute',
3554
+ 'pattern',
3555
+ 'pattern',
3556
+ 'attribute',
3557
+ ),
3558
+ 'attributes' => array(
3559
+ 'id',
3560
+ 'title',
3561
+ 'description',
3562
+ 'link',
3563
+ 'image',
3564
+ 'product_type',
3565
+ '',
3566
+ 'price',
3567
+ 'sku',
3568
+ '',
3569
+ '',
3570
+ 'availability',
3571
+ ),
3572
+ 'default' => array( '', '', '', '', '', '', '', '', '', $this->brand_pattern, 'Delivery up to 30 days', '' ),
3573
+ 'suffix' => array( '', '', '', '', '', '', '', '', '', '', '', '' ),
3574
+ 'output_type' => array( '1', '1', '8', '1', '1', '1', '1', '6', '1', '1', '1', '1' ),
3575
+ 'limit' => array( '', '', '', '', '', '', '', '','', '','', '' ),
3576
+ ),
3577
  'google_shopping_action' => array(
3578
  'mattributes' => array(
3579
  'id',
includes/feeds/merchant_templates_override.php CHANGED
@@ -25,17 +25,17 @@ function woo_feed_spartoo_attribute_value_modify($attribute_value, $product, $fe
25
  return $attribute_value;
26
  }
27
  add_filter('woo_feed_get_type_attribute','woo_feed_spartoo_attribute_value_modify',10,3);
28
- ################ Skroutz #################
29
  /**
30
- * Rename Skroutz template Availability value with Y or N
31
  *
32
  * @param $attribute_value
33
  * @param $product
34
  * @param $feed_config
35
  * @return string
36
  */
37
- function woo_feed_skroutz_attribute_value_modify($attribute_value, $product, $feed_config){
38
- if('skroutz'===$feed_config['provider'] ){
39
  if('in stock'===$attribute_value){
40
  return "Y";
41
  }else{
@@ -44,4 +44,18 @@ function woo_feed_skroutz_attribute_value_modify($attribute_value, $product, $fe
44
  }
45
  return $attribute_value;
46
  }
47
- add_filter('woo_feed_get_availability_attribute','woo_feed_skroutz_attribute_value_modify',10,3);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  return $attribute_value;
26
  }
27
  add_filter('woo_feed_get_type_attribute','woo_feed_spartoo_attribute_value_modify',10,3);
28
+ ################ Availability #################
29
  /**
30
+ * Modify Availability value
31
  *
32
  * @param $attribute_value
33
  * @param $product
34
  * @param $feed_config
35
  * @return string
36
  */
37
+ function woo_feed_availability_attribute_value_modify($attribute_value, $product, $feed_config){
38
+ if('skroutz'===$feed_config['provider'] || 'bestprice'===$feed_config['provider']){
39
  if('in stock'===$attribute_value){
40
  return "Y";
41
  }else{
44
  }
45
  return $attribute_value;
46
  }
47
+ add_filter('woo_feed_get_availability_attribute','woo_feed_availability_attribute_value_modify',10,3);
48
+ ################ Best Price #################
49
+ /**
50
+ * Replace BestPrice categoryPath value from > to ,
51
+ *
52
+ * @param $attribute_value
53
+ * @param $product
54
+ * @param $feed_config
55
+ * @return string
56
+ */
57
+ function woo_feed_get_bestprice_categoryPath_attribute_value_modify($attribute_value, $product, $feed_config){
58
+ $attribute_value=str_replace('>',', ',$attribute_value);
59
+ return $attribute_value;
60
+ }
61
+ add_filter('woo_feed_get_bestprice_product_type_attribute','woo_feed_get_bestprice_categoryPath_attribute_value_modify',10,3);
woo-feed.php CHANGED
@@ -11,7 +11,7 @@
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
  *
14
- * Version: 3.5.6
15
  * Author: WebAppick
16
  * Author URI: https://webappick.com/
17
  * License: GPL v2
@@ -39,7 +39,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
39
  * @var string
40
  * @since 3.1.6
41
  */
42
- define( 'WOO_FEED_FREE_VERSION', '3.5.6' );
43
  }
44
 
45
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
  *
14
+ * Version: 3.5.7
15
  * Author: WebAppick
16
  * Author URI: https://webappick.com/
17
  * License: GPL v2
39
  * @var string
40
  * @since 3.1.6
41
  */
42
+ define( 'WOO_FEED_FREE_VERSION', '3.5.7' );
43
  }
44
 
45
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {