This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = array( | |
0 => 1, | |
1 => 9, | |
2 => 2, | |
3 => 7); | |
function solution($a){ | |
$b = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$_category = // INITIALIZED CATEGORY etc Mage::registry('current_category') or Mage::getModel('catalog/category)->load(##CATID##); | |
$productCollection = Mage::getResourceModel('catalog/product_collection') | |
->addCategoryFilter($_category) | |
->getAllIds(); | |
$reviewcollection = Mage::getModel('review/review')->getCollection() | |
->addStoreFilter(Mage::app()->getStore()->getId()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$product_id = 12; // Product ID | |
$product = Mage::getModel('catalog/product')->load($product_id); | |
$remoteImages = [ | |
'http://www.example.com/dummyImage.jpg', | |
'http://www.example.com/dummyImage1.jpg', | |
'http://www.example.com/dummyImage2.jpg' | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'app/Mage.php'; | |
Mage::app()->getCache()->getBackend()->clean('old'); | |
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID)); | |
$installer = new Mage_Sales_Model_Mysql4_Setup; | |
$attribute = array( | |
'type' => 'int', | |
'label'=> 'Show Breadcrumb Image', | |
'input' => 'select', | |
'source' => 'eav/entity_attribute_source_boolean', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* IDEALIAGroup srl | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('../app/Mage.php'); //Path to Magento | |
umask(0); | |
Mage::app(); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
$product_ids = Mage::getModel('catalog/product')->getCollection()->getAllIds(); | |
$c=0; | |
foreach( $product_ids as $id ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$begin = '75B4CA'; | |
$end = '98F29F'; | |
print_r(getRangeColors($begin, $end, 96)); | |
function getRangeColors($begin, $end, $theNumSteps){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Fietsuniek\BaseConfig\Override\Cms\Model\Wysiwyg\Images; | |
use Magento\Cms\Model\Wysiwyg\Images\Storage as WysiwygImagesStorage; | |
/** | |
* Override thumbs directory name .thumbs folder not accessible in youwe hosting environment | |
* | |
* @SuppressWarnings(PHPMD.LongVariable) | |
* @SuppressWarnings(PHPMD.TooManyFields) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch upstream pull/PR_NUMBER/head:pr |