Mage_Codi - Version 4.1.0

Version Notes

Please contact our support desk if you have any problems.

Download this release

Release Info

Developer Magento Core Team
Extension Mage_Codi
Version 4.1.0
Comparing to
See all releases


Code changes from version 4.0.9 to 4.1.0

app/code/community/Mage/CodiScript/Model/Files.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- // 2013-10-30
3
  class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
4
  public $version = VERSION;
5
  public $Store;
@@ -54,11 +54,11 @@ class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
54
  }
55
  $this->productTypeConfigurableModel = Mage::getModel('catalog/product_type_configurable');
56
  $this->productTypeGroupedModel = Mage::getModel('catalog/product_type_grouped');
57
- $this->reviewsModel = Mage::getModel('review/review');
58
- $this->cataloginventoryModel = Mage::getModel('cataloginventory/stock_item');
59
  $this->mediaurl = Mage::getBaseUrl( Mage_Core_Model_Store::URL_TYPE_MEDIA );
60
  $this->prodmediaurl = $this->mediaurl."catalog/product";
61
- $products = Mage::getModel('catalog/product')->getCollection();
62
  $products->addAttributeToFilter('status', 1);//enabled
63
  $products->addAttributeToFilter('visibility', 4);//catalog, search
64
  $prodIds = $this->_DEBUG ? $products->getAllIds(1000,0) : $products->getAllIds();
@@ -67,7 +67,7 @@ Products: ".count($prodIds)."
67
  Media URL: ".$this->mediaurl."
68
  memory_get_usage ".memory_get_usage()." / ".memory_get_usage(TRUE)."
69
  ";
70
- if( $this->start == 0 ) echo "itemNumber\titemQty\titemUom\titemPrice\titemDescription\titemLink\titemAttributes\titemGraphic\tproductName\tproductDescription\tproductGraphic\tproductLink\tproductAttributes\tManufacturer\tCategory\tReviews\tSupplementalInfo
71
  ";
72
  $count = 0;
73
  $index = 0;
@@ -182,8 +182,9 @@ product thumbnail : ".$product->getThumbnail()."
182
  $Reviews = $this->enablereviews ? $this->getReviews($product->getId()) : '';
183
  if( !empty( $Reviews ) )
184
  $Reviews = $this->cleanStr( $Reviews );
 
