BeezUP_Module_feed_and_tracker - Version 3.2.0

Version Notes

New feature :
> Export all available pictures‏

Download this release

Release Info

Developer BeezUP
Extension BeezUP_Module_feed_and_tracker
Version 3.2.0
Comparing to
See all releases


Code changes from version 3.1.3 to 3.2.0

app/code/community/BeezUp/Block/Xml.php CHANGED
@@ -7,11 +7,13 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
7
**/
8
public function getXml()
9
{
10
/* Load Model and Helper */
11
$beezup = Mage::getModel('beezup/products');
12
$helper = Mage::helper('beezup');
13
14
/* Initially load the useful elements */
15
$_ht = $helper->getConfig('beezup/flux/ht');
16
$_description = $helper->getConfig('beezup/flux/description');
17
$_tablerates = $helper->getConfig('beezup/flux/tablerates_weight_destination') ? $beezup->getTablerates() : 0;
@@ -25,7 +27,9 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
25
$xml .= '<?xml version="1.0" encoding="utf-8"?>' . PHP_EOL . '<catalog>' . PHP_EOL;
26
27
$products = $beezup->getProducts();
28
-
29
foreach ($products as $p) {
30
$categories = $beezup->getProductsCategories($p, $_categories);
31
@@ -47,7 +51,45 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
47
$xml .= $helper->tag($this->__('b_title'), trim($p->getName()), 1);
48
$xml .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($p->getData($_description))), 1);
49
$xml .= $helper->tag($this->__('b_product_url'), $p->getProductUrl(), 1);
50
- $xml .= $helper->tag($this->__('b_product_image'), $helper->getImageDir() . $image, 1);
51
$xml .= $helper->tag($this->__('b_availability'), $stock, 1);
52
$xml .= $helper->tag($this->__('b_qty'), $qty);
53
$xml .= $helper->tag($this->__('b_delivery'), $shipping, 1);
@@ -78,11 +120,13 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
78
**/
79
public function getXmlConfigurable()
80
{
81
/* Load Model and Helper */
82
$beezup = Mage::getModel('beezup/products');
83
$helper = Mage::helper('beezup');
84
85
/* Initially load the useful elements */
86
$_ht = $helper->getConfig('beezup/flux/ht');
87
$_description = $helper->getConfig('beezup/flux/description');
88
$_tablerates = $helper->getConfig('beezup/flux/tablerates_weight_destination') ? $beezup->getTablerates() : 0;
@@ -96,14 +140,22 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
96
$xml .= '<?xml version="1.0" encoding="utf-8"?>' . PHP_EOL . '<catalog>' . PHP_EOL;
97
98
//r�cup�re tous les produits
99
- $products = $beezup->getProducts(true);
100
$childs = $beezup->getConfigurableProducts(true);
101
-
102
//parcours les produits
103
- foreach ($products as $p) {
104
$categories = $beezup->getProductsCategories($p, $_categories);
105
$varationTheme = $beezup->getOptions($p);
106
-
107
if (count($categories)) {
108
//si l'�l�ment est un p�re, on va traiter ces enfants
109
if(isset($childs[$p->getId()])) {
@@ -117,7 +169,6 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
117
$final_price = $c->getFinalPrice();
118
$image = $this->fillImageUrl($p, $c);
119
120
-
121
//DBG
122
if (0)
123
{
@@ -150,7 +201,34 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
150
$xml .= $helper->tag($this->__('b_title'), trim($p->getName()), 1);
151
$xml .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($p->getData($_description))), 1);
152
$xml .= $helper->tag($this->__('b_product_url'), $p->getProductUrl(), 1);
153
- $xml .= $helper->tag($this->__('b_product_image'), $helper->getImageDir() . $image, 1);
154
$xml .= $helper->tag($this->__('b_availability'), $stock, 1);
155
$xml .= $helper->tag($this->__('b_qty'), $qty);
156
$xml .= $helper->tag($this->__('b_delivery'), $shipping, 1);
@@ -188,7 +266,23 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
188
$xml .= $helper->tag($this->__('b_title'), trim($p->getName()), 1);
189
$xml .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($p->getData($_description))), 1);
190
$xml .= $helper->tag($this->__('b_product_url'), $p->getProductUrl(), 1);
191
- $xml .= $helper->tag($this->__('b_product_image'), $helper->getImageDir() . $image, 1);
192
$xml .= $helper->tag($this->__('b_availability'), $stock, 1);
193
$xml .= $helper->tag($this->__('b_qty'), $qty);
194
$xml .= $helper->tag($this->__('b_delivery'), $shipping, 1);
@@ -209,7 +303,7 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
209
}
210
211
$product_simple = $beezup->getProductsSimple();
212
-
213
foreach ($product_simple as $p) {
214
215
$prodAttributeSet = Mage::getModel('eav/entity_attribute_set')->load($p->getAttributeSetId())->getAttributeSetName();
@@ -237,7 +331,24 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
237
$xml .= $helper->tag($this->__('b_title'), trim($p->getName()), 1);
238
$xml .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($p->getData($_description))), 1);
239
$xml .= $helper->tag($this->__('b_product_url'), $p->getProductUrl(), 1);
240
- $xml .= $helper->tag($this->__('b_product_image'), $helper->getImageDir() . $image, 1);
241
$xml .= $helper->tag($this->__('b_availability'), $stock, 1);
242
$xml .= $helper->tag($this->__('b_qty'), $qty);
243
$xml .= $helper->tag($this->__('b_delivery'), $shipping, 1);
@@ -273,6 +384,7 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
273
$helper = Mage::helper('beezup');
274
275
/* Initially load the useful elements */
276
$_ht = $helper->getConfig('beezup/flux/ht');
277
$_description = $helper->getConfig('beezup/flux/description');
278
$_tablerates = $helper->getConfig('beezup/flux/tablerates_weight_destination') ? $beezup->getTablerates() : 0;
@@ -318,8 +430,35 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
318
$xml .= $helper->tag($this->__('b_title'), trim($name), 1);
319
$xml .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($description)), 1);
320
$xml .= $helper->tag($this->__('b_product_url'), $url, 1);
321
- $xml .= $helper->tag($this->__('b_product_image'), $helper->getImageDir() . $image, 1); //r�cup�re l'image sur le p�re
322
- $xml .= $helper->tag($this->__('b_availability'), $stock, 1);
323
$xml .= $helper->tag($this->__('b_qty'), $qty);
324
$xml .= $helper->tag($this->__('b_delivery'), $shipping, 1);
325
$xml .= $helper->tag($this->__('b_shipping'), $helper->currency($beezup->getShippingAmount($c->getWeight(), $_tablerates)));
@@ -348,11 +487,13 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
348
349
public function getAssociatedProducto($configurable)
350
{
351
/* Load Model and Helper */
352
$beezup = Mage::getModel('beezup/products');
353
$helper = Mage::helper('beezup');
354
355
/* Initially load the useful elements */
356
$_ht = $helper->getConfig('beezup/flux/ht');
357
$_description = $helper->getConfig('beezup/flux/description');
358
$_tablerates = $helper->getConfig('beezup/flux/tablerates_weight_destination') ? $beezup->getTablerates() : 0;
@@ -372,6 +513,7 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
372
$parentId = $product->getId();
373
$parentImage = $product->getImage();
374
$parentUrl = $product->getProductUrl();
375
foreach ($associatedProducts as $g) {
376
$qty = $beezup->getQty($g->getId());
377
$stock = $beezup->getIsInStock($qty);
@@ -422,7 +564,26 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
422
$buf .= $helper->tag($this->__('b_title'), $g->getName()/*trim($name)*/, 1);
423
$buf .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($parentDesc)), 1);
424
$buf .= $helper->tag($this->__('b_product_url'), $parentUrl, 1);
425
- $buf .= $helper->tag($this->__('b_product_image'), $helper->getImageDir() . $image, 1); //r�cup�re l'image sur le p�re
426
$buf .= $helper->tag($this->__('b_availability'), $stock, 1);
427
$buf .= $helper->tag($this->__('b_qty'), $qty);
428
$buf .= $helper->tag($this->__('b_delivery'), $shipping, 1);
@@ -515,6 +676,7 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
515
516
protected function _toHtml()
517
{
518
$helper = Mage::helper('beezup');
519
$this->setCacheLifetime(null);
520
//dbg
7
**/
8
public function getXml()
9
{
10
+ $base_url = Mage::getBaseUrl();
11
/* Load Model and Helper */
12
$beezup = Mage::getModel('beezup/products');
13
$helper = Mage::helper('beezup');
14
15
/* Initially load the useful elements */
16
+ $many_images = $helper->getConfig('beezup/flux/images');
17
$_ht = $helper->getConfig('beezup/flux/ht');
18
$_description = $helper->getConfig('beezup/flux/description');
19
$_tablerates = $helper->getConfig('beezup/flux/tablerates_weight_destination') ? $beezup->getTablerates() : 0;
27
$xml .= '<?xml version="1.0" encoding="utf-8"?>' . PHP_EOL . '<catalog>' . PHP_EOL;
28
29
$products = $beezup->getProducts();
30
+ if($many_images == 1) {
31
+ $backendModel = $products->getResource()->getAttribute('media_gallery')->getBackend();
32
+ }
33
foreach ($products as $p) {
34
$categories = $beezup->getProductsCategories($p, $_categories);
35
51
$xml .= $helper->tag($this->__('b_title'), trim($p->getName()), 1);
52
$xml .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($p->getData($_description))), 1);
53
$xml .= $helper->tag($this->__('b_product_url'), $p->getProductUrl(), 1);
54
+
55
+
56
+
57
+ $xml .= $helper->tag($this->__('url_image'), $helper->getImageDir() . $image, 1);
58
+ if($many_images == 1) {
59
+ $inc = 1;
60
+ //we get product object from catalog/product reason(beezup/products gets products from catalog/product_collection, didn't find the way to get image collection from there *will check)
61
+ //$product = Mage::getModel('catalog/product')->load( $p->getId());
62
+ $backendModel->afterLoad($p); //adding media gallery to the product object
63
+ $datos = $p->getData();
64
+ foreach ($datos['media_gallery']['images'] as $img) {
65
+
66
+ if($img['disabled']==0 && $image !== $img['file']) {
67
+ $inc++;
68
+ $xml .= $helper->tag($this->__('url_image')."_".$inc, $helper->getImageDir() .$img['file'], 1);
69
+
70
+ }
71
+ }
72
+
73
+ }
74
+
75
+ /*
76
+ //we get all category id's from product
77
+ $currentCatIds = $product->getCategoryIds();
78
+ //we get a collection of the categories from the ids
79
+ $categoryCollection = Mage::getResourceModel('catalog/category_collection')
80
+ ->addAttributeToSelect('name')
81
+ ->addAttributeToSelect('url')
82
+ ->addAttributeToFilter('entity_id', $currentCatIds)
83
+ ->addIsActiveFilter();
84
+ $inc_cat = 0;
85
+ //loop through category collection to add to xml categories
86
+ foreach($categoryCollection as $cat){
87
+ $inc_cat++;
88
+ $xml .= $helper->tag($this->__('b_product_category_'.$inc_cat), $cat->getUrl(), 1);
89
+ } */
90
+
91
+
92
+ // $xml .= $helper->tag($this->__('b_product_image'), $helper->getImageDir() . $image, 1);
93
$xml .= $helper->tag($this->__('b_availability'), $stock, 1);
94
$xml .= $helper->tag($this->__('b_qty'), $qty);
95
$xml .= $helper->tag($this->__('b_delivery'), $shipping, 1);
120
**/
121
public function getXmlConfigurable()
122
{
123
+ $base_url = Mage::getBaseUrl();
124
/* Load Model and Helper */
125
$beezup = Mage::getModel('beezup/products');
126
$helper = Mage::helper('beezup');
127
128
/* Initially load the useful elements */
129
+ $many_images = $helper->getConfig('beezup/flux/images');
130
$_ht = $helper->getConfig('beezup/flux/ht');
131
$_description = $helper->getConfig('beezup/flux/description');
132
$_tablerates = $helper->getConfig('beezup/flux/tablerates_weight_destination') ? $beezup->getTablerates() : 0;
140
$xml .= '<?xml version="1.0" encoding="utf-8"?>' . PHP_EOL . '<catalog>' . PHP_EOL;
141
142
//r�cup�re tous les produits
143
+ $products = $beezup->getProducts();
144
$childs = $beezup->getConfigurableProducts(true);
145
+ $backendModel = $products->getResource()->getAttribute('media_gallery')->getBackend();
146
+ $products->addAttributeToFilter('type_id', Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE);
147
//parcours les produits
148
+ foreach ($products as $p) {
149
+ if($many_images == 1) {
150
+ $backendModel->afterLoad($p); //adding media gallery to the product object
151
+ $datos = $p->getData();
152
+
153
+ }
154
+
155
$categories = $beezup->getProductsCategories($p, $_categories);
156
$varationTheme = $beezup->getOptions($p);
157
+ //we get product object from catalog/product reason(beezup/products gets products from catalog/product_collection, didn't find the way to get image collection from there *will check)
158
+
159
if (count($categories)) {
160
//si l'�l�ment est un p�re, on va traiter ces enfants
161
if(isset($childs[$p->getId()])) {
169
$final_price = $c->getFinalPrice();
170
$image = $this->fillImageUrl($p, $c);
171
172
//DBG
173
if (0)
174
{
201
$xml .= $helper->tag($this->__('b_title'), trim($p->getName()), 1);
202
$xml .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($p->getData($_description))), 1);
203
$xml .= $helper->tag($this->__('b_product_url'), $p->getProductUrl(), 1);
204
+
205
+ $xml .= $helper->tag($this->__('url_image'), $helper->getImageDir() . $image, 1);
206
+ if($many_images==1) {
207
+
208
+ $product = Mage::getModel('catalog/product')->load( $c->getId());
209
+ $inc = 1;
210
+ foreach ($product->getMediaGalleryImages() as $img) {
211
+ if( $helper->getImageDir() . $image !== $img->getUrl()) {
212
+ $inc++;
213
+ $xml .= $helper->tag($this->__('url_image')."_".$inc, $img->getUrl(), 1);
214
+ }
215
+
216
+ }
217
+
218
+ if($inc==1 && ($c->getImage() == "no_selection" || $c->getImage()=="" || $c->getSmallImage() == "no_selection" || $c->getSmallImage() == "")) { //if there are no child pictures
219
+
220
+ $product = Mage::getModel('catalog/product')->load( $p->getId());
221
+ $inc = 1;
222
+ foreach ($product->getMediaGalleryImages() as $img) {
223
+ if( $helper->getImageDir() . $image !== $img->getUrl()) {
224
+ $inc++;
225
+ $xml .= $helper->tag($this->__('url_image')."_".$inc, $img->getUrl(), 1);
226
+ }
227
+ }
228
+
229
+
230
+ }
231
+ }
232
$xml .= $helper->tag($this->__('b_availability'), $stock, 1);
233
$xml .= $helper->tag($this->__('b_qty'), $qty);
234
$xml .= $helper->tag($this->__('b_delivery'), $shipping, 1);
266
$xml .= $helper->tag($this->__('b_title'), trim($p->getName()), 1);
267
$xml .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($p->getData($_description))), 1);
268
$xml .= $helper->tag($this->__('b_product_url'), $p->getProductUrl(), 1);
269
+ $xml .= $helper->tag($this->__('url_image'), $helper->getImageDir() . $image, 1);
270
+ if($many_images == 1) {
271
+ $inc = 1;
272
+ //we get product object from catalog/product reason(beezup/products gets products from catalog/product_collection, didn't find the way to get image collection from there *will check)
273
+ //$product = Mage::getModel('catalog/product')->load( $p->getId());
274
+
275
+ foreach ($datos['media_gallery']['images'] as $img) {
276
+
277
+ if($img['disabled']==0 && $image !== $img['file']) {
278
+ $inc++;
279
+ $xml .= $helper->tag($this->__('url_image')."_".$inc, $helper->getImageDir() .$img['file'], 1);
280
+
281
+ }
282
+ }
283
+
284
+ }
285
+
286
$xml .= $helper->tag($this->__('b_availability'), $stock, 1);
287
$xml .= $helper->tag($this->__('b_qty'), $qty);
288
$xml .= $helper->tag($this->__('b_delivery'), $shipping, 1);
303
}
304
305
$product_simple = $beezup->getProductsSimple();
306
+ $backendModelSimple = $product_simple->getResource()->getAttribute('media_gallery')->getBackend();
307
foreach ($product_simple as $p) {
308
309
$prodAttributeSet = Mage::getModel('eav/entity_attribute_set')->load($p->getAttributeSetId())->getAttributeSetName();
331
$xml .= $helper->tag($this->__('b_title'), trim($p->getName()), 1);
332
$xml .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($p->getData($_description))), 1);
333
$xml .= $helper->tag($this->__('b_product_url'), $p->getProductUrl(), 1);
334
+ $xml .= $helper->tag($this->__('url_image'), $helper->getImageDir() . $image, 1);
335
+ if($many_images == 1) {
336
+ $inc = 1;
337
+ //we get product object from catalog/product reason(beezup/products gets products from catalog/product_collection, didn't find the way to get image collection from there *will check)
338
+ //$product = Mage::getModel('catalog/product')->load( $p->getId());
339
+ $backendModelSimple->afterLoad($p); //adding media gallery to the product object
340
+ $datos = $p->getData();
341
+ foreach ($datos['media_gallery']['images'] as $img) {
342
+
343
+ if($img['disabled']==0 && $image !== $img['file']) {
344
+ $inc++;
345
+ $xml .= $helper->tag($this->__('url_image')."_".$inc, $helper->getImageDir() .$img['file'], 1);
346
+
347
+ }
348
+ }
349
+
350
+ }
351
+
352
$xml .= $helper->tag($this->__('b_availability'), $stock, 1);
353
$xml .= $helper->tag($this->__('b_qty'), $qty);
354
$xml .= $helper->tag($this->__('b_delivery'), $shipping, 1);
384
$helper = Mage::helper('beezup');
385
386
/* Initially load the useful elements */
387
+ $many_images = $helper->getConfig('beezup/flux/images');
388
$_ht = $helper->getConfig('beezup/flux/ht');
389
$_description = $helper->getConfig('beezup/flux/description');
390
$_tablerates = $helper->getConfig('beezup/flux/tablerates_weight_destination') ? $beezup->getTablerates() : 0;
430
$xml .= $helper->tag($this->__('b_title'), trim($name), 1);
431
$xml .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($description)), 1);
432
$xml .= $helper->tag($this->__('b_product_url'), $url, 1);
433
+
434
+ /*$inc = 0;
435
+ $product = Mage::getModel('catalog/product')->load( $c->getId());
436
+
437
+ foreach ($product->getMediaGalleryImages() as $image) {
438
+ $inc++;
439
+ if($inc==1) {
440
+ $xml .= $helper->tag($this->__('url_image'), $image->getUrl(), 1);
441
+ } else {
442
+ $xml .= $helper->tag($this->__('url_image')."_".$inc, $image->getUrl(), 1);
443
+ }
444
+ }*/
445
+ $xml .= $helper->tag($this->__('url_image'), $helper->getImageDir() . $image, 1); //r�cup�re l'image sur le p�re
446
+
447
+ if($many_images == 1) {
448
+ $product = Mage::getModel('catalog/product')->load( $c->getId());
449
+ $inc = 1;
450
+ foreach ($product->getMediaGalleryImages() as $img) {
451
+ if($helper->getImageDir() . $image!== $img->getUrl()) {
452
+ $inc++;
453
+ $xml .= $helper->tag($this->__('url_image')."_".$inc, $img->getUrl(), 1);
454
+ }
455
+ }
456
+
457
+
458
+
459
+ }
460
+
461
+ $xml .= $helper->tag($this->__('b_availability'), $stock, 1);
462
$xml .= $helper->tag($this->__('b_qty'), $qty);
463
$xml .= $helper->tag($this->__('b_delivery'), $shipping, 1);
464
$xml .= $helper->tag($this->__('b_shipping'), $helper->currency($beezup->getShippingAmount($c->getWeight(), $_tablerates)));
487
488
public function getAssociatedProducto($configurable)
489
{
490
+
491
/* Load Model and Helper */
492
$beezup = Mage::getModel('beezup/products');
493
$helper = Mage::helper('beezup');
494
495
/* Initially load the useful elements */
496
+ $many_images = $helper->getConfig('beezup/flux/images');
497
$_ht = $helper->getConfig('beezup/flux/ht');
498
$_description = $helper->getConfig('beezup/flux/description');
499
$_tablerates = $helper->getConfig('beezup/flux/tablerates_weight_destination') ? $beezup->getTablerates() : 0;
513
$parentId = $product->getId();
514
$parentImage = $product->getImage();
515
$parentUrl = $product->getProductUrl();
516
+
517
foreach ($associatedProducts as $g) {
518
$qty = $beezup->getQty($g->getId());
519
$stock = $beezup->getIsInStock($qty);
564
$buf .= $helper->tag($this->__('b_title'), $g->getName()/*trim($name)*/, 1);
565
$buf .= $helper->tag($this->__('b_description'), preg_replace("/(\r\n|\n|\r)/", ' ', strip_tags($parentDesc)), 1);
566
$buf .= $helper->tag($this->__('b_product_url'), $parentUrl, 1);
567
+
568
+ /*
569
+ if($many_images==1) {
570
+
571
+ $gprod = Mage::getModel('catalog/product')->load( $g->getId());
572
+ $inc = 0;
573
+ foreach ($gprod->getMediaGalleryImages() as $image) {
574
+ $inc++;
575
+ if($inc==1) {
576
+ $buf .= $helper->tag($this->__('url_image'), $image->getUrl(), 1);
577
+ } else {
578
+ $buf .= $helper->tag($this->__('url_image')."_".$inc, $image->getUrl(), 1);
579
+ }
580
+ }
581
+ } else {
582
+
583
+ $buf .= $helper->tag($this->__('url_image'), $helper->getImageDir() . $image, 1);
584
+ }*/
585
+
586
+ $buf .= $helper->tag($this->__('b_product_image'), $helper->getImageDir() . $image, 1); //r�cup�re l'image sur le p�re
587
$buf .= $helper->tag($this->__('b_availability'), $stock, 1);
588
$buf .= $helper->tag($this->__('b_qty'), $qty);
589
$buf .= $helper->tag($this->__('b_delivery'), $shipping, 1);
676
677
protected function _toHtml()
678
{
679
+ set_time_limit(0);
680
$helper = Mage::helper('beezup');
681
$this->setCacheLifetime(null);
682
//dbg
app/code/community/BeezUp/Model/Products.php CHANGED
@@ -11,7 +11,7 @@ class BeezUp_Model_Products extends Mage_Core_Model_Abstract
11
*/
12
public function getProducts($configurable = false)
13
{
14
- $products = Mage::getResourceModel('catalog/product_collection')
15
->addAttributeToFilter('status', 1)
16
->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)))
17
->addAttributeToFilter('price', array('neq' => 0))
@@ -25,7 +25,10 @@ class BeezUp_Model_Products extends Mage_Core_Model_Abstract
25
->addAttributeToSelect('image')
26
->addAttributeToSelect(Mage::getStoreConfig('beezup/flux/description'))
27
->addStoreFilter();
28
-
29
if($configurable) $products->addAttributeToFilter('type_id', Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE);
30
31
if(Mage::getStoreConfig('beezup/flux/stock')){
11
*/
12
public function getProducts($configurable = false)
13
{
14
+ $products = Mage::getResourceModel('catalog/product_collection')
15
->addAttributeToFilter('status', 1)
16
->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)))
17
->addAttributeToFilter('price', array('neq' => 0))
25
->addAttributeToSelect('image')
26
->addAttributeToSelect(Mage::getStoreConfig('beezup/flux/description'))
27
->addStoreFilter();
28
+ /* $products = Mage::getModel('catalog/product')
29
+ ->getCollection();
30
+
31
+ */
32
if($configurable) $products->addAttributeToFilter('type_id', Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE);
33
34
if(Mage::getStoreConfig('beezup/flux/stock')){
app/code/community/BeezUp/Model/System/Config/Source/Images.php ADDED
@@ -0,0 +1,14 @@
1
+ <?php
2
+
3
+ class BeezUp_Model_System_Config_Source_Images
4
+ {
5
+
6
+ public function toOptionArray()
7
+ {
8
+ return array(
9
+ array('value' => 1, 'label' => Mage::helper('beezup')->__('Yes')),
10
+ array('value' => 0, 'label' => Mage::helper('beezup')->__('No')),
11
+ );
12
+ }
13
+
14
+ }
app/code/community/BeezUp/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
<config>
3
<modules>
4
<BeezUp>
5
- <version>3.1.3</version>
6
</BeezUp>
7
</modules>
8
<global>
@@ -117,6 +117,7 @@
117
<ship></ship>
118
<key></key>
119
<ip></ip>
120
</flux>
121
</beezup>
122
</default>
2
<config>
3
<modules>
4
<BeezUp>
5
+ <version>3.2.0</version>
6
</BeezUp>
7
</modules>
8
<global>
117
<ship></ship>
118
<key></key>
119
<ip></ip>
120
+ <images></images>
121
</flux>
122
</beezup>
123
</default>
app/code/community/BeezUp/etc/system.xml CHANGED
@@ -226,7 +226,16 @@
226
<show_in_website>1</show_in_website>
227
<show_in_store>1</show_in_store>
228
</cachedelay>
229
-
230
231
</fields>
232
</flux>
226
<show_in_website>1</show_in_website>
227
<show_in_store>1</show_in_store>
228
</cachedelay>
229
+ <images translate="label">
230
+ <label>Export all available pictures</label>
231
+ <frontend_type>select</frontend_type>
232
+ <source_model>beezup/system_config_source_images</source_model>
233
+ <comment><![CDATA[Export all available pictures]]></comment>
234
+ <sort_order>17</sort_order>
235
+ <show_in_default>1</show_in_default>
236
+ <show_in_website>1</show_in_website>
237
+ <show_in_store>1</show_in_store>
238
+ </images>
239
240
</fields>
241
</flux>
app/locale/fr_FR/BeezUp.csv CHANGED
@@ -17,33 +17,33 @@ VAT Rates,Taux TVA
17
Logs,Logs
18
www.yoursite.com/beezup/catalog/xml,www.votreboutique.com/beezup/catalog/xml
19
BeezUP Server IP address,Adresse IP du serveur BeezUP
20
- Key,Cl
21
Out of stock products,Produits hors stock
22
Shipping (Incl. Tax),Frais de port (TTC)
23
Catalog Price,Prix catalogue
24
- Delivery Time if Product in Stock,Dlais de livraison si produit en stock
25
- Delivery Time if Product out of Stock,Dlais de livraison si produit hors stock
26
- Specific Attributes,Attributs spcifiques
27
- The field cost must be indicated for all products,Le champ cot doit tre renseign pour l'ensemble des produits
28
Product Price and Shipping Excl. Tax or Incl. Tax in catalog,Prix produits et frais de port saisis en HT ou TTC
29
Enable tracker logs (var/log/beezup.log),Activer les logs du tracker (var/log/beezup.log)
30
- Only this IP address will be able to read the flow (leave empty to disable the restriction),Seule cette adresse IP sera en mesure de lire le flux (laisser vide pour dsactiver la restriction)
31
- Protects the flow by a unique key (Eg: 85ds6f7): www.yoursite.com/beezup/catalog/xml/key/85ds6f7/,Protge le flux par une cl unique (Ex : 85ds6f7) : www.votresite.com/beezup/catalog/xml/key/85ds6f7/
32
Product Price Excl. Tax or Incl. Tax in catalog,Prix produits saisis en HT ou TTC
33
- Enter eg 1-2 for 1 to 2 days,Saisissez par exemple 1-2 pour 1 2 jours
34
- Enter eg 6-8 for 6 to 8 days,Saisissez par exemple 6-8 pour 6 8 jours
35
- Field Separator,Sparateur de champs
36
- Get your Store ID from My trackers page in your BeezUP account,Rcuprez votre Store ID depuis la page 'Mes trackers' de votre compte BeezUP
37
Only for CSV file,Uniquement pour le fichier CSV
38
- Use Catalog Price Rules,Inclure les rgles de prix catalogue
39
- Let off if Catalog Price Rules are not used,Dsactiver si les rgles de prix catalogue ne sont pas utlises
40
Debug Mode,Mode Debug
41
Limit the number of products,Limiter le nombre de produits
42
Table Rates,Frais de port poids par destination
43
Use Table Rates (only Weight vs. Destination),Utiliser le mode tarification poids par destination pour le calcul des frais de port
44
- Add Byte Order Mark (BOM),Ajouter le Byte Order Mark (activer de prfrence)
45
Tag position,Position du tag
46
- Head,En-tte (head)
47
Before body end,En bas de page (body)
48
b_unique_id,identifiant_unique
49
b_sku,sku
@@ -68,3 +68,4 @@ Filter out of stock products,Filtrer les produits hors stock
68
hour,heure
69
minutes,minutes
70
hours,heures
17
Logs,Logs
18
www.yoursite.com/beezup/catalog/xml,www.votreboutique.com/beezup/catalog/xml
19
BeezUP Server IP address,Adresse IP du serveur BeezUP
20
+ Key,Cl&eacute;
21
Out of stock products,Produits hors stock
22
Shipping (Incl. Tax),Frais de port (TTC)
23
Catalog Price,Prix catalogue
24
+ Delivery Time if Product in Stock,D&eacute;lais de livraison si produit en stock
25
+ Delivery Time if Product out of Stock,D&eacute;lais de livraison si produit hors stock
26
+ Specific Attributes,Attributs sp&eacute;cifiques
27
+ The field cost must be indicated for all products,Le champ co&ucirc;t doit &ecirc;tre renseign&eacute; pour l&apos;ensemble des produits
28
Product Price and Shipping Excl. Tax or Incl. Tax in catalog,Prix produits et frais de port saisis en HT ou TTC
29
Enable tracker logs (var/log/beezup.log),Activer les logs du tracker (var/log/beezup.log)
30
+ Only this IP address will be able to read the flow (leave empty to disable the restriction),Seule cette adresse IP sera en mesure de lire le flux (laisser vide pour d&eacute;sactiver la restriction)
31
+ Protects the flow by a unique key (Eg: 85ds6f7): www.yoursite.com/beezup/catalog/xml/key/85ds6f7/,Prot&eacute;ge le flux par une cl&eacute; unique (Ex : 85ds6f7) : www.votresite.com/beezup/catalog/xml/key/85ds6f7/
32
Product Price Excl. Tax or Incl. Tax in catalog,Prix produits saisis en HT ou TTC
33
+ Enter eg 1-2 for 1 to 2 days,Saisissez par exemple 1-2 pour 1 &agrave; 2 jours
34
+ Enter eg 6-8 for 6 to 8 days,Saisissez par exemple 6-8 pour 6 &agrave; 8 jours
35
+ Field Separator,S&eacute;parateur de champs
36
+ Get your Store ID from My trackers page in your BeezUP account,R&eacute;cup&eacute;rez votre Store ID depuis la page &apos;Mes trackers&apos; de votre compte BeezUP
37
Only for CSV file,Uniquement pour le fichier CSV
38
+ Use Catalog Price Rules,Inclure les r&eacute;gles de prix catalogue
39
+ Let off if Catalog Price Rules are not used,D&eacute;sactiver si les r&eacute;gles de prix catalogue ne sont pas utlis&eacute;es
40
Debug Mode,Mode Debug
41
Limit the number of products,Limiter le nombre de produits
42
Table Rates,Frais de port poids par destination
43
Use Table Rates (only Weight vs. Destination),Utiliser le mode tarification poids par destination pour le calcul des frais de port
44
+ Add Byte Order Mark (BOM),Ajouter le Byte Order Mark (activer de pr&eacute;f&eacute;rence)
45
Tag position,Position du tag
46
+ Head,En-t&ecirc;te (head)
47
Before body end,En bas de page (body)
48
b_unique_id,identifiant_unique
49
b_sku,sku
68
hour,heure
69
minutes,minutes
70
hours,heures
71
+ Export all available pictures,Exporter toutes les images disponibles
package.xml CHANGED
@@ -1,7 +1,7 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>BeezUP_Module_feed_and_tracker</name>
4
- <version>3.1.3</version>
5
<stability>stable</stability>
6
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
<channel>community</channel>
@@ -39,12 +39,12 @@ After Set-up, the following files are added :&lt;/p&gt;&#xD;
39
&lt;/ul&gt;&#xD;
40
&#xD;
41
&lt;p&gt;By BeezUP &amp; Magentix&lt;/p&gt;</description>
42
- <notes>New features :&#xD;
43
- &gt; Changing the old version number by the actual version number inside the configuration page</notes>
44
<authors><author><name>BeezUP</name><user>BeezUP</user><email>charles@beezup.com</email></author></authors>
45
- <date>2014-01-29</date>
46
- <time>10:35:21</time>
47
- <contents><target name="magecommunity"><dir name="BeezUp"><dir name="Block"><file name="Tracking.php" hash="455b06ca7208bab816f227980ff97f67"/><file name="Xml.php" hash="e7f962c81ce71c4362fdfe0995238876"/></dir><dir name="Helper"><file name="Data.php" hash="1a40dbf0ff07f30c8c6be624da058e0b"/></dir><dir name="Model"><file name="Observer.php" hash="434ced3bc78542186217c92c5df9e394"/><file name="Products.php" hash="96e7c480ba7005ae95f51a212af64c8c"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Attributes.php" hash="4bba8f38763988edf7940df0b8bdce92"/><file name="Cache.php" hash="f9d206faa23746ed4f470b1fe6fb37f6"/><file name="Description.php" hash="ab4cc7e3c931544aff38d3bc2cd517dd"/><file name="Montant.php" hash="3460701acf11007082c88f8ee9bef6fa"/><file name="Position.php" hash="bed34c5746369dc5d9ea9f6589ac6c74"/><file name="Price.php" hash="2c07ae280bf2f6e073fa738fad4e03e3"/></dir></dir></dir></dir><dir name="controllers"><file name="CatalogController.php" hash="cfd53d5adb5c48185cc502ac031d793f"/></dir><dir name="etc"><file name="config.xml" hash="83f46da77d9c0b25cd91e7bc1dddc9a0"/><file name="system.xml" hash="a4aaa4cd5efe2a7ca619cd01c47b7100"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="BeezUp.xml" hash="93df32f86c55b57363b9abc62cf68474"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="BeezUp.csv" hash="2c26bc54950f6062b1acfe836895b733"/></dir><dir name="en_US"><file name="BeezUp.csv" hash="ae6d24a6c16ae3b17ce5d9bfb7b55234"/></dir></target><target name="magelocal"><dir name="es_ES"><file name="BeezUp.csv" hash=""/></dir></target></contents>
48
<compatible/>
49
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
50
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>BeezUP_Module_feed_and_tracker</name>
4
+ <version>3.2.0</version>
5
<stability>stable</stability>
6
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
<channel>community</channel>
39
&lt;/ul&gt;&#xD;
40
&#xD;
41
&lt;p&gt;By BeezUP &amp; Magentix&lt;/p&gt;</description>
42
+ <notes>New feature :&#xD;
43
+ &gt; Export all available pictures&#x200F;</notes>
44
<authors><author><name>BeezUP</name><user>BeezUP</user><email>charles@beezup.com</email></author></authors>
45
+ <date>2015-04-10</date>
46
+ <time>14:45:06</time>
47
+ <contents><target name="magecommunity"><dir name="BeezUp"><dir name="Block"><file name="Tracking.php" hash="455b06ca7208bab816f227980ff97f67"/><file name="Xml.php" hash="bf24d6e2b8d41800fe763f3b7f63c215"/></dir><dir name="Helper"><file name="Data.php" hash="1a40dbf0ff07f30c8c6be624da058e0b"/></dir><dir name="Model"><file name="Observer.php" hash="434ced3bc78542186217c92c5df9e394"/><file name="Products.php" hash="064f39e840485fc8400b3d8c6a4c7e09"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Attributes.php" hash="4bba8f38763988edf7940df0b8bdce92"/><file name="Cache.php" hash="f9d206faa23746ed4f470b1fe6fb37f6"/><file name="Description.php" hash="ab4cc7e3c931544aff38d3bc2cd517dd"/><file name="Images.php" hash="dbfb6c757476ffa25b9181869a576766"/><file name="Montant.php" hash="3460701acf11007082c88f8ee9bef6fa"/><file name="Position.php" hash="bed34c5746369dc5d9ea9f6589ac6c74"/><file name="Price.php" hash="2c07ae280bf2f6e073fa738fad4e03e3"/></dir></dir></dir></dir><dir name="controllers"><file name="CatalogController.php" hash="cfd53d5adb5c48185cc502ac031d793f"/></dir><dir name="etc"><file name="config.xml" hash="8e78da6052fd4d0911afd4228fed83d9"/><file name="system.xml" hash="d7c255066173358b019c812681c20ab4"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="BeezUp.xml" hash="93df32f86c55b57363b9abc62cf68474"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="BeezUp.csv" hash="86cddf2dacebf3f754316ad2435d327d"/></dir><dir name="en_US"><file name="BeezUp.csv" hash="ae6d24a6c16ae3b17ce5d9bfb7b55234"/></dir></target><target name="magelocal"><dir name="es_ES"><file name="BeezUp.csv" hash=""/></dir></target></contents>
48
<compatible/>
49
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
50
</package>