BeezUP_Module_feed_and_tracker - Version 3.1.1

Version Notes

New features :
> Cache generation to avoid useless re-generation of the feed
> Grouped products are now exported in the xml and configurable feeds
> Fixed bug to take into account promotion dates
> Fixed various bugs

Download this release

Release Info

Developer BeezUP
Extension BeezUP_Module_feed_and_tracker
Version 3.1.1
Comparing to
See all releases


Code changes from version 3.1.0 to 3.1.1

app/code/community/BeezUp/Block/Xml.php CHANGED
@@ -115,10 +115,29 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
115
$shipping = $beezup->getDelivery($qty);
116
$price = $c->getPrice();
117
$final_price = $c->getFinalPrice();
118
- if (($image = $c->getImage()) == "no_selection" || ($image = $c->getImage()) == "") // Si on ne trouve pas d'image avec getImage on r�cup�re la smallImage
119
- $image = $c->getSmallImage();
120
121
122
123
$xml .= '<product>';
124
$xml .= $helper->tag($this->__('b_unique_id'), $c->getId());
@@ -138,7 +157,7 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
138
$xml .= $helper->tag($this->__('b_shipping'), $helper->currency($beezup->getShippingAmount($c->getWeight(), $_tablerates)));
139
$xml .= $helper->tag($this->__('b_weight'), $helper->currency($c->getWeight()));
140
$xml .= $helper->tag($this->__('b_price'), $helper->currency($final_price*$_vat));
141
- if ($price != $final_price) $xml .= $helper->tag($this->__('b_regular_price'), '');
142
$i = 1;
143
foreach ($categories as $v) $xml .= $helper->tag($this->__('b_category_%s', $i++), $v, 1);
144
foreach ($_attributes as $a) {
@@ -287,8 +306,7 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
287
$shipping = $beezup->getDelivery($qty);
288
$price = $c->getPrice();
289
$final_price = $c->getFinalPrice();
290
- if (($image = $c->getImage()) == 'no_selection') // Si on ne trouve pas d'image avec getImage on r�cup�re la smallImage
291
- $image = $c->getSmallImage();
292
293
$xml .= '<product>';
294
$xml .= $helper->tag($this->__('b_unique_id'), $c->getId());
@@ -307,7 +325,7 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
307
$xml .= $helper->tag($this->__('b_shipping'), $helper->currency($beezup->getShippingAmount($c->getWeight(), $_tablerates)));
308
$xml .= $helper->tag($this->__('b_weight'), $helper->currency($c->getWeight()));
309
$xml .= $helper->tag($this->__('b_price'), $helper->currency($final_price*$_vat));
310
- if ($price != $final_price) $xml .= $helper->tag($this->__('b_regular_price'), '');
311
$i = 1;
312
foreach ($categories as $v) $xml .= $helper->tag($this->__('b_category_%s', $i++), $v, 1);
313
foreach ($_attributes as $a) {
@@ -361,10 +379,11 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
361
$price = $g->getPrice();
362
$final_price = $g->getFinalPrice();
363
364
365
366
- if (($image = $g->getImage()) == "no_selection" || ($image = $g->getImage()) == "") // Si on ne trouve pas d'image avec getImage on r�cup�re la smallImage
367
- $image = $g->getSmallImage();
368
369
370
//DBG
@@ -410,7 +429,7 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
410
$buf .= $helper->tag($this->__('b_shipping'), $helper->currency($beezup->getShippingAmount($g->getWeight(), $_tablerates)));
411
$buf .= $helper->tag($this->__('b_weight'), $helper->currency($g->getWeight()));
412
$buf .= $helper->tag($this->__('b_price'), $helper->currency($final_price * $_vat));
413
- if ($price != $final_price) $buf .= $helper->tag($this->__('b_regular_price'), '');
414
$i = 1;
415
foreach ($parentCategories as $v) $buf .= $helper->tag($this->__('b_category_%s', $i++), $v, 1);
416
foreach ($_attributes as $a) {
@@ -424,6 +443,22 @@ class BeezUp_Block_Xml extends Mage_Core_Block_Text
424
}
425
426
427
protected function createFile($type, $xmlData)
428
{
429
$fp = fopen('beezup/tmp/'.$type, 'w');
115
$shipping = $beezup->getDelivery($qty);
116
$price = $c->getPrice();
117
$final_price = $c->getFinalPrice();
118
+ $image = $this->fillImageUrl($p, $c);
119
120
121
+ //DBG
122
+ if (0)
123
+ {
124
+ echo "----------------------------" ."<br/>";
125
+ echo "Name : " .$c->getName() ."<br/>";
126
+ echo "Id : " .$c->getId() ."<br/>";
127
+ echo "Parent Id : " .$p->getId() ."<br/>";
128
+ echo "Url : " .$p->getProductUrl() ."<br/>";
129
+ echo "Image : " .$helper->getImageDir().$image ."<br/>";
130
+
131
+
132
+ echo "SKU : " .$c->getSku() ."<br/>";
133
+ echo "Quantity : " .$qty ."<br/>";
134
+ echo "Stock : " .$stock ."<br/>";
135
+ echo "Shipping : " .$shipping ."<br/>";
136
+ echo "price : " .$price ."<br/>";
137
+ echo "finalprice : ".$final_price ."<br/>";
138
+ echo "specialprice : ".$c->getSpecialPrice() ."<br/>";
139
+ }
140
+
141
142
$xml .= '<product>';
143
$xml .= $helper->tag($this->__('b_unique_id'), $c->getId());
157
$xml .= $helper->tag($this->__('b_shipping'), $helper->currency($beezup->getShippingAmount($c->getWeight(), $_tablerates)));
158
$xml .= $helper->tag($this->__('b_weight'), $helper->currency($c->getWeight()));
159
$xml .= $helper->tag($this->__('b_price'), $helper->currency($final_price*$_vat));
160
+ if ($price != $final_price) $xml .= $helper->tag($this->__('b_regular_price'), $helper->currency($price*$_vat));
161
$i = 1;
162
foreach ($categories as $v) $xml .= $helper->tag($this->__('b_category_%s', $i++), $v, 1);
163
foreach ($_attributes as $a) {
306
$shipping = $beezup->getDelivery($qty);
307
$price = $c->getPrice();
308
$final_price = $c->getFinalPrice();
309
+ $image = $this->fillImageUrl($productParent, $c);
310
311
$xml .= '<product>';
312
$xml .= $helper->tag($this->__('b_unique_id'), $c->getId());
325
$xml .= $helper->tag($this->__('b_shipping'), $helper->currency($beezup->getShippingAmount($c->getWeight(), $_tablerates)));
326
$xml .= $helper->tag($this->__('b_weight'), $helper->currency($c->getWeight()));
327
$xml .= $helper->tag($this->__('b_price'), $helper->currency($final_price*$_vat));
328
+ if ($price != $final_price) $xml .= $helper->tag($this->__('b_regular_price'), $helper->currency($price*$_vat));
329
$i = 1;
330
foreach ($categories as $v) $xml .= $helper->tag($this->__('b_category_%s', $i++), $v, 1);
331
foreach ($_attributes as $a) {
379
$price = $g->getPrice();
380
$final_price = $g->getFinalPrice();
381
382
+ $image = $this->fillImageUrl($product, $g);
383
384
385
+ //if (($image = $g->getImage()) == "no_selection" || ($image = $g->getImage()) == "") // Si on ne trouve pas d'image avec getImage on r�cup�re la smallImage
386
+ // $image = $g->getSmallImage();
387
388
389
//DBG
429
$buf .= $helper->tag($this->__('b_shipping'), $helper->currency($beezup->getShippingAmount($g->getWeight(), $_tablerates)));
430
$buf .= $helper->tag($this->__('b_weight'), $helper->currency($g->getWeight()));
431
$buf .= $helper->tag($this->__('b_price'), $helper->currency($final_price * $_vat));
432
+ if ($price != $final_price) $buf .= $helper->tag($this->__('b_regular_price'), $helper->currency($price*$_vat));
433
$i = 1;
434
foreach ($parentCategories as $v) $buf .= $helper->tag($this->__('b_category_%s', $i++), $v, 1);
435
foreach ($_attributes as $a) {
443
}
444
445
446
+ protected function fillImageUrl($p, $c)
447
+ {
448
+ $image = $c->getImage();
449
+ if ($image == "no_selection" || $image == "") // Si on ne trouve pas d'image avec getImage on r�cup�re la smallImage
450
+ {
451
+ $image = $c->getSmallImage();
452
+ if ($image == "no_selection" || $image == "")
453
+ {
454
+ $image = $p->getImage();
455
+ if ($image == "no_selection" || $image == "")
456
+ $image = $p->getSmallImage();
457
+ }
458
+ }
459
+ return ($image);
460
+ }
461
+
462
protected function createFile($type, $xmlData)
463
{
464
$fp = fopen('beezup/tmp/'.$type, 'w');
app/etc/modules/BeezUp.xml ADDED
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <BeezUp>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </BeezUp>
8
+ </modules>
9
+ </config>
app/locale/en_US/BeezUp.csv ADDED
@@ -0,0 +1,67 @@
1
+ Short Description,Short Description
2
+ Description,Description
3
+ Meta Description,Meta Description
4
+ Product description,Product description
5
+ Excl. Tax,Excl. Tax
6
+ Incl. Tax,Incl. Tax
7
+ No,No
8
+ Yes,Yes
9
+ In Stock,In Stock
10
+ Out of Stock,Out of Stock
11
+ Tracking,Tracking
12
+ Catalog Flow,Catalog Flow
13
+ Enabled,Enabled
14
+ Store ID,Store ID
15
+ Calculate product margin,Calculate product margin
16
+ VAT Rates,VAT Rates
17
+ Logs,Logs
18
+ www.yoursite.com/beezup/catalog/xml,www.yoursite.com/beezup/catalog/xml
19
+ BeezUP Server IP address,BeezUP Server IP address
20
+ Key,Key
21
+ Out of stock products,Out of stock products
22
+ Shipping (Incl. Tax),Shipping (Incl. Tax)
23
+ Catalog Price,Catalog Price
24
+ Delivery Time if Product in Stock,Delivery Time if Product in Stock
25
+ Delivery Time if Product out of Stock,Delivery Time if Product out of Stock
26
+ Specific Attributes,Specific Attributes
27
+ The field cost must be indicated for all products,The field cost must be indicated for all products
28
+ Product Price and Shipping Excl. Tax or Incl. Tax in catalog,Product Price and Shipping Excl. Tax or Incl. Tax in catalog
29
+ Enable tracker logs (var/log/beezup.log),Enable tracker logs (var/log/beezup.log)
30
+ Only this IP address will be able to read the flow (leave empty to disable the restriction),Only this IP address will be able to read the flow (leave empty to disable the restriction)
31
+ Protects the flow by a unique key (Eg: 85ds6f7): www.yoursite.com/beezup/catalog/xml/key/85ds6f7/,Protects the flow by a unique key (Eg: 85ds6f7): www.yoursite.com/beezup/catalog/xml/key/85ds6f7/
32
+ Product Price Excl. Tax or Incl. Tax in catalog,Product Price Excl. Tax or Incl. Tax in catalog
33
+ Enter eg 1-2 for 1 to 2 days,Enter eg 1-2 for 1 to 2 days
34
+ Enter eg 6-8 for 6 to 8 days,Enter eg 6-8 for 6 to 8 days
35
+ Field Separator,Field Separator
36
+ Get your Store ID from My trackers page in your BeezUP account,Get your Store ID from My trackers page in your BeezUP account
37
+ Only for CSV file,Only for CSV file
38
+ Use Catalog Price Rules,Use Catalog Price Rules
39
+ Let off if Catalog Price Rules are not used,Let off if Catalog Price Rules are not used
40
+ Debug Mode,Debug Mode
41
+ Limit the number of products,Limit the number of products
42
+ Table Rates,Table Rates
43
+ Use Table Rates (only Weight vs. Destination),Use Table Rates (only Weight vs. Destination)
44
+ Add Byte Order Mark (BOM),Add Byte Order Mark (BOM)
45
+ Tag position,Tag position
46
+ Head,Head
47
+ Before body end,Before body end
48
+ b_unique_id,unique_id
49
+ b_sku,sku
50
+ b_title,title
51
+ b_description,description
52
+ b_price,price
53
+ b_product_url,product_url
54
+ b_product_image,product_image
55
+ b_shipping,shipping
56
+ b_availability,availability
57
+ b_qty,qty
58
+ b_delivery,delivery
59
+ b_regular_price,regular_price
60
+ b_category_%s,category_%s
61
+ b_weight,weight
62
+ Total orders amount,Total orders amount
63
+ Excl. Tax - without shipping costs,Excl. Tax - without shipping costs
64
+ Excl. Tax - with shipping costs,Excl. Tax - with shipping costs
65
+ Incl. Tax - without shipping costs,Incl. Tax - without shipping costs
66
+ Incl. Tax - with shipping costs,Incl. Tax - with shipping costs
67
+ Filter out of stock products,Filter out of stock products
app/locale/fr_FR/BeezUp.csv ADDED
@@ -0,0 +1,67 @@
1
+ Short Description,Description courte
2
+ Description,Description longue
3
+ Meta Description,Meta description
4
+ Product description,Description du produit
5
+ Excl. Tax,HT
6
+ Incl. Tax,TTC
7
+ No,Non
8
+ Yes,Oui
9
+ In Stock,En stock
10
+ Out of Stock,Hors stock
11
+ Tracking,Tracking
12
+ Catalog Flow,Flux
13
+ Enabled,Activer
14
+ Store ID,Store ID
15
+ Calculate product margin,Calculer la marge
16
+ 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,Délais de livraison si produit en stock
25
+ Delivery Time if Product out of Stock,Délais de livraison si produit hors stock
26
+ Specific Attributes,Attributs spécifiques
27
+ The field cost must be indicated for all products,Le champ coût 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 désactiver la restriction)
31
+ Protects the flow by a unique key (Eg: 85ds6f7): www.yoursite.com/beezup/catalog/xml/key/85ds6f7/,Protége 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,Séparateur de champs
36
+ Get your Store ID from My trackers page in your BeezUP account,Récupérez 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 régles de prix catalogue
39
+ Let off if Catalog Price Rules are not used,Désactiver si les régles de prix catalogue ne sont pas utlisé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éférence)
45
+ Tag position,Position du tag
46
+ Head,En-tête (head)
47
+ Before body end,En bas de page (body)
48
+ b_unique_id,identifiant_unique
49
+ b_sku,sku
50
+ b_title,titre
51
+ b_description,description
52
+ b_price,prix
53
+ b_product_url,url_produit
54
+ b_product_image,url_image
55
+ b_shipping,port
56
+ b_availability,disponibilite
57
+ b_qty,qte
58
+ b_delivery,delai_de_livraison
59
+ b_regular_price,prix_barre
60
+ b_category_%s,categorie_%s
61
+ b_weight,poids
62
+ Total orders amount,Montant total des commandes
63
+ Excl. Tax - without shipping costs,HT - sans frais de port
64
+ Excl. Tax - with shipping costs,HT - avec frais de port
65
+ Incl. Tax - without shipping costs,TTC - sans frais de port
66
+ Incl. Tax - with shipping costs,TTC - avec frais de port
67
+ Filter out of stock products,Filtrer les produits hors stock
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.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>
@@ -42,11 +42,12 @@ After Set-up, the following files are added :&lt;/p&gt;&#xD;
42
<notes>New features :&#xD;
43
&gt; Cache generation to avoid useless re-generation of the feed&#xD;
44
&gt; Grouped products are now exported in the xml and configurable feeds&#xD;
45
- &gt; Fixed bug to take into account promotion dates</notes>
46
<authors><author><name>BeezUP</name><user>BeezUP</user><email>charles@beezup.com</email></author></authors>
47
<date>2014-01-16</date>
48
- <time>10:48:41</time>
49
- <contents><target name="magecommunity"><dir name="BeezUp"><dir name="Block"><file name="Tracking.php" hash="455b06ca7208bab816f227980ff97f67"/><file name="Xml.php" hash="228383cc221619fc4a0f75220a5931b1"/></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="b695245cdd203b370ac6c9ec0fd7a5a9"/><file name="system.xml" hash="71be4ae2f024c0433cf045d46044b74f"/></dir></dir></target></contents>
50
<compatible/>
51
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
52
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>BeezUP_Module_feed_and_tracker</name>
4
+ <version>3.1.1</version>
5
<stability>stable</stability>
6
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
<channel>community</channel>
42
<notes>New features :&#xD;
43
&gt; Cache generation to avoid useless re-generation of the feed&#xD;
44
&gt; Grouped products are now exported in the xml and configurable feeds&#xD;
45
+ &gt; Fixed bug to take into account promotion dates&#xD;
46
+ &gt; Fixed various bugs</notes>
47
<authors><author><name>BeezUP</name><user>BeezUP</user><email>charles@beezup.com</email></author></authors>
48
<date>2014-01-16</date>
49
+ <time>15:32:01</time>
50
+ <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="b695245cdd203b370ac6c9ec0fd7a5a9"/><file name="system.xml" hash="71be4ae2f024c0433cf045d46044b74f"/></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="b9fb62b5214234682809685d7f732f0f"/></dir><dir name="en_US"><file name="BeezUp.csv" hash="98a22e98c4da4053f1c4e98d46ce1d61"/></dir></target></contents>
51
<compatible/>
52
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
53
</package>