185
  foreach($AssociatedProductIds as $UsedProductid){
186
- $UsedProduct = Mage::getModel('catalog/product')->load( $UsedProductid );
187
  $ItemName= $UsedProduct->getName();
188
  if( $this->getpricefromchild ) {
189
  $Price = $UsedProduct->getFinalPrice();
@@ -282,8 +283,10 @@ product thumbnail : ".$product->getThumbnail()."
282
  . "\t" //Category
283
  . "\t". $Reviews //Reviews
284
  . "\t". $shortDescription
 
285
  . "\n";
286
  unset( $UsedProduct );
 
287
  }
288
  unset( $AssociatedProductIds );
289
  return $ProducttoString;
@@ -372,8 +375,9 @@ product thumbnail : ".$product->getThumbnail()."
372
  $Reviews = $this->enablereviews ? $this->getReviews($product->getId()) : '';
373
  if( !empty( $Reviews ) )
374
  $Reviews = $this->cleanStr( $Reviews );
 
375
  foreach($UsedProductIds as $UsedProductid){
376
- $UsedProduct = Mage::getModel('catalog/product')->load( $UsedProductid );
377
  if( $this->getpricefromchild ) {
378
  $Price = $UsedProduct->getFinalPrice();
379
  $sPrice = $UsedProduct->getSpecialPrice();
@@ -497,8 +501,10 @@ config item thumbnail : ".$UsedProduct->getThumbnail()."
497
  . "\t" //Category
498
  . "\t" . $Reviews //Reviews
499
  . "\t" . $shortDescription
 
500
  . "\n";
501
  unset( $UsedProduct );
 
502
  }
503
  unset( $UsedProductIds );
504
  return $ProducttoString;
@@ -637,6 +643,7 @@ product thumbnail : ".$product->getThumbnail()."
637
  . "\t" //Category
638
  . "\t" . $Reviews //Reviews
639
  . "\t" . $shortDescription
 
640
  . "\n";
641
  return $ProducttoString;
642
  }
@@ -722,8 +729,9 @@ product thumbnail : ".$product->getThumbnail()."
722
 
723
  // Class=CatalogSection
724
  public function renderCatalogSection(){
725
- $categories = Mage::getModel('catalog/category')->getCollection()
726
  ->setStoreId( $this->StoreId )
 
727
  ->addAttributeToSelect('name')
728
  ->addAttributeToFilter('level', array('eq' => 2))
729
  ->addAttributeToFilter('is_active', array('eq' => 1))
@@ -789,8 +797,9 @@ product thumbnail : ".$product->getThumbnail()."
789
  // Class=CatalogProject
790
  public function renderCatalogProject(){
791
  $this->productTypeConfigurableModel = Mage::getModel('catalog/product_type_configurable');
792
- $categories = Mage::getModel('catalog/category')->getCollection()
793
  ->setStoreId( $this->StoreId )
 
794
  ->addAttributeToSelect('name')
795
  ->addAttributeToFilter('level', array('eq' => 2))
796
  ->addAttributeToFilter('is_active', array('eq' => 1))
@@ -818,7 +827,7 @@ product thumbnail : ".$product->getThumbnail()."
818
  $this->unCatPosition = 1;
819
  echo "proj_Key\tproj_ProdName\tproj_Sequence\tproj_Name\tproj_HierarchyPath\tproj_Flag\tproj_ProdLayout
820
  ";
821
- $products = Mage::getModel('catalog/product')->getCollection();
822
  $products->addAttributeToFilter('status', 1);//enabled
823
  $products->addAttributeToFilter('visibility', 4);//catalog, search
824
  $prodIds = $this->_DEBUG ? $products->getAllIds(1000,0) : $products->getAllIds();
1
  <?php
2
+ // 2014-01-16
3
  class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
4
  public $version = VERSION;
5
  public $Store;
54
  }
55
  $this->productTypeConfigurableModel = Mage::getModel('catalog/product_type_configurable');
56
  $this->productTypeGroupedModel = Mage::getModel('catalog/product_type_grouped');
57
+ $this->reviewsModel = Mage::getModel('review/review')->setStoreId( $this->StoreId );
58
+ $this->cataloginventoryModel = Mage::getModel('cataloginventory/stock_item')->setStoreId( $this->StoreId );
59
  $this->mediaurl = Mage::getBaseUrl( Mage_Core_Model_Store::URL_TYPE_MEDIA );
60
  $this->prodmediaurl = $this->mediaurl."catalog/product";
61
+ $products = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->getCollection();
62
  $products->addAttributeToFilter('status', 1);//enabled
63
  $products->addAttributeToFilter('visibility', 4);//catalog, search
64
  $prodIds = $this->_DEBUG ? $products->getAllIds(1000,0) : $products->getAllIds();
67
  Media URL: ".$this->mediaurl."
68
  memory_get_usage ".memory_get_usage()." / ".memory_get_usage(TRUE)."
69
  ";
70
+ if( $this->start == 0 ) echo "itemNumber\titemQty\titemUom\titemPrice\titemDescription\titemLink\titemAttributes\titemGraphic\tproductName\tproductDescription\tproductGraphic\tproductLink\tproductAttributes\tManufacturer\tCategory\tReviews\tSupplementalInfo\titemSequence
71
  ";
72
  $count = 0;
73
  $index = 0;
182
  $Reviews = $this->enablereviews ? $this->getReviews($product->getId()) : '';
183
  if( !empty( $Reviews ) )
184
  $Reviews = $this->cleanStr( $Reviews );
185
+ $sequence = 1;
186
  foreach($AssociatedProductIds as $UsedProductid){
187
+ $UsedProduct = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->load( $UsedProductid );
188
  $ItemName= $UsedProduct->getName();
189
  if( $this->getpricefromchild ) {
190
  $Price = $UsedProduct->getFinalPrice();
283
  . "\t" //Category
284
  . "\t". $Reviews //Reviews
285
  . "\t". $shortDescription
286
+ . "\t". $sequence
287
  . "\n";
288
  unset( $UsedProduct );
289
+ $sequence++;
290
  }
291
  unset( $AssociatedProductIds );
292
  return $ProducttoString;
375
  $Reviews = $this->enablereviews ? $this->getReviews($product->getId()) : '';
376
  if( !empty( $Reviews ) )
377
  $Reviews = $this->cleanStr( $Reviews );
378
+ $sequence = 1;
379
  foreach($UsedProductIds as $UsedProductid){
380
+ $UsedProduct = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->load( $UsedProductid );
381
  if( $this->getpricefromchild ) {
382
  $Price = $UsedProduct->getFinalPrice();
383
  $sPrice = $UsedProduct->getSpecialPrice();
501
  . "\t" //Category
502
  . "\t" . $Reviews //Reviews
503
  . "\t" . $shortDescription
504
+ . "\t". $sequence
505
  . "\n";
506
  unset( $UsedProduct );
507
+ $sequence++;
508
  }
509
  unset( $UsedProductIds );
510
  return $ProducttoString;
643
  . "\t" //Category
644
  . "\t" . $Reviews //Reviews
645
  . "\t" . $shortDescription
646
+ . "\t1"
647
  . "\n";
648
  return $ProducttoString;
649
  }
729
 
730
  // Class=CatalogSection
731
  public function renderCatalogSection(){
732
+ $categories = Mage::getModel('catalog/category')
733
  ->setStoreId( $this->StoreId )
734
+ ->getCollection()
735
  ->addAttributeToSelect('name')
736
  ->addAttributeToFilter('level', array('eq' => 2))
737
  ->addAttributeToFilter('is_active', array('eq' => 1))
797
  // Class=CatalogProject
798
  public function renderCatalogProject(){
799
  $this->productTypeConfigurableModel = Mage::getModel('catalog/product_type_configurable');
800
+ $categories = Mage::getModel('catalog/category')
801
  ->setStoreId( $this->StoreId )
802
+ ->getCollection()
803
  ->addAttributeToSelect('name')
804
  ->addAttributeToFilter('level', array('eq' => 2))
805
  ->addAttributeToFilter('is_active', array('eq' => 1))
827
  $this->unCatPosition = 1;
828
  echo "proj_Key\tproj_ProdName\tproj_Sequence\tproj_Name\tproj_HierarchyPath\tproj_Flag\tproj_ProdLayout
829
  ";
830
+ $products = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->getCollection();
831
  $products->addAttributeToFilter('status', 1);//enabled
832
  $products->addAttributeToFilter('visibility', 4);//catalog, search
833
  $prodIds = $this->_DEBUG ? $products->getAllIds(1000,0) : $products->getAllIds();
app/code/community/Mage/CodiScript/controllers/IndexController.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- define("VERSION","2013-10-30");
3
 
4
  class Mage_CodiScript_IndexController extends Mage_Core_Controller_Front_Action{
5
  public function indexAction(){
@@ -166,8 +166,6 @@ if($Class=="DataFile"){
166
  $cfModel->taxhelper=Mage::helper('tax');
167
  }else if( $Class=="CatalogSection" ){
168
  $cfModel->ignoretopcategory = $ignoretopcategory;
169
- $cfModel->start = $start;
170
- $cfModel->pageSize = $pageSize;
171
  }else if( $Class=="CatalogProject" ){
172
  $cfModel->ignoretopcategory = $ignoretopcategory;
173
  $cfModel->start = $start;
@@ -206,6 +204,9 @@ executed in ".( time() - $started_time )." sec.
206
  ";
207
  die();
208
  /* RELEASE NOTES
 
 
 
209
  * 2013-10-30
210
  * 1. Added includespecialprice / includespecialpricedatefrom / includespecialpricedateto request parameter / processing
211
  * (population of item attributes with special price / dates)
1
  <?php
2
+ define("VERSION","2014-01-16");
3
 
4
  class Mage_CodiScript_IndexController extends Mage_Core_Controller_Front_Action{
5
  public function indexAction(){
166
  $cfModel->taxhelper=Mage::helper('tax');
167
  }else if( $Class=="CatalogSection" ){
168
  $cfModel->ignoretopcategory = $ignoretopcategory;
 
 
169
  }else if( $Class=="CatalogProject" ){
170
  $cfModel->ignoretopcategory = $ignoretopcategory;
171
  $cfModel->start = $start;
204
  ";
205
  die();
206
  /* RELEASE NOTES
207
+ * 2014-01-16
208
+ * 1. Fixed sequencing issue for grouped products
209
+ *
210
  * 2013-10-30
211
  * 1. Added includespecialprice / includespecialpricedatefrom / includespecialpricedateto request parameter / processing
212
  * (population of item attributes with special price / dates)
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Mage_Codi</name>
4
- <version>4.0.9</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>
@@ -10,9 +10,9 @@
10
  <description>Extension to connect to the Catalog-on-Demand service for making print catalogs, brochures, and flyers.</description>
11
  <notes>Please contact our support desk if you have any problems.</notes>
12
  <authors><author><name>catalogondemand</name><user>auto-converted</user><email>timh@catalog-on-demand.com</email></author></authors>
13
- <date>2013-11-01</date>
14
- <time>14:20:22</time>
15
- <contents><target name="magecommunity"><dir name="Mage"><dir name="CodiScript"><dir name="Helper"><file name="Data.php" hash="3f99660cb06a9dc09f024b9993d43a3f"/></dir><dir name="Model"><file name="Files.php" hash="0d3f131bbd17f4973cc5ae6d1265d3a6"/></dir><dir name="controllers"><file name="IndexController.php" hash="87567eb261d8e4037be64e67580c43e7"/></dir><dir name="etc"><file name="adminhtml.xml" hash="40ab0bd86928c5ba175988926a9f6aee"/><file name="config.xml" hash="b960e9bd106f0c94559baa2bc5761e18"/><file name="system.xml" hash="1b5e5b18bfdce6b85e304fb4ef877274"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_CodiScript.xml" hash="f0502cac7918fc798b3b02d3d4b7e7fd"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="codiscript.xml" hash="066f99333a6054e11943a75413f65ff0"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="codi"><file name="password_validation.js" hash="7223aeed118bb5774c73f951460ae0b0"/></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Mage_CodiScript.csv" hash="183fc591065ced83f878a4c3e23f854c"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Mage_Codi</name>
4
+ <version>4.1.0</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>
10
  <description>Extension to connect to the Catalog-on-Demand service for making print catalogs, brochures, and flyers.</description>
11
  <notes>Please contact our support desk if you have any problems.</notes>
12
  <authors><author><name>catalogondemand</name><user>auto-converted</user><email>timh@catalog-on-demand.com</email></author></authors>
13
+ <date>2014-01-16</date>
14
+ <time>23:47:08</time>
15
+ <contents><target name="magecommunity"><dir name="Mage"><dir name="CodiScript"><dir name="Helper"><file name="Data.php" hash="3f99660cb06a9dc09f024b9993d43a3f"/></dir><dir name="Model"><file name="Files.php" hash="9c166be2cb8f587516d4ebdaadacec20"/></dir><dir name="controllers"><file name="IndexController.php" hash="36330c372b4778f6726568be15c75751"/></dir><dir name="etc"><file name="adminhtml.xml" hash="40ab0bd86928c5ba175988926a9f6aee"/><file name="config.xml" hash="b960e9bd106f0c94559baa2bc5761e18"/><file name="system.xml" hash="1b5e5b18bfdce6b85e304fb4ef877274"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_CodiScript.xml" hash="f0502cac7918fc798b3b02d3d4b7e7fd"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="codiscript.xml" hash="066f99333a6054e11943a75413f65ff0"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="codi"><file name="password_validation.js" hash="7223aeed118bb5774c73f951460ae0b0"/></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Mage_CodiScript.csv" hash="183fc591065ced83f878a4c3e23f854c"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>