Mage_Codi - Version 4.2.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.2.0
Comparing to
See all releases


Code changes from version 4.1.9 to 4.2.0

app/code/community/Mage/CodiScript/Model/Files.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- // 2015-02-17
3
  class ConfiguredProductLine{
4
  public $optionIds = array();
5
  public $line = NULL;
@@ -84,7 +84,7 @@ class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
84
  $products = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->getCollection();
85
  $products->addAttributeToFilter('status', 1);//enabled
86
  $products->addAttributeToFilter('visibility', 4);//catalog, search
87
- $prodIds = $this->_DEBUG ? $products->getAllIds(1000,0) : $products->getAllIds();
88
  if( $this->_DEBUG ) echo "StoreId: ".$this->StoreId."
89
  Products: ".count($prodIds)."
90
  Media URL: ".$this->mediaurl."
@@ -238,7 +238,13 @@ thumbnail: ".$product->getThumbnail()."
238
  $UsedProducts = array();
239
  foreach( $AssociatedProductIds as $UsedProductid ){
240
  $UsedProduct = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->load( $UsedProductid );
241
- $UsedProducts[] = $UsedProduct;
 
 
 
 
 
 
242
  }
243
  $renderSPrice = FALSE;
244
  if( $this->includespecialprice ){
@@ -255,12 +261,13 @@ thumbnail: ".$product->getThumbnail()."
255
  $inventory = $this->catalogInventoryModel->loadByProduct( $UsedProduct );
256
  $qty = $inventory->getQty();
257
  $minQty = $inventory->getMinQty();
258
- if( $this->_DEBUG ) echo "sku=".$UsedProduct->getSku()." qty=".$qty." minQty=".$minQty."
 
259
  ";
260
- if( $qty <= $minQty )
261
  continue;
 
262
  }
263
- if( $this->_DEBUG ) echo "sku=".$UsedProduct->getSku()." prices: Regular=".$UsedProduct->getData('price')." Final=".$UsedProduct->getFinalPrice()." Special=".$UsedProduct->getSpecialPrice()." FromDate=".$UsedProduct->getSpecialFromDate()." ToDate=".$UsedProduct->getSpecialToDate()."
264
  ";
265
  $ItemName= $UsedProduct->getName();
266
  $ProdRPrice = $UsedProduct->getData('price');
@@ -621,7 +628,13 @@ thumbnail: ".$product->getThumbnail()."
621
  $UsedProducts = array();
622
  foreach( $UsedProductIds as $UsedProductid ){
623
  $UsedProduct = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->load( $UsedProductid );
624
- $UsedProducts[ $UsedProductid ] = $UsedProduct;
 
 
 
 
 
 
625
  }
626
  $cpLines = array();
627
  foreach( $UsedProducts as $UsedProductid => $UsedProduct ){
@@ -630,10 +643,11 @@ thumbnail: ".$product->getThumbnail()."
630
  $inventory = $this->catalogInventoryModel->loadByProduct( $UsedProduct );
631
  $qty = $inventory->getQty();
632
  $minQty = $inventory->getMinQty();
633
- if( $this->_DEBUG ) echo "sku=".$UsedProduct->getSku()." qty=".$qty." minQty=".$minQty."
 
634
  ";
635
- if( $qty <= $minQty )
636
  continue;
 
637
  }
638
  if( ! $this->getpricefromchild ){
639
  $RPrice = $ProdRPrice;
1
  <?php
2
+ // 2015-03-02
3
  class ConfiguredProductLine{
4
  public $optionIds = array();
5
  public $line = NULL;
84
  $products = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->getCollection();
85
  $products->addAttributeToFilter('status', 1);//enabled
86
  $products->addAttributeToFilter('visibility', 4);//catalog, search
87
+ $prodIds = $products->getAllIds();
88
  if( $this->_DEBUG ) echo "StoreId: ".$this->StoreId."
89
  Products: ".count($prodIds)."
90
  Media URL: ".$this->mediaurl."
238
  $UsedProducts = array();
239
  foreach( $AssociatedProductIds as $UsedProductid ){
240
  $UsedProduct = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->load( $UsedProductid );
241
+ if( $UsedProduct->getStatus() == 1 ){
242
+ $UsedProducts[] = $UsedProduct;
243
+ } else {
244
+ if( $this->_DEBUG ) echo "sku=".$UsedProduct->getSku()." enabled=".$UsedProduct->getStatus()." - bypassed.
245
+ ";
246
+ unset( $UsedProduct );
247
+ }
248
  }
249
  $renderSPrice = FALSE;
250
  if( $this->includespecialprice ){
261
  $inventory = $this->catalogInventoryModel->loadByProduct( $UsedProduct );
262
  $qty = $inventory->getQty();
263
  $minQty = $inventory->getMinQty();
264
+ if( $qty <= $minQty ){
265
+ if( $this->_DEBUG ) echo "sku=".$UsedProduct->getSku()." enabled=".$UsedProduct->getStatus()." qty=".$qty." minQty=".$minQty." - bypassing.
266
  ";
 
267
  continue;
268
+ }
269
  }
270
+ if( $this->_DEBUG ) echo "sku=".$UsedProduct->getSku()." enabled=".$UsedProduct->getStatus()." prices: Regular=".$UsedProduct->getData('price')." Final=".$UsedProduct->getFinalPrice()." Special=".$UsedProduct->getSpecialPrice()." FromDate=".$UsedProduct->getSpecialFromDate()." ToDate=".$UsedProduct->getSpecialToDate()."
271
  ";
272
  $ItemName= $UsedProduct->getName();
273
  $ProdRPrice = $UsedProduct->getData('price');
628
  $UsedProducts = array();
629
  foreach( $UsedProductIds as $UsedProductid ){
630
  $UsedProduct = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->load( $UsedProductid );
631
+ if( $UsedProduct->getStatus() == 1 ){
632
+ $UsedProducts[ $UsedProductid ] = $UsedProduct;
633
+ } else {
634
+ if( $this->_DEBUG ) echo "sku=".$UsedProduct->getSku()." enabled=".$UsedProduct->getStatus()." - bypassed.
635
+ ";
636
+ unset( $UsedProduct );
637
+ }
638
  }
639
  $cpLines = array();
640
  foreach( $UsedProducts as $UsedProductid => $UsedProduct ){
643
  $inventory = $this->catalogInventoryModel->loadByProduct( $UsedProduct );
644
  $qty = $inventory->getQty();
645
  $minQty = $inventory->getMinQty();
646
+ if( $qty <= $minQty ){
647
+ if( $this->_DEBUG ) echo "sku=".$UsedProduct->getSku()." qty=".$qty." minQty=".$minQty." - bypassing.
648
  ";
 
649
  continue;
650
+ }
651
  }
652
  if( ! $this->getpricefromchild ){
653
  $RPrice = $ProdRPrice;
app/code/community/Mage/CodiScript/controllers/IndexController.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- define("__VERSION__","2015-02-17");
3
  define("__SCRIPTNAME__",basename(__FILE__));
4
 
5
  class Mage_CodiScript_IndexController extends Mage_Core_Controller_Front_Action{
@@ -233,6 +233,9 @@ executed in ".( time() - $started_time )." sec.
233
  ";
234
  die();
235
  /* RELEASE NOTES
 
 
 
236
  * 2015-02-17
237
  * Fixed call-time pass-by-reference bug
238
  *
1
  <?php
2
+ define("__VERSION__","2015-03-02");
3
  define("__SCRIPTNAME__",basename(__FILE__));
4
 
5
  class Mage_CodiScript_IndexController extends Mage_Core_Controller_Front_Action{
233
  ";
234
  die();
235
  /* RELEASE NOTES
236
+ * 2015-03-02
237
+ * Filtering out disabled products improved for associated products of configurable products
238
+ *
239
  * 2015-02-17
240
  * Fixed call-time pass-by-reference bug
241
  *
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Mage_Codi</name>
4
- <version>4.1.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>2015-02-18</date>
14
- <time>23:18:46</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="886fa15e1c5c2739569e14737d6af5bd"/></dir><dir name="controllers"><file name="IndexController.php" hash="d54b5a6d1ae1610efbf9256be78c9881"/></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.2.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>2015-03-02</date>
14
+ <time>17:31:37</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="5b5801b0a9d13eef80c2800028e67071"/></dir><dir name="controllers"><file name="IndexController.php" hash="35dc155f02fb018d2d6d954d7a588551"/></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>