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.9 |
Comparing to | |
See all releases |
Code changes from version 4.0.8 to 4.0.9
app/code/community/Mage/CodiScript/Model/Files.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
// 2013-10-
|
3 |
class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
|
4 |
public $version = VERSION;
|
5 |
public $Store;
|
@@ -12,10 +12,13 @@ class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
|
|
12 |
public $ignoretopcategory = FALSE;
|
13 |
public $includeshortdescription = FALSE;
|
14 |
public $includelongdescription = TRUE;
|
15 |
-
public $
|
16 |
public $publishtieredpricing = FALSE;
|
17 |
public $includetaxes = FALSE;
|
18 |
public $includeinvqty = FALSE;
|
|
|
|
|
|
|
19 |
public $ignoreexcludedimages = FALSE;
|
20 |
public $ignoreassprodimages = FALSE;
|
21 |
public $start = 0;
|
@@ -64,8 +67,7 @@ Products: ".count($prodIds)."
|
|
64 |
Media URL: ".$this->mediaurl."
|
65 |
memory_get_usage ".memory_get_usage()." / ".memory_get_usage(TRUE)."
|
66 |
";
|
67 |
-
if( $this->start == 0 ) echo
|
68 |
-
"itemNumber\titemQty\titemUom\titemPrice\titemDescription\titemLink\titemAttributes\titemGraphic\tproductName\tproductDescription\tproductGraphic\tproductLink\tproductAttributes\tManufacturer\tCategory\tReviews\tSupplementalInfo
|
69 |
";
|
70 |
$count = 0;
|
71 |
$index = 0;
|
@@ -183,19 +185,25 @@ product thumbnail : ".$product->getThumbnail()."
|
|
183 |
foreach($AssociatedProductIds as $UsedProductid){
|
184 |
$UsedProduct = Mage::getModel('catalog/product')->load( $UsedProductid );
|
185 |
$ItemName= $UsedProduct->getName();
|
186 |
-
if( $this->
|
187 |
-
$Price = $
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
$
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
if($this->ignoreassprodimages) $itemImages = "";
|
200 |
else{
|
201 |
$itemImages = array();
|
@@ -234,6 +242,28 @@ item thumbnail : ".$UsedProduct->getThumbnail()."
|
|
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
|
239 |
. "\t" //ItemQty
|
@@ -344,14 +374,17 @@ product thumbnail : ".$product->getThumbnail()."
|
|
344 |
$Reviews = $this->cleanStr( $Reviews );
|
345 |
foreach($UsedProductIds as $UsedProductid){
|
346 |
$UsedProduct = Mage::getModel('catalog/product')->load( $UsedProductid );
|
347 |
-
if( $this->
|
348 |
-
$Price = $
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
|
|
|
|
|
|
355 |
$attributes = $UsedProduct->getAttributes();
|
356 |
$ItemAttributes = "";
|
357 |
$AllowAttributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
|
@@ -378,25 +411,58 @@ product thumbnail : ".$product->getThumbnail()."
|
|
378 |
$ItemAttributes .= $AttributeLabel."=".$AttributeValue;
|
379 |
foreach( $attribute->getPrices() as $addedPrice ){
|
380 |
if( $AttributeValue == $addedPrice['label']){
|
381 |
-
if( $addedPrice['is_percent'] )
|
382 |
$Price += $Price * $addedPrice['pricing_value'] / 100;
|
383 |
-
|
|
|
384 |
$Price += $addedPrice['pricing_value'];
|
385 |
-
|
386 |
-
|
387 |
-
$Price;
|
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->
|
398 |
-
|
399 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
400 |
";
|
401 |
if($this->ignoreassprodimages) $itemImages = "";
|
402 |
else{
|
@@ -405,7 +471,7 @@ item thumbnail : ".$UsedProduct->getThumbnail()."
|
|
405 |
if( is_array($itemImageArray) ){
|
406 |
foreach( $itemImageArray as $image ){
|
407 |
if($this->_DEBUG) echo "gallery image ".$image['file']." disabled=".$image['disabled']."
|
408 |
-
";
|
409 |
if( $this->ignoreexcludedimages && $image['disabled'] )
|
410 |
continue;
|
411 |
$itemImages[] = "Print#=#".$this->prodmediaurl.$image['file'];
|
@@ -514,14 +580,41 @@ product thumbnail : ".$product->getThumbnail()."
|
|
514 |
}
|
515 |
if( !empty( $ProductAttributes ) )
|
516 |
$ProductAttributes = $this->cleanStr( $ProductAttributes );
|
517 |
-
$
|
518 |
-
|
519 |
-
|
|
|
|
|
|
|
|
|
|
|
520 |
$ItemAttributes = "";
|
521 |
if( $this->includeinvqty ){
|
522 |
$ItemAttributes = "Inventory=".$this->improveQty( "".$this->cataloginventoryModel->loadByProduct( $product )->getQty() );
|
523 |
}
|
524 |
-
$Price = $this->improvePrice( $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
525 |
$Reviews = $this->enablereviews ? $this->getReviews($product->getId()) : '';
|
526 |
if( !empty( $Reviews ) )
|
527 |
$Reviews = $this->cleanStr( $Reviews );
|
@@ -534,7 +627,7 @@ product thumbnail : ".$product->getThumbnail()."
|
|
534 |
. "\t" //ItemDescription
|
535 |
. "\t" //ItemLink
|
536 |
. "\t" . $ItemAttributes //ItemAttributes
|
537 |
-
. "\t" //
|
538 |
. "\t" . $product->getId().'#$#'.$this->cleanStr( $prodName ) //ProductName
|
539 |
. "\t" . $ProductDescription //ProductDescription
|
540 |
. "\t" . $prodImages //ProductGraphic
|
@@ -585,14 +678,14 @@ product thumbnail : ".$product->getThumbnail()."
|
|
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();
|
@@ -731,13 +824,30 @@ product thumbnail : ".$product->getThumbnail()."
|
|
731 |
$prodIds = $this->_DEBUG ? $products->getAllIds(1000,0) : $products->getAllIds();
|
732 |
if($this->_DEBUG) echo "StoreId: ".$this->StoreId."
|
733 |
Products: ".count( $prodIds )."
|
|
|
|
|
|
|
|
|
734 |
";
|
735 |
foreach( $prodIds as $productId ){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
736 |
$product = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->load( $productId );
|
737 |
echo $product->isConfigurable() ? $this->CatalogProjectStringConfigurable( $product ) : $this->CatalogProjectStringSimple( $product );
|
738 |
unset( $product );
|
|
|
|
|
|
|
739 |
}
|
740 |
-
echo
|
741 |
}
|
742 |
|
743 |
private function _processCategory( &$category, $level=0, $hpath='', $path='' ){
|
@@ -846,5 +956,4 @@ Products: ".count( $prodIds )."
|
|
846 |
unset( $UsedProductIds );
|
847 |
return $ProducttoString;
|
848 |
}
|
849 |
-
|
850 |
-
} // Mage_CodiScript_Model_Files
|
1 |
<?php
|
2 |
+
// 2013-10-30
|
3 |
class Mage_CodiScript_Model_Files extends Mage_Core_Model_Abstract {
|
4 |
public $version = VERSION;
|
5 |
public $Store;
|
12 |
public $ignoretopcategory = FALSE;
|
13 |
public $includeshortdescription = FALSE;
|
14 |
public $includelongdescription = TRUE;
|
15 |
+
public $getpricefromchild = FALSE;
|
16 |
public $publishtieredpricing = FALSE;
|
17 |
public $includetaxes = FALSE;
|
18 |
public $includeinvqty = FALSE;
|
19 |
+
public $includespecialprice = FALSE;
|
20 |
+
public $includespecialpricedatefrom = FALSE;
|
21 |
+
public $includespecialpricedateto = FALSE;
|
22 |
public $ignoreexcludedimages = FALSE;
|
23 |
public $ignoreassprodimages = FALSE;
|
24 |
public $start = 0;
|
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;
|
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();
|
190 |
+
if( !empty( $Price ) && $this->includetaxes )
|
191 |
+
$Price = $this->taxhelper->getPrice( $UsedProduct, $Price, true );
|
192 |
+
$sPrice = $UsedProduct->getSpecialPrice();
|
193 |
+
if( !empty( $sPrice ) && $this->includetaxes )
|
194 |
+
$sPrice = $this->taxhelper->getPrice( $UsedProduct, $sPrice, true );
|
195 |
+
$sFromDate = $UsedProduct->getSpecialFromDate();
|
196 |
+
$sToDate = $UsedProduct->getSpecialToDate();
|
197 |
+
} else {
|
198 |
+
$Price = $product->getFinalPrice();
|
199 |
+
if( !empty( $Price ) && $this->includetaxes )
|
200 |
+
$Price = $this->taxhelper->getPrice( $product, $Price, true );
|
201 |
+
$sPrice = $product->getSpecialPrice();
|
202 |
+
if( !empty( $sPrice ) && $this->includetaxes )
|
203 |
+
$sPrice = $this->taxhelper->getPrice( $product, $sPrice, true );
|
204 |
+
$sFromDate = $product->getSpecialFromDate();
|
205 |
+
$sToDate = $product->getSpecialToDate();
|
206 |
+
}
|
207 |
if($this->ignoreassprodimages) $itemImages = "";
|
208 |
else{
|
209 |
$itemImages = array();
|
242 |
$ItemAttributes .= "Inventory=".$this->improveQty( "".$this->cataloginventoryModel->loadByProduct( $UsedProduct )->getQty() );
|
243 |
}
|
244 |
$Price = $this->improvePrice( $Price );
|
245 |
+
if( $this->includespecialprice ){
|
246 |
+
if( !empty( $sPrice ) ){
|
247 |
+
$sPrice = $this->improvePrice( $sPrice );
|
248 |
+
if( !empty( $ItemAttributes ) )
|
249 |
+
$ItemAttributes .= "|";
|
250 |
+
$ItemAttributes .= "Special Price=".$sPrice;
|
251 |
+
}
|
252 |
+
}
|
253 |
+
if( $this->includespecialpricedatefrom ){
|
254 |
+
if( !empty( $sFromDate ) ){
|
255 |
+
if( !empty( $ItemAttributes ) )
|
256 |
+
$ItemAttributes .= "|";
|
257 |
+
$ItemAttributes .= "Special Price From Date=".substr( $sFromDate, 0, 10 );
|
258 |
+
}
|
259 |
+
}
|
260 |
+
if( $this->includespecialpricedateto ){
|
261 |
+
if( !empty( $sToDate ) ){
|
262 |
+
if( !empty( $ItemAttributes ) )
|
263 |
+
$ItemAttributes .= "|";
|
264 |
+
$ItemAttributes .= "Special Price To Date=".substr( $sToDate, 0, 10 );
|
265 |
+
}
|
266 |
+
}
|
267 |
$itemID = $UsedProduct->getSku();
|
268 |
$ProducttoString .= $this->cleanStr( $itemID ) //ItemID
|
269 |
. "\t" //ItemQty
|
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();
|
380 |
+
$sFromDate = $UsedProduct->getSpecialFromDate();
|
381 |
+
$sToDate = $UsedProduct->getSpecialToDate();
|
382 |
+
} else {
|
383 |
+
$Price = $product->getFinalPrice();
|
384 |
+
$sPrice = $product->getSpecialPrice();
|
385 |
+
$sFromDate = $product->getSpecialFromDate();
|
386 |
+
$sToDate = $product->getSpecialToDate();
|
387 |
+
}
|
388 |
$attributes = $UsedProduct->getAttributes();
|
389 |
$ItemAttributes = "";
|
390 |
$AllowAttributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
|
411 |
$ItemAttributes .= $AttributeLabel."=".$AttributeValue;
|
412 |
foreach( $attribute->getPrices() as $addedPrice ){
|
413 |
if( $AttributeValue == $addedPrice['label']){
|
414 |
+
if( $addedPrice['is_percent'] ){
|
415 |
$Price += $Price * $addedPrice['pricing_value'] / 100;
|
416 |
+
$sPrice += $sPrice * $addedPrice['pricing_value'] / 100;
|
417 |
+
} else {
|
418 |
$Price += $addedPrice['pricing_value'];
|
419 |
+
$sPrice += $addedPrice['pricing_value'];
|
420 |
+
}
|
|
|
421 |
}
|
422 |
}
|
423 |
}
|
424 |
+
if( $this->getpricefromchild ){
|
425 |
+
if( !empty($Price) && $this->includetaxes )
|
426 |
+
$Price = $this->taxhelper->getPrice( $UsedProduct, $Price, true );
|
427 |
+
if( !empty($sPrice) && $this->includetaxes )
|
428 |
+
$sPrice = $this->taxhelper->getPrice( $UsedProduct, $sPrice, true );
|
429 |
+
} else {
|
430 |
+
if( !empty($Price) && $this->includetaxes )
|
431 |
+
$Price = $this->taxhelper->getPrice( $product, $Price, true );
|
432 |
+
if( !empty($sPrice) && $this->includetaxes )
|
433 |
+
$sPrice = $this->taxhelper->getPrice( $product, $sPrice, true );
|
434 |
+
}
|
435 |
if( $this->includeinvqty ){
|
436 |
if( !empty( $ItemAttributes ) )
|
437 |
$ItemAttributes .= "|";
|
438 |
$ItemAttributes .= "Inventory=".$this->improveQty( "".$this->cataloginventoryModel->loadByProduct( $UsedProduct )->getQty() );
|
439 |
}
|
440 |
$Price = $this->improvePrice( $Price );
|
441 |
+
if( $this->includespecialprice ){
|
442 |
+
if( !empty( $sPrice ) ){
|
443 |
+
$sPrice = $this->improvePrice( $sPrice );
|
444 |
+
if( !empty( $ItemAttributes ) )
|
445 |
+
$ItemAttributes .= "|";
|
446 |
+
$ItemAttributes .= "Special Price=".$sPrice;
|
447 |
+
}
|
448 |
+
}
|
449 |
+
if( $this->includespecialpricedatefrom ){
|
450 |
+
if( !empty( $sFromDate ) ){
|
451 |
+
if( !empty( $ItemAttributes ) )
|
452 |
+
$ItemAttributes .= "|";
|
453 |
+
$ItemAttributes .= "Special Price From Date=".substr( $sFromDate, 0, 10 );
|
454 |
+
}
|
455 |
+
}
|
456 |
+
if( $this->includespecialpricedateto ){
|
457 |
+
if( !empty( $sToDate ) ){
|
458 |
+
if( !empty( $ItemAttributes ) )
|
459 |
+
$ItemAttributes .= "|";
|
460 |
+
$ItemAttributes .= "Special Price To Date=".substr( $sToDate, 0, 10 );
|
461 |
+
}
|
462 |
+
}
|
463 |
+
if($this->_DEBUG) echo "config item image : ".$UsedProduct->getImage()."
|
464 |
+
config item small image: ".$UsedProduct->getSmallImage()."
|
465 |
+
config item thumbnail : ".$UsedProduct->getThumbnail()."
|
466 |
";
|
467 |
if($this->ignoreassprodimages) $itemImages = "";
|
468 |
else{
|
471 |
if( is_array($itemImageArray) ){
|
472 |
foreach( $itemImageArray as $image ){
|
473 |
if($this->_DEBUG) echo "gallery image ".$image['file']." disabled=".$image['disabled']."
|
474 |
+
";
|
475 |
if( $this->ignoreexcludedimages && $image['disabled'] )
|
476 |
continue;
|
477 |
$itemImages[] = "Print#=#".$this->prodmediaurl.$image['file'];
|
580 |
}
|
581 |
if( !empty( $ProductAttributes ) )
|
582 |
$ProductAttributes = $this->cleanStr( $ProductAttributes );
|
583 |
+
$Price = $product->getFinalPrice();
|
584 |
+
if( !empty( $Price ) && $this->includetaxes )
|
585 |
+
$Price = $this->taxhelper->getPrice( $product, $Price, true );
|
586 |
+
$sPrice = $product->getSpecialPrice();
|
587 |
+
if( !empty( $sPrice ) && $this->includetaxes )
|
588 |
+
$sPrice = $this->taxhelper->getPrice( $product, $sPrice, true );
|
589 |
+
$sFromDate = $product->getSpecialFromDate();
|
590 |
+
$sToDate = $product->getSpecialToDate();
|
591 |
$ItemAttributes = "";
|
592 |
if( $this->includeinvqty ){
|
593 |
$ItemAttributes = "Inventory=".$this->improveQty( "".$this->cataloginventoryModel->loadByProduct( $product )->getQty() );
|
594 |
}
|
595 |
+
$Price = $this->improvePrice( $Price );
|
596 |
+
if( $this->includespecialprice ){
|
597 |
+
if( !empty( $sPrice ) ){
|
598 |
+
$sPrice = $this->improvePrice( $sPrice );
|
599 |
+
if( !empty( $ItemAttributes ) )
|
600 |
+
$ItemAttributes .= "|";
|
601 |
+
$ItemAttributes .= "Special Price=".$sPrice;
|
602 |
+
}
|
603 |
+
}
|
604 |
+
if( $this->includespecialpricedatefrom ){
|
605 |
+
if( !empty( $sFromDate ) ){
|
606 |
+
if( !empty( $ItemAttributes ) )
|
607 |
+
$ItemAttributes .= "|";
|
608 |
+
$ItemAttributes .= "Special Price From Date=".substr( $sFromDate, 0, 10 );
|
609 |
+
}
|
610 |
+
}
|
611 |
+
if( $this->includespecialpricedateto ){
|
612 |
+
if( !empty( $sToDate ) ){
|
613 |
+
if( !empty( $ItemAttributes ) )
|
614 |
+
$ItemAttributes .= "|";
|
615 |
+
$ItemAttributes .= "Special Price To Date=".substr( $sToDate, 0, 10 );
|
616 |
+
}
|
617 |
+
}
|
618 |
$Reviews = $this->enablereviews ? $this->getReviews($product->getId()) : '';
|
619 |
if( !empty( $Reviews ) )
|
620 |
$Reviews = $this->cleanStr( $Reviews );
|
627 |
. "\t" //ItemDescription
|
628 |
. "\t" //ItemLink
|
629 |
. "\t" . $ItemAttributes //ItemAttributes
|
630 |
+
. "\t" //ItemitemGraphic
|
631 |
. "\t" . $product->getId().'#$#'.$this->cleanStr( $prodName ) //ProductName
|
632 |
. "\t" . $ProductDescription //ProductDescription
|
633 |
. "\t" . $prodImages //ProductGraphic
|
678 |
$rv = $rv.".00";
|
679 |
return $rv;
|
680 |
}
|
681 |
+
|
682 |
private function improveQty( $qty ){
|
683 |
$tail = strrchr( $qty, "." );
|
684 |
if( !empty( $tail ) )
|
685 |
$qty = substr( $qty, 0, strlen( $qty ) - strlen( $tail ) );
|
686 |
return $qty;
|
687 |
}
|
688 |
+
|
689 |
private function getTierPrices( &$product ){
|
690 |
$res="";
|
691 |
$prices = $product->getFormatedTierPrice();
|
824 |
$prodIds = $this->_DEBUG ? $products->getAllIds(1000,0) : $products->getAllIds();
|
825 |
if($this->_DEBUG) echo "StoreId: ".$this->StoreId."
|
826 |
Products: ".count( $prodIds )."
|
827 |
+
";
|
828 |
+
$count = 0;
|
829 |
+
$index = 0;
|
830 |
+
$lastLine = "==EOF==
|
831 |
";
|
832 |
foreach( $prodIds as $productId ){
|
833 |
+
if( $count == $this->pageSize ){
|
834 |
+
$lastLine = "==MORE==
|
835 |
+
";
|
836 |
+
break;
|
837 |
+
}
|
838 |
+
if( $index < $this->start ){
|
839 |
+
$index++;
|
840 |
+
continue;
|
841 |
+
}
|
842 |
+
$index++;
|
843 |
$product = Mage::getModel('catalog/product')->setStoreId( $this->StoreId )->load( $productId );
|
844 |
echo $product->isConfigurable() ? $this->CatalogProjectStringConfigurable( $product ) : $this->CatalogProjectStringSimple( $product );
|
845 |
unset( $product );
|
846 |
+
if($this->_DEBUG) echo "#".$count.": memory_get_usage ".memory_get_usage()." / ".memory_get_usage(TRUE)."
|
847 |
+
";
|
848 |
+
$count++;
|
849 |
}
|
850 |
+
echo $lastLine;
|
851 |
}
|
852 |
|
853 |
private function _processCategory( &$category, $level=0, $hpath='', $path='' ){
|
956 |
unset( $UsedProductIds );
|
957 |
return $ProducttoString;
|
958 |
}
|
959 |
+
} // Mage_CodiScript_Model_Files
|
|
app/code/community/Mage/CodiScript/controllers/IndexController.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
define("VERSION","2013-10-
|
3 |
|
4 |
class Mage_CodiScript_IndexController extends Mage_Core_Controller_Front_Action{
|
5 |
public function indexAction(){
|
@@ -52,13 +52,16 @@ if( $Class=="DataFile" ){
|
|
52 |
$ignoretopcategory = ( isset($_REQUEST["ignoretopcategory"]) && $_REQUEST["ignoretopcategory"] == "1" );
|
53 |
$includeshortdescription = ( isset($_REQUEST["includeshortdescription"]) && $_REQUEST["includeshortdescription"] == "1" );
|
54 |
$includelongdescription = ( isset($_REQUEST["includelongdescription"]) ? $_REQUEST["includelongdescription"] == "1" : TRUE );
|
55 |
-
$
|
56 |
$publishtieredpricing = ( isset($_REQUEST["publishtieredpricing"]) && $_REQUEST["publishtieredpricing"] == "1" );
|
57 |
$quantitylabel = isset($_REQUEST["quantitylabel"]) ? $_REQUEST["quantitylabel"] : "Quantity";
|
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;
|
@@ -67,13 +70,16 @@ if( $Class=="DataFile" ){
|
|
67 |
ignoretopcategory=".$ignoretopcategory."
|
68 |
includeshortdescription=".$includeshortdescription."
|
69 |
includelongdescription=".$includelongdescription."
|
70 |
-
|
71 |
publishtieredpricing=".$publishtieredpricing."
|
72 |
quantitylabel=".$quantitylabel."
|
73 |
pricelabel=".$pricelabel."
|
74 |
savingslabel=".$savingslabel."
|
75 |
includetaxes=".$includetaxes."
|
76 |
includeinvqty=".$includeinvqty."
|
|
|
|
|
|
|
77 |
ignoreexcludedimages=".$ignoreexcludedimages."
|
78 |
ignoreassprodimages=".$ignoreassprodimages."
|
79 |
start=".$start."
|
@@ -85,6 +91,8 @@ pageSize=".$pageSize."
|
|
85 |
";
|
86 |
}else if( $Class=="CatalogProject" ){
|
87 |
$ignoretopcategory = ( isset($_REQUEST["ignoretopcategory"]) && $_REQUEST["ignoretopcategory"] == "1" );
|
|
|
|
|
88 |
if($_DEBUG) echo "ignoretopcategory=".$ignoretopcategory."
|
89 |
";
|
90 |
}
|
@@ -140,13 +148,16 @@ if($Class=="DataFile"){
|
|
140 |
$cfModel->ignoretopcategory = $ignoretopcategory;
|
141 |
$cfModel->includeshortdescription = $includeshortdescription;
|
142 |
$cfModel->includelongdescription = $includelongdescription;
|
143 |
-
$cfModel->
|
144 |
$cfModel->publishtieredpricing = $publishtieredpricing;
|
145 |
$cfModel->quantitylabel = $quantitylabel;
|
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;
|
@@ -155,8 +166,12 @@ if($Class=="DataFile"){
|
|
155 |
$cfModel->taxhelper=Mage::helper('tax');
|
156 |
}else if( $Class=="CatalogSection" ){
|
157 |
$cfModel->ignoretopcategory = $ignoretopcategory;
|
|
|
|
|
158 |
}else if( $Class=="CatalogProject" ){
|
159 |
$cfModel->ignoretopcategory = $ignoretopcategory;
|
|
|
|
|
160 |
}
|
161 |
$cfModel->_DEBUG = $_DEBUG;
|
162 |
$cfModel->StoreId = $StoreId;
|
@@ -191,6 +206,11 @@ executed in ".( time() - $started_time )." sec.
|
|
191 |
";
|
192 |
die();
|
193 |
/* RELEASE NOTES
|
|
|
|
|
|
|
|
|
|
|
194 |
* 2013-10-15
|
195 |
* 1. Added includeinvqty request parameter / processing
|
196 |
*
|
1 |
<?php
|
2 |
+
define("VERSION","2013-10-30");
|
3 |
|
4 |
class Mage_CodiScript_IndexController extends Mage_Core_Controller_Front_Action{
|
5 |
public function indexAction(){
|
52 |
$ignoretopcategory = ( isset($_REQUEST["ignoretopcategory"]) && $_REQUEST["ignoretopcategory"] == "1" );
|
53 |
$includeshortdescription = ( isset($_REQUEST["includeshortdescription"]) && $_REQUEST["includeshortdescription"] == "1" );
|
54 |
$includelongdescription = ( isset($_REQUEST["includelongdescription"]) ? $_REQUEST["includelongdescription"] == "1" : TRUE );
|
55 |
+
$getpricefromchild = ( isset($_REQUEST["getpricefromchild"]) && $_REQUEST["getpricefromchild"] == "1" );
|
56 |
$publishtieredpricing = ( isset($_REQUEST["publishtieredpricing"]) && $_REQUEST["publishtieredpricing"] == "1" );
|
57 |
$quantitylabel = isset($_REQUEST["quantitylabel"]) ? $_REQUEST["quantitylabel"] : "Quantity";
|
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 |
+
$includespecialprice = ( isset($_REQUEST["includespecialprice"]) && $_REQUEST["includespecialprice"] == "1" );
|
63 |
+
$includespecialpricedatefrom = ( isset($_REQUEST["includespecialpricedatefrom"]) && $_REQUEST["includespecialpricedatefrom"] == "1" );
|
64 |
+
$includespecialpricedateto = ( isset($_REQUEST["includespecialpricedateto"]) && $_REQUEST["includespecialpricedateto"] == "1" );
|
65 |
$ignoreexcludedimages = ( isset($_REQUEST["ignoreexcludedimages"]) && $_REQUEST["ignoreexcludedimages"] == "1" );
|
66 |
$ignoreassprodimages = ( isset($_REQUEST["ignoreassprodimages"]) && $_REQUEST["ignoreassprodimages"] == "1" );
|
67 |
$start = isset($_REQUEST["start"]) ? intval( $_REQUEST["start"] ) : 0;
|
70 |
ignoretopcategory=".$ignoretopcategory."
|
71 |
includeshortdescription=".$includeshortdescription."
|
72 |
includelongdescription=".$includelongdescription."
|
73 |
+
getpricefromchild=".$getpricefromchild."
|
74 |
publishtieredpricing=".$publishtieredpricing."
|
75 |
quantitylabel=".$quantitylabel."
|
76 |
pricelabel=".$pricelabel."
|
77 |
savingslabel=".$savingslabel."
|
78 |
includetaxes=".$includetaxes."
|
79 |
includeinvqty=".$includeinvqty."
|
80 |
+
includespecialprice=".$includespecialprice."
|
81 |
+
includespecialpricedatefrom=".$includespecialpricedatefrom."
|
82 |
+
includespecialpricedateto=".$includespecialpricedateto."
|
83 |
ignoreexcludedimages=".$ignoreexcludedimages."
|
84 |
ignoreassprodimages=".$ignoreassprodimages."
|
85 |
start=".$start."
|
91 |
";
|
92 |
}else if( $Class=="CatalogProject" ){
|
93 |
$ignoretopcategory = ( isset($_REQUEST["ignoretopcategory"]) && $_REQUEST["ignoretopcategory"] == "1" );
|
94 |
+
$start = isset($_REQUEST["start"]) ? intval( $_REQUEST["start"] ) : 0;
|
95 |
+
$pageSize = isset($_REQUEST["pageSize"]) ? intval( $_REQUEST["pageSize"] ) : 1000000000;
|
96 |
if($_DEBUG) echo "ignoretopcategory=".$ignoretopcategory."
|
97 |
";
|
98 |
}
|
148 |
$cfModel->ignoretopcategory = $ignoretopcategory;
|
149 |
$cfModel->includeshortdescription = $includeshortdescription;
|
150 |
$cfModel->includelongdescription = $includelongdescription;
|
151 |
+
$cfModel->getpricefromchild = $getpricefromchild;
|
152 |
$cfModel->publishtieredpricing = $publishtieredpricing;
|
153 |
$cfModel->quantitylabel = $quantitylabel;
|
154 |
$cfModel->pricelabel = $pricelabel;
|
155 |
$cfModel->savingslabel = $savingslabel;
|
156 |
$cfModel->includetaxes = $includetaxes;
|
157 |
$cfModel->includeinvqty = $includeinvqty;
|
158 |
+
$cfModel->includespecialprice = $includespecialprice;
|
159 |
+
$cfModel->includespecialpricedatefrom = $includespecialpricedatefrom;
|
160 |
+
$cfModel->includespecialpricedateto = $includespecialpricedateto;
|
161 |
$cfModel->ignoreexcludedimages = $ignoreexcludedimages;
|
162 |
$cfModel->ignoreassprodimages = $ignoreassprodimages;
|
163 |
$cfModel->start = $start;
|
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;
|
174 |
+
$cfModel->pageSize = $pageSize;
|
175 |
}
|
176 |
$cfModel->_DEBUG = $_DEBUG;
|
177 |
$cfModel->StoreId = $StoreId;
|
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)
|
212 |
+
* 2. Added incremental CatalogSection / CatalogProject file retrieval
|
213 |
+
*
|
214 |
* 2013-10-15
|
215 |
* 1. Added includeinvqty request parameter / processing
|
216 |
*
|
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.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 |
<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>
|