Version Notes
Version 1.1.5
- correction bug stock
Version 1.1.4
- correction gestion des attributs
Version 1.1.2
-gestion des attributs
Version 1.1.1
-Fix Bug with XML cdata
Version 1.1.0
-Fix Bug with setHeader
Version 1.0.0
-1st release
Download this release
Release Info
Developer | Magento Core Team |
Extension | Lengow_Export |
Version | 1.1.5 |
Comparing to | |
See all releases |
Code changes from version 1.1.4 to 1.1.5
- app/code/local/Lengow/Export/Model/Products.php +8 -8
- app/code/local/Lengow/Export/Model/System/Config/Source/Attributes.php +1 -1
- app/code/local/Lengow/Export/Model/System/Config/Source/Description.php +4 -4
- app/code/local/Lengow/Export/Model/System/Config/Source/Price.php +3 -3
- app/code/local/Lengow/Export/controllers/IndexController.php +2 -1
- package.xml +8 -5
app/code/local/Lengow/Export/Model/Products.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class
|
4 |
|
5 |
public function getProducts() {
|
6 |
$products = Mage::getResourceModel('catalog/product_collection')
|
@@ -13,13 +13,13 @@ class Magentix_BeezUp_Model_Products extends Mage_Core_Model_Abstract {
|
|
13 |
->addAttributeToSelect('price')
|
14 |
->addAttributeToSelect('special_price')
|
15 |
->addAttributeToSelect('small_image')
|
16 |
-
->addAttributeToSelect(Mage::getStoreConfig('
|
17 |
->addStoreFilter();
|
18 |
|
19 |
-
$attributes = explode(',',Mage::getStoreConfig('
|
20 |
foreach($attributes as $a) $products->addAttributeToSelect($a);
|
21 |
|
22 |
-
if(Mage::getStoreConfig('
|
23 |
|
24 |
return $products;
|
25 |
}
|
@@ -27,7 +27,7 @@ class Magentix_BeezUp_Model_Products extends Mage_Core_Model_Abstract {
|
|
27 |
public function f($tagName,$content,$data=0) {
|
28 |
$result = '<'.$tagName.'>';
|
29 |
if($data) $result .= '<![CDATA[';
|
30 |
-
$result .= preg_replace('(^'.Mage::helper('
|
31 |
if($data) $result .= ']]>';
|
32 |
$result .= '</'.$tagName.'>';
|
33 |
return $result;
|
@@ -54,7 +54,7 @@ class Magentix_BeezUp_Model_Products extends Mage_Core_Model_Abstract {
|
|
54 |
if($weight <= $t->getConditionValue()) $shipping_amount = $t->getPrice();
|
55 |
}
|
56 |
} else {
|
57 |
-
$shipping_amount = preg_replace('(\,+)','.',trim(Mage::getStoreConfig('
|
58 |
if(!is_numeric($shipping_amount)) $shipping_amount = 0;
|
59 |
}
|
60 |
return $shipping_amount;
|
@@ -65,11 +65,11 @@ class Magentix_BeezUp_Model_Products extends Mage_Core_Model_Abstract {
|
|
65 |
}
|
66 |
|
67 |
public function getIsStock($qty) {
|
68 |
-
return ($qty > 0) ? Mage::helper('
|
69 |
}
|
70 |
|
71 |
public function getLivraison($qty) {
|
72 |
-
return ($qty > 0) ? Mage::getStoreConfig('
|
73 |
}
|
74 |
|
75 |
public function getCategoriesAsArray($categories,$parent='',&$cats=array()) {
|
1 |
<?php
|
2 |
|
3 |
+
class Lengow_Model_Products extends Mage_Core_Model_Abstract {
|
4 |
|
5 |
public function getProducts() {
|
6 |
$products = Mage::getResourceModel('catalog/product_collection')
|
13 |
->addAttributeToSelect('price')
|
14 |
->addAttributeToSelect('special_price')
|
15 |
->addAttributeToSelect('small_image')
|
16 |
+
->addAttributeToSelect(Mage::getStoreConfig('lengow/flux/description'))
|
17 |
->addStoreFilter();
|
18 |
|
19 |
+
$attributes = explode(',',Mage::getStoreConfig('lengow/flux/attributes'));
|
20 |
foreach($attributes as $a) $products->addAttributeToSelect($a);
|
21 |
|
22 |
+
if(Mage::getStoreConfig('lengow/flux/debug_flux')) $products->setPageSize(10);
|
23 |
|
24 |
return $products;
|
25 |
}
|
27 |
public function f($tagName,$content,$data=0) {
|
28 |
$result = '<'.$tagName.'>';
|
29 |
if($data) $result .= '<![CDATA[';
|
30 |
+
$result .= preg_replace('(^'.Mage::helper('lengow')->__('No').'$)','',trim($content));
|
31 |
if($data) $result .= ']]>';
|
32 |
$result .= '</'.$tagName.'>';
|
33 |
return $result;
|
54 |
if($weight <= $t->getConditionValue()) $shipping_amount = $t->getPrice();
|
55 |
}
|
56 |
} else {
|
57 |
+
$shipping_amount = preg_replace('(\,+)','.',trim(Mage::getStoreConfig('lengow/flux/ship')));
|
58 |
if(!is_numeric($shipping_amount)) $shipping_amount = 0;
|
59 |
}
|
60 |
return $shipping_amount;
|
65 |
}
|
66 |
|
67 |
public function getIsStock($qty) {
|
68 |
+
return ($qty > 0) ? Mage::helper('lengow')->__('In Stock') : Mage::helper('lengow')->__('Out of Stock');
|
69 |
}
|
70 |
|
71 |
public function getLivraison($qty) {
|
72 |
+
return ($qty > 0) ? Mage::getStoreConfig('lengow/flux/days_in') : Mage::getStoreConfig('lengow/flux/days_out');
|
73 |
}
|
74 |
|
75 |
public function getCategoriesAsArray($categories,$parent='',&$cats=array()) {
|
app/code/local/Lengow/Export/Model/System/Config/Source/Attributes.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class
|
4 |
|
5 |
public function toOptionArray() {
|
6 |
|
1 |
<?php
|
2 |
|
3 |
+
class Lengow_Model_System_Config_Source_Attributes {
|
4 |
|
5 |
public function toOptionArray() {
|
6 |
|
app/code/local/Lengow/Export/Model/System/Config/Source/Description.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class
|
4 |
|
5 |
public function toOptionArray() {
|
6 |
return array(
|
7 |
-
array('value'=>'short_description', 'label'=>Mage::helper('
|
8 |
-
array('value'=>'description', 'label'=>Mage::helper('
|
9 |
-
array('value'=>'meta_description', 'label'=>Mage::helper('
|
10 |
);
|
11 |
}
|
12 |
|
1 |
<?php
|
2 |
|
3 |
+
class Lengow_Model_System_Config_Source_Description {
|
4 |
|
5 |
public function toOptionArray() {
|
6 |
return array(
|
7 |
+
array('value'=>'short_description', 'label'=>Mage::helper('lengow')->__('Short Description')),
|
8 |
+
array('value'=>'description', 'label'=>Mage::helper('lengow')->__('Description')),
|
9 |
+
array('value'=>'meta_description', 'label'=>Mage::helper('lengow')->__('Meta Description')),
|
10 |
);
|
11 |
}
|
12 |
|
app/code/local/Lengow/Export/Model/System/Config/Source/Price.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class
|
4 |
|
5 |
public function toOptionArray() {
|
6 |
return array(
|
7 |
-
array('value'=>1, 'label'=>Mage::helper('
|
8 |
-
array('value'=>0, 'label'=>Mage::helper('
|
9 |
);
|
10 |
}
|
11 |
|
1 |
<?php
|
2 |
|
3 |
+
class Lengow_Model_System_Config_Source_Price {
|
4 |
|
5 |
public function toOptionArray() {
|
6 |
return array(
|
7 |
+
array('value'=>1, 'label'=>Mage::helper('lengow')->__('HT')),
|
8 |
+
array('value'=>0, 'label'=>Mage::helper('lengow')->__('TTC')),
|
9 |
);
|
10 |
}
|
11 |
|
app/code/local/Lengow/Export/controllers/IndexController.php
CHANGED
@@ -31,6 +31,7 @@ class Lengow_Export_IndexController extends Mage_Core_Controller_Front_Action
|
|
31 |
public function getContent($contentType = 'csv', $storeID = 0)
|
32 |
{
|
33 |
set_time_limit(0);
|
|
|
34 |
ini_set('display_errors', 1);
|
35 |
error_reporting(E_ALL ^ E_NOTICE);
|
36 |
|
@@ -100,7 +101,7 @@ class Lengow_Export_IndexController extends Mage_Core_Controller_Front_Action
|
|
100 |
$product_data['promo_from']=$product->getSpecialFromDate();
|
101 |
$product_data['promo_to']=$product->getSpecialToDate();
|
102 |
$product_data['availability']=$product->getStockItem()->getIsInStock();
|
103 |
-
$product_data['stock_descrip']
|
104 |
$product_data['link']=$product->getProductUrl();
|
105 |
$product_data['image_link']=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getImage();
|
106 |
|
31 |
public function getContent($contentType = 'csv', $storeID = 0)
|
32 |
{
|
33 |
set_time_limit(0);
|
34 |
+
ini_set('memory_limit', '256M');
|
35 |
ini_set('display_errors', 1);
|
36 |
error_reporting(E_ALL ^ E_NOTICE);
|
37 |
|
101 |
$product_data['promo_from']=$product->getSpecialFromDate();
|
102 |
$product_data['promo_to']=$product->getSpecialToDate();
|
103 |
$product_data['availability']=$product->getStockItem()->getIsInStock();
|
104 |
+
$product_data['stock_descrip']=(int)$product->getStockItem()->getQty();
|
105 |
$product_data['link']=$product->getProductUrl();
|
106 |
$product_data['image_link']=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getImage();
|
107 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Lengow_Export</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -11,7 +11,10 @@
|
|
11 |
|
12 |
Le principe est que la solution r&eacute;cup&egrave;re le catalogue produits du marchand, configure, optimise et tracke les informations des campagnes marchandes afin de restituer &agrave; l&apos;e-commer&ccedil;ant les statistiques sous forme de tableaux de bords et graphiques.
|
13 |
Ce processus permet aux e-commer&ccedil;ants d&apos;optimiser leurs flux et leurs co&ucirc;ts d&apos;acquisition sur chaque support de diffusion.</description>
|
14 |
-
<notes>Version 1.1.
|
|
|
|
|
|
|
15 |
- correction gestion des attributs
|
16 |
|
17 |
|
@@ -27,9 +30,9 @@ Version 1.1.0
|
|
27 |
Version 1.0.0
|
28 |
-1st release</notes>
|
29 |
<authors><author><name>Lengow</name><user>auto-converted</user><email>technique@lengow.com</email></author></authors>
|
30 |
-
<date>2010-
|
31 |
-
<time>
|
32 |
-
<contents><target name="magelocale"><dir name="en_US"><file name="Lengow_Export.csv" hash="abeaea80f731b4fa350091e0807cdbee"/><file name="Lengow_Information.csv" hash="86986a0717caed093e4178acf407f26c"/></dir><dir name="fr_FR"><file name="Lengow_Export.csv" hash="0bc75b767e6a51b07748f2362ff3f6f2"/><file name="Lengow_Information.csv" hash="cab993c6e862f67cef4a05229cbb2026"/></dir></target><target name="magelocal"><dir name="Lengow"><dir name="Export"><dir name="controllers"><file name="IndexController.php" hash="
|
33 |
<compatible/>
|
34 |
<dependencies/>
|
35 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Lengow_Export</name>
|
4 |
+
<version>1.1.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
11 |
|
12 |
Le principe est que la solution r&eacute;cup&egrave;re le catalogue produits du marchand, configure, optimise et tracke les informations des campagnes marchandes afin de restituer &agrave; l&apos;e-commer&ccedil;ant les statistiques sous forme de tableaux de bords et graphiques.
|
13 |
Ce processus permet aux e-commer&ccedil;ants d&apos;optimiser leurs flux et leurs co&ucirc;ts d&apos;acquisition sur chaque support de diffusion.</description>
|
14 |
+
<notes>Version 1.1.5
|
15 |
+
- correction bug stock
|
16 |
+
|
17 |
+
Version 1.1.4
|
18 |
- correction gestion des attributs
|
19 |
|
20 |
|
30 |
Version 1.0.0
|
31 |
-1st release</notes>
|
32 |
<authors><author><name>Lengow</name><user>auto-converted</user><email>technique@lengow.com</email></author></authors>
|
33 |
+
<date>2010-12-16</date>
|
34 |
+
<time>08:26:05</time>
|
35 |
+
<contents><target name="magelocale"><dir name="en_US"><file name="Lengow_Export.csv" hash="abeaea80f731b4fa350091e0807cdbee"/><file name="Lengow_Information.csv" hash="86986a0717caed093e4178acf407f26c"/></dir><dir name="fr_FR"><file name="Lengow_Export.csv" hash="0bc75b767e6a51b07748f2362ff3f6f2"/><file name="Lengow_Information.csv" hash="cab993c6e862f67cef4a05229cbb2026"/></dir></target><target name="magelocal"><dir name="Lengow"><dir name="Export"><dir name="controllers"><file name="IndexController.php" hash="dff5e2b3895775496697d75c1d426714"/></dir><dir name="etc"><file name="config.xml" hash="8210a1ad7fd08092b95a55de0498092c"/><file name="system.xml" hash="da7eb0bc7e16b26bae938a79fe4f5e05"/></dir><dir name="Helper"><file name="Data.php" hash="9bb8759af094885106efb1a53fe98b07"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Attributes.php" hash="9f77f955ec55e525a7489fcebc46fb71"/><file name="Categories.php" hash="9c2df4085d47dd5efec5b4cc2c2e501f"/><file name="Description.php" hash="00ea124c5ead43903076469afc58af60"/><file name="Price.php" hash="26765d4e51892c55dd6f6c9c28b3b2e6"/></dir></dir></dir><file name="Observer.php" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="Products.php" hash="fedba3d66954d8a8100628a2328ae8f8"/></dir></dir><dir name="Information"><dir name="etc"><file name="config.xml" hash="c83d19a3acd4186b7b2ea4f92abc8104"/><file name="system.xml" hash="e16fa28f8249be84adf447c099adeb95"/></dir><dir name="Helper"><file name="Data.php" hash="8063a9cfe2cf944b1d1a6ac65a6b57d0"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Lengow_All.xml" hash="d212244e63e3d5dd55d33981a9d725bf"/></dir></target></contents>
|
36 |
<compatible/>
|
37 |
<dependencies/>
|
38 |
</package>
|