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.0.8 |
| Comparing to | |
| See all releases | |
Code changes from version 4.0.7 to 4.0.8
app/code/community/Mage/CodiScript/Model/Files.php
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
<?php
|
| 2 |
-
// 2013-
|
| 3 |
class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
|
| 4 |
public $version = VERSION;
|
| 5 |
public $Store;
|
| 6 |
public $StoreId;
|
| 7 |
public $reviewsModel;
|
|
|
|
| 8 |
public $productTypeGroupedModel;
|
| 9 |
public $productTypeConfigurableModel;
|
| 10 |
public $enablereviews = FALSE;
|
|
@@ -14,6 +15,7 @@ class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
|
|
| 14 |
public $getpricefromfromchild = FALSE;
|
| 15 |
public $publishtieredpricing = FALSE;
|
| 16 |
public $includetaxes = FALSE;
|
|
|
|
| 17 |
public $ignoreexcludedimages = FALSE;
|
| 18 |
public $ignoreassprodimages = FALSE;
|
| 19 |
public $start = 0;
|
|
@@ -32,11 +34,13 @@ class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
|
|
| 32 |
const TAG_P_CLOSE = '</p>';
|
| 33 |
const TAG_P = '<p>';
|
| 34 |
const SCRIPTNAME = 'cod_exporter_for_magento.php';
|
|
|
|
| 35 |
public function _construct() {
|
| 36 |
parent::_construct();
|
| 37 |
$this->_init('codi/codi2');
|
| 38 |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
|
| 39 |
}
|
|
|
|
| 40 |
// Class=DataFile
|
| 41 |
public function renderDataFile(){
|
| 42 |
if($this->_DEBUG){
|
|
@@ -48,6 +52,7 @@ class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
|
|
| 48 |
$this->productTypeConfigurableModel = Mage::getModel('catalog/product_type_configurable');
|
| 49 |
$this->productTypeGroupedModel = Mage::getModel('catalog/product_type_grouped');
|
| 50 |
$this->reviewsModel = Mage::getModel('review/review');
|
|
|
|
| 51 |
$this->mediaurl = Mage::getBaseUrl( Mage_Core_Model_Store::URL_TYPE_MEDIA );
|
| 52 |
$this->prodmediaurl = $this->mediaurl."catalog/product";
|
| 53 |
$products = Mage::getModel('catalog/product')->getCollection();
|
|
@@ -91,7 +96,8 @@ memory_get_usage ".memory_get_usage()." / ".memory_get_usage(TRUE)."
|
|
| 91 |
}
|
| 92 |
echo $lastLine;
|
| 93 |
}
|
| 94 |
-
|
|
|
|
| 95 |
$ProducttoString = "";
|
| 96 |
$AssociatedProductIds = $this->productTypeGroupedModel->getAssociatedProductIds( $product );
|
| 97 |
$ProductDescription = "";
|
|
@@ -150,7 +156,6 @@ memory_get_usage ".memory_get_usage()." / ".memory_get_usage(TRUE)."
|
|
| 150 |
}
|
| 151 |
if( !empty( $ProductAttributes ) )
|
| 152 |
$ProductAttributes = $this->cleanStr( $ProductAttributes );
|
| 153 |
-
|
| 154 |
if($this->_DEBUG) echo "product image : ".$product->getImage()."
|
| 155 |
product small image: ".$product->getSmallImage()."
|
| 156 |
product thumbnail : ".$product->getThumbnail()."
|
|
@@ -223,6 +228,11 @@ item thumbnail : ".$UsedProduct->getThumbnail()."
|
|
| 223 |
}
|
| 224 |
}
|
| 225 |
$ItemAttributes = substr($ItemAttributes, 0, strlen($ItemAttributes)-1 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
$Price = $this->improvePrice( $Price );
|
| 227 |
$itemID = $UsedProduct->getSku();
|
| 228 |
$ProducttoString .= $this->cleanStr( $itemID ) //ItemID
|
|
@@ -248,7 +258,8 @@ item thumbnail : ".$UsedProduct->getThumbnail()."
|
|
| 248 |
unset( $AssociatedProductIds );
|
| 249 |
return $ProducttoString;
|
| 250 |
}
|
| 251 |
-
|
|
|
|
| 252 |
$ProducttoString = "";
|
| 253 |
$UsedProductIds = $this->productTypeConfigurableModel->getUsedProductIds($product);
|
| 254 |
$ProductDescription = "";
|
|
@@ -307,7 +318,6 @@ item thumbnail : ".$UsedProduct->getThumbnail()."
|
|
| 307 |
}
|
| 308 |
if( !empty( $ProductAttributes ) )
|
| 309 |
$ProductAttributes = $this->cleanStr( $ProductAttributes );
|
| 310 |
-
|
| 311 |
if($this->_DEBUG) echo "product image : ".$product->getImage()."
|
| 312 |
product small image: ".$product->getSmallImage()."
|
| 313 |
product thumbnail : ".$product->getThumbnail()."
|
|
@@ -378,6 +388,11 @@ product thumbnail : ".$product->getThumbnail()."
|
|
| 378 |
}
|
| 379 |
}
|
| 380 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 381 |
$Price = $this->improvePrice( $Price );
|
| 382 |
if($this->_DEBUG) echo "item image : ".$UsedProduct->getImage()."
|
| 383 |
item small image: ".$UsedProduct->getSmallImage()."
|
|
@@ -422,7 +437,8 @@ item thumbnail : ".$UsedProduct->getThumbnail()."
|
|
| 422 |
unset( $UsedProductIds );
|
| 423 |
return $ProducttoString;
|
| 424 |
}
|
| 425 |
-
|
|
|
|
| 426 |
$ProductDescription = "";
|
| 427 |
$shortDescription = "";
|
| 428 |
if( $this->includeshortdescription ){
|
|
@@ -469,7 +485,6 @@ product thumbnail : ".$product->getThumbnail()."
|
|
| 469 |
}
|
| 470 |
}
|
| 471 |
$prodImages = implode( "#|#", $prodImages );
|
| 472 |
-
|
| 473 |
$URL = $product->getProductUrl();
|
| 474 |
if( !empty( $URL ) )
|
| 475 |
$URL = $this->correctProdUrlStr( $URL );
|
|
@@ -502,6 +517,10 @@ product thumbnail : ".$product->getThumbnail()."
|
|
| 502 |
$prodFinalPrice = $this->includetaxes ?
|
| 503 |
$this->taxhelper->getPrice($product,$product->getFinalPrice(),true) :
|
| 504 |
$product->getFinalPrice();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 505 |
$Price = $this->improvePrice( $prodFinalPrice );
|
| 506 |
$Reviews = $this->enablereviews ? $this->getReviews($product->getId()) : '';
|
| 507 |
if( !empty( $Reviews ) )
|
|
@@ -514,8 +533,8 @@ product thumbnail : ".$product->getThumbnail()."
|
|
| 514 |
. "\t" . $Price //ItemPrice
|
| 515 |
. "\t" //ItemDescription
|
| 516 |
. "\t" //ItemLink
|
| 517 |
-
. "\t" //
|
| 518 |
-
. "\t" //
|
| 519 |
. "\t" . $product->getId().'#$#'.$this->cleanStr( $prodName ) //ProductName
|
| 520 |
. "\t" . $ProductDescription //ProductDescription
|
| 521 |
. "\t" . $prodImages //ProductGraphic
|
|
@@ -528,10 +547,12 @@ product thumbnail : ".$product->getThumbnail()."
|
|
| 528 |
. "\n";
|
| 529 |
return $ProducttoString;
|
| 530 |
}
|
| 531 |
-
|
|
|
|
| 532 |
return str_replace("\n"," ", str_replace("\r"," ", str_replace("\r\n"," ", str_replace("\t"," ", $str ) ) ) );
|
| 533 |
}
|
| 534 |
-
|
|
|
|
| 535 |
$str = str_replace( self::SCRIPTNAME, "index.php", $str );
|
| 536 |
$pos = strpos( $str, "?" );
|
| 537 |
if( $pos === false )
|
|
@@ -539,7 +560,8 @@ product thumbnail : ".$product->getThumbnail()."
|
|
| 539 |
else
|
| 540 |
return substr( $str, 0, $pos );
|
| 541 |
}
|
| 542 |
-
|
|
|
|
| 543 |
$reviewsCollection = $this->reviewsModel->getCollection()
|
| 544 |
->addStoreFilter($this->StoreId)
|
| 545 |
->addStatusFilter('approved')
|
|
@@ -551,6 +573,7 @@ product thumbnail : ".$product->getThumbnail()."
|
|
| 551 |
unset( $reviewsCollection );
|
| 552 |
return $Reviews;
|
| 553 |
}
|
|
|
|
| 554 |
private function improvePrice( $Price ){
|
| 555 |
$rv = str_replace("\n"," ", str_replace("\r"," ", str_replace("\r\n"," ", str_replace("\t"," ", $Price ) ) ) );
|
| 556 |
if( empty( $rv ) || $rv == "0" )
|
|
@@ -562,6 +585,14 @@ product thumbnail : ".$product->getThumbnail()."
|
|
| 562 |
$rv = $rv.".00";
|
| 563 |
return $rv;
|
| 564 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 565 |
private function getTierPrices( &$product ){
|
| 566 |
$res="";
|
| 567 |
$prices = $product->getFormatedTierPrice();
|
|
@@ -595,6 +626,7 @@ product thumbnail : ".$product->getThumbnail()."
|
|
| 595 |
unset( $prices );
|
| 596 |
return $res.$rightstr;
|
| 597 |
}
|
|
|
|
| 598 |
// Class=CatalogSection
|
| 599 |
public function renderCatalogSection(){
|
| 600 |
$categories = Mage::getModel('catalog/category')->getCollection()
|
|
@@ -633,6 +665,7 @@ product thumbnail : ".$product->getThumbnail()."
|
|
| 633 |
";
|
| 634 |
echo "==EOF==";
|
| 635 |
}
|
|
|
|
| 636 |
private function _drawCategory( &$category, $level=0, $hpath='', $i=1, $j=1, $path='' ){
|
| 637 |
$html = "";
|
| 638 |
$children = $category->getChildrenCategories();
|
|
@@ -659,6 +692,7 @@ product thumbnail : ".$product->getThumbnail()."
|
|
| 659 |
unset( $children );
|
| 660 |
return $html .= $htmlChildren;
|
| 661 |
}
|
|
|
|
| 662 |
// Class=CatalogProject
|
| 663 |
public function renderCatalogProject(){
|
| 664 |
$this->productTypeConfigurableModel = Mage::getModel('catalog/product_type_configurable');
|
|
@@ -705,6 +739,7 @@ Products: ".count( $prodIds )."
|
|
| 705 |
}
|
| 706 |
echo "==EOF==";
|
| 707 |
}
|
|
|
|
| 708 |
private function _processCategory( &$category, $level=0, $hpath='', $path='' ){
|
| 709 |
$hpath = $level != 1 ? $hpath.'#$#'.$category->getName() : $hpath = $category->getName();
|
| 710 |
$this->catpathmap[ $category->getId() ] = $hpath;
|
|
@@ -717,7 +752,8 @@ Products: ".count( $prodIds )."
|
|
| 717 |
$htmlChildren .= $this->_processCategory( $childcategory, $level + 1, $hpath, $path );
|
| 718 |
}
|
| 719 |
}
|
| 720 |
-
|
|
|
|
| 721 |
$ProducttoString = "";
|
| 722 |
$categoryIds = $product->getCategoryIds();
|
| 723 |
$listed = FALSE;
|
|
@@ -760,7 +796,8 @@ Products: ".count( $prodIds )."
|
|
| 760 |
}
|
| 761 |
return $ProducttoString;
|
| 762 |
}
|
| 763 |
-
|
|
|
|
| 764 |
$UsedProductIds = $this->productTypeConfigurableModel->getUsedProductIds($product);
|
| 765 |
$countUsedProductIds = count( $UsedProductIds );
|
| 766 |
if( $countUsedProductIds > 0 ){
|
|
@@ -809,4 +846,5 @@ Products: ".count( $prodIds )."
|
|
| 809 |
unset( $UsedProductIds );
|
| 810 |
return $ProducttoString;
|
| 811 |
}
|
|
|
|
| 812 |
} // Mage_CodiScript_Model_Files
|
| 1 |
<?php
|
| 2 |
+
// 2013-10-15
|
| 3 |
class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
|
| 4 |
public $version = VERSION;
|
| 5 |
public $Store;
|
| 6 |
public $StoreId;
|
| 7 |
public $reviewsModel;
|
| 8 |
+
public $cataloginventoryModel;
|
| 9 |
public $productTypeGroupedModel;
|
| 10 |
public $productTypeConfigurableModel;
|
| 11 |
public $enablereviews = FALSE;
|
| 15 |
public $getpricefromfromchild = FALSE;
|
| 16 |
public $publishtieredpricing = FALSE;
|
| 17 |
public $includetaxes = FALSE;
|
| 18 |
+
public $includeinvqty = FALSE;
|
| 19 |
public $ignoreexcludedimages = FALSE;
|
| 20 |
public $ignoreassprodimages = FALSE;
|
| 21 |
public $start = 0;
|
| 34 |
const TAG_P_CLOSE = '</p>';
|
| 35 |
const TAG_P = '<p>';
|
| 36 |
const SCRIPTNAME = 'cod_exporter_for_magento.php';
|
| 37 |
+
|
| 38 |
public function _construct() {
|
| 39 |
parent::_construct();
|
| 40 |
$this->_init('codi/codi2');
|
| 41 |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
|
| 42 |
}
|
| 43 |
+
|
| 44 |
// Class=DataFile
|
| 45 |
public function renderDataFile(){
|
| 46 |
if($this->_DEBUG){
|
| 52 |
$this->productTypeConfigurableModel = Mage::getModel('catalog/product_type_configurable');
|
| 53 |
$this->productTypeGroupedModel = Mage::getModel('catalog/product_type_grouped');
|
| 54 |
$this->reviewsModel = Mage::getModel('review/review');
|
| 55 |
+
$this->cataloginventoryModel = Mage::getModel('cataloginventory/stock_item');
|
| 56 |
$this->mediaurl = Mage::getBaseUrl( Mage_Core_Model_Store::URL_TYPE_MEDIA );
|
| 57 |
$this->prodmediaurl = $this->mediaurl."catalog/product";
|
| 58 |
$products = Mage::getModel('catalog/product')->getCollection();
|
| 96 |
}
|
| 97 |
echo $lastLine;
|
| 98 |
}
|
| 99 |
+
|
| 100 |
+
private function ProducttoStringGrouped( &$product ){
|
| 101 |
$ProducttoString = "";
|
| 102 |
$AssociatedProductIds = $this->productTypeGroupedModel->getAssociatedProductIds( $product );
|
| 103 |
$ProductDescription = "";
|
| 156 |
}
|
| 157 |
if( !empty( $ProductAttributes ) )
|
| 158 |
$ProductAttributes = $this->cleanStr( $ProductAttributes );
|
|
|
|
| 159 |
if($this->_DEBUG) echo "product image : ".$product->getImage()."
|
| 160 |
product small image: ".$product->getSmallImage()."
|
| 161 |
product thumbnail : ".$product->getThumbnail()."
|
| 228 |
}
|
| 229 |
}
|
| 230 |
$ItemAttributes = substr($ItemAttributes, 0, strlen($ItemAttributes)-1 );
|
| 231 |
+
if( $this->includeinvqty ){
|
| 232 |
+
if( !empty( $ItemAttributes ) )
|
| 233 |
+
$ItemAttributes .= "|";
|
| 234 |
+
$ItemAttributes .= "Inventory=".$this->improveQty( "".$this->cataloginventoryModel->loadByProduct( $UsedProduct )->getQty() );
|
| 235 |
+
}
|
| 236 |
$Price = $this->improvePrice( $Price );
|
| 237 |
$itemID = $UsedProduct->getSku();
|
| 238 |
$ProducttoString .= $this->cleanStr( $itemID ) //ItemID
|
| 258 |
unset( $AssociatedProductIds );
|
| 259 |
return $ProducttoString;
|
| 260 |
}
|
| 261 |
+
|
| 262 |
+
private function ProducttoStringConfigurable( &$product ){
|
| 263 |
$ProducttoString = "";
|
| 264 |
$UsedProductIds = $this->productTypeConfigurableModel->getUsedProductIds($product);
|
| 265 |
$ProductDescription = "";
|
| 318 |
}
|
| 319 |
if( !empty( $ProductAttributes ) )
|
| 320 |
$ProductAttributes = $this->cleanStr( $ProductAttributes );
|
|
|
|
| 321 |
if($this->_DEBUG) echo "product image : ".$product->getImage()."
|
| 322 |
product small image: ".$product->getSmallImage()."
|
| 323 |
product thumbnail : ".$product->getThumbnail()."
|
| 388 |
}
|
| 389 |
}
|
| 390 |
}
|
| 391 |
+
if( $this->includeinvqty ){
|
| 392 |
+
if( !empty( $ItemAttributes ) )
|
| 393 |
+
$ItemAttributes .= "|";
|
| 394 |
+
$ItemAttributes .= "Inventory=".$this->improveQty( "".$this->cataloginventoryModel->loadByProduct( $UsedProduct )->getQty() );
|
| 395 |
+
}
|
| 396 |
$Price = $this->improvePrice( $Price );
|
| 397 |
if($this->_DEBUG) echo "item image : ".$UsedProduct->getImage()."
|
| 398 |
item small image: ".$UsedProduct->getSmallImage()."
|
| 437 |
unset( $UsedProductIds );
|
| 438 |
return $ProducttoString;
|
| 439 |
}
|
| 440 |
+
|
| 441 |
+
private function ProducttoStringSimple( &$product ){
|
| 442 |
$ProductDescription = "";
|
| 443 |
$shortDescription = "";
|
| 444 |
if( $this->includeshortdescription ){
|
| 485 |
}
|
| 486 |
}
|
| 487 |
$prodImages = implode( "#|#", $prodImages );
|
|
|
|
| 488 |
$URL = $product->getProductUrl();
|
| 489 |
if( !empty( $URL ) )
|
| 490 |
$URL = $this->correctProdUrlStr( $URL );
|
| 517 |
$prodFinalPrice = $this->includetaxes ?
|
| 518 |
$this->taxhelper->getPrice($product,$product->getFinalPrice(),true) :
|
| 519 |
$product->getFinalPrice();
|
| 520 |
+
$ItemAttributes = "";
|
| 521 |
+
if( $this->includeinvqty ){
|
| 522 |
+
$ItemAttributes = "Inventory=".$this->improveQty( "".$this->cataloginventoryModel->loadByProduct( $product )->getQty() );
|
| 523 |
+
}
|
| 524 |
$Price = $this->improvePrice( $prodFinalPrice );
|
| 525 |
$Reviews = $this->enablereviews ? $this->getReviews($product->getId()) : '';
|
| 526 |
if( !empty( $Reviews ) )
|
| 533 |
. "\t" . $Price //ItemPrice
|
| 534 |
. "\t" //ItemDescription
|
| 535 |
. "\t" //ItemLink
|
| 536 |
+
. "\t" . $ItemAttributes //ItemAttributes
|
| 537 |
+
. "\t" //ItemGraphic
|
| 538 |
. "\t" . $product->getId().'#$#'.$this->cleanStr( $prodName ) //ProductName
|
| 539 |
. "\t" . $ProductDescription //ProductDescription
|
| 540 |
. "\t" . $prodImages //ProductGraphic
|
| 547 |
. "\n";
|
| 548 |
return $ProducttoString;
|
| 549 |
}
|
| 550 |
+
|
| 551 |
+
private function cleanStr( &$str ){
|
| 552 |
return str_replace("\n"," ", str_replace("\r"," ", str_replace("\r\n"," ", str_replace("\t"," ", $str ) ) ) );
|
| 553 |
}
|
| 554 |
+
|
| 555 |
+
private function correctProdUrlStr( &$str ){
|
| 556 |
$str = str_replace( self::SCRIPTNAME, "index.php", $str );
|
| 557 |
$pos = strpos( $str, "?" );
|
| 558 |
if( $pos === false )
|
| 560 |
else
|
| 561 |
return substr( $str, 0, $pos );
|
| 562 |
}
|
| 563 |
+
|
| 564 |
+
private function getReviews( $productid ){
|
| 565 |
$reviewsCollection = $this->reviewsModel->getCollection()
|
| 566 |
->addStoreFilter($this->StoreId)
|
| 567 |
->addStatusFilter('approved')
|
| 573 |
unset( $reviewsCollection );
|
| 574 |
return $Reviews;
|
| 575 |
}
|
| 576 |
+
|
| 577 |
private function improvePrice( $Price ){
|
| 578 |
$rv = str_replace("\n"," ", str_replace("\r"," ", str_replace("\r\n"," ", str_replace("\t"," ", $Price ) ) ) );
|
| 579 |
if( empty( $rv ) || $rv == "0" )
|
| 585 |
$rv = $rv.".00";
|
| 586 |
return $rv;
|
| 587 |
}
|
| 588 |
+
|
| 589 |
+
private function improveQty( $qty ){
|
| 590 |
+
$tail = strrchr( $qty, "." );
|
| 591 |
+
if( !empty( $tail ) )
|
| 592 |
+
$qty = substr( $qty, 0, strlen( $qty ) - strlen( $tail ) );
|
| 593 |
+
return $qty;
|
| 594 |
+
}
|
| 595 |
+
|
| 596 |
private function getTierPrices( &$product ){
|
| 597 |
$res="";
|
| 598 |
$prices = $product->getFormatedTierPrice();
|
| 626 |
unset( $prices );
|
| 627 |
return $res.$rightstr;
|
| 628 |
}
|
| 629 |
+
|
| 630 |
// Class=CatalogSection
|
| 631 |
public function renderCatalogSection(){
|
| 632 |
$categories = Mage::getModel('catalog/category')->getCollection()
|
| 665 |
";
|
| 666 |
echo "==EOF==";
|
| 667 |
}
|
| 668 |
+
|
| 669 |
private function _drawCategory( &$category, $level=0, $hpath='', $i=1, $j=1, $path='' ){
|
| 670 |
$html = "";
|
| 671 |
$children = $category->getChildrenCategories();
|
| 692 |
unset( $children );
|
| 693 |
return $html .= $htmlChildren;
|
| 694 |
}
|
| 695 |
+
|
| 696 |
// Class=CatalogProject
|
| 697 |
public function renderCatalogProject(){
|
| 698 |
$this->productTypeConfigurableModel = Mage::getModel('catalog/product_type_configurable');
|
| 739 |
}
|
| 740 |
echo "==EOF==";
|
| 741 |
}
|
| 742 |
+
|
| 743 |
private function _processCategory( &$category, $level=0, $hpath='', $path='' ){
|
| 744 |
$hpath = $level != 1 ? $hpath.'#$#'.$category->getName() : $hpath = $category->getName();
|
| 745 |
$this->catpathmap[ $category->getId() ] = $hpath;
|
| 752 |
$htmlChildren .= $this->_processCategory( $childcategory, $level + 1, $hpath, $path );
|
| 753 |
}
|
| 754 |
}
|
| 755 |
+
|
| 756 |
+
private function CatalogProjectStringSimple( &$product ){
|
| 757 |
$ProducttoString = "";
|
| 758 |
$categoryIds = $product->getCategoryIds();
|
| 759 |
$listed = FALSE;
|
| 796 |
}
|
| 797 |
return $ProducttoString;
|
| 798 |
}
|
| 799 |
+
|
| 800 |
+
private function CatalogProjectStringConfigurable( &$product ){
|
| 801 |
$UsedProductIds = $this->productTypeConfigurableModel->getUsedProductIds($product);
|
| 802 |
$countUsedProductIds = count( $UsedProductIds );
|
| 803 |
if( $countUsedProductIds > 0 ){
|
| 846 |
unset( $UsedProductIds );
|
| 847 |
return $ProducttoString;
|
| 848 |
}
|
| 849 |
+
|
| 850 |
} // Mage_CodiScript_Model_Files
|
app/code/community/Mage/CodiScript/controllers/IndexController.php
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<?php
|
| 2 |
-
define("VERSION","2013-
|
| 3 |
|
| 4 |
class Mage_CodiScript_IndexController extends Mage_Core_Controller_Front_Action{
|
| 5 |
public function indexAction(){
|
|
@@ -58,6 +58,7 @@ if( $Class=="DataFile" ){
|
|
| 58 |
$pricelabel = isset($_REQUEST["pricelabel"]) ? $_REQUEST["pricelabel"] : "Price";
|
| 59 |
$savingslabel = isset($_REQUEST["savingslabel"]) ? $_REQUEST["savingslabel"] : "Savings";
|
| 60 |
$includetaxes = ( isset($_REQUEST["includetaxes"]) && $_REQUEST["includetaxes"] == "1" );
|
|
|
|
| 61 |
$ignoreexcludedimages = ( isset($_REQUEST["ignoreexcludedimages"]) && $_REQUEST["ignoreexcludedimages"] == "1" );
|
| 62 |
$ignoreassprodimages = ( isset($_REQUEST["ignoreassprodimages"]) && $_REQUEST["ignoreassprodimages"] == "1" );
|
| 63 |
$start = isset($_REQUEST["start"]) ? intval( $_REQUEST["start"] ) : 0;
|
|
@@ -72,6 +73,7 @@ quantitylabel=".$quantitylabel."
|
|
| 72 |
pricelabel=".$pricelabel."
|
| 73 |
savingslabel=".$savingslabel."
|
| 74 |
includetaxes=".$includetaxes."
|
|
|
|
| 75 |
ignoreexcludedimages=".$ignoreexcludedimages."
|
| 76 |
ignoreassprodimages=".$ignoreassprodimages."
|
| 77 |
start=".$start."
|
|
@@ -144,6 +146,7 @@ if($Class=="DataFile"){
|
|
| 144 |
$cfModel->pricelabel = $pricelabel;
|
| 145 |
$cfModel->savingslabel = $savingslabel;
|
| 146 |
$cfModel->includetaxes = $includetaxes;
|
|
|
|
| 147 |
$cfModel->ignoreexcludedimages = $ignoreexcludedimages;
|
| 148 |
$cfModel->ignoreassprodimages = $ignoreassprodimages;
|
| 149 |
$cfModel->start = $start;
|
|
@@ -188,6 +191,9 @@ executed in ".( time() - $started_time )." sec.
|
|
| 188 |
";
|
| 189 |
die();
|
| 190 |
/* RELEASE NOTES
|
|
|
|
|
|
|
|
|
|
| 191 |
* 2013-07-19
|
| 192 |
* 1. Added incremental data file retrieval
|
| 193 |
*
|
| 1 |
<?php
|
| 2 |
+
define("VERSION","2013-10-15");
|
| 3 |
|
| 4 |
class Mage_CodiScript_IndexController extends Mage_Core_Controller_Front_Action{
|
| 5 |
public function indexAction(){
|
| 58 |
$pricelabel = isset($_REQUEST["pricelabel"]) ? $_REQUEST["pricelabel"] : "Price";
|
| 59 |
$savingslabel = isset($_REQUEST["savingslabel"]) ? $_REQUEST["savingslabel"] : "Savings";
|
| 60 |
$includetaxes = ( isset($_REQUEST["includetaxes"]) && $_REQUEST["includetaxes"] == "1" );
|
| 61 |
+
$includeinvqty = ( isset($_REQUEST["includeinvqty"]) && $_REQUEST["includeinvqty"] == "1" );
|
| 62 |
$ignoreexcludedimages = ( isset($_REQUEST["ignoreexcludedimages"]) && $_REQUEST["ignoreexcludedimages"] == "1" );
|
| 63 |
$ignoreassprodimages = ( isset($_REQUEST["ignoreassprodimages"]) && $_REQUEST["ignoreassprodimages"] == "1" );
|
| 64 |
$start = isset($_REQUEST["start"]) ? intval( $_REQUEST["start"] ) : 0;
|
| 73 |
pricelabel=".$pricelabel."
|
| 74 |
savingslabel=".$savingslabel."
|
| 75 |
includetaxes=".$includetaxes."
|
| 76 |
+
includeinvqty=".$includeinvqty."
|
| 77 |
ignoreexcludedimages=".$ignoreexcludedimages."
|
| 78 |
ignoreassprodimages=".$ignoreassprodimages."
|
| 79 |
start=".$start."
|
| 146 |
$cfModel->pricelabel = $pricelabel;
|
| 147 |
$cfModel->savingslabel = $savingslabel;
|
| 148 |
$cfModel->includetaxes = $includetaxes;
|
| 149 |
+
$cfModel->includeinvqty = $includeinvqty;
|
| 150 |
$cfModel->ignoreexcludedimages = $ignoreexcludedimages;
|
| 151 |
$cfModel->ignoreassprodimages = $ignoreassprodimages;
|
| 152 |
$cfModel->start = $start;
|
| 191 |
";
|
| 192 |
die();
|
| 193 |
/* RELEASE NOTES
|
| 194 |
+
* 2013-10-15
|
| 195 |
+
* 1. Added includeinvqty request parameter / processing
|
| 196 |
+
*
|
| 197 |
* 2013-07-19
|
| 198 |
* 1. Added incremental data file retrieval
|
| 199 |
*
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Mage_Codi</name>
|
| 4 |
-
<version>4.0.
|
| 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-
|
| 14 |
-
<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="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Mage_Codi</name>
|
| 4 |
+
<version>4.0.8</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>2013-10-23</date>
|
| 14 |
+
<time>02:37:52</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="bc22e9152a1692339cd88d3241320798"/></dir><dir name="controllers"><file name="IndexController.php" hash="0ea7e6404d58bf28682443a482807636"/></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>
|
