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
| $code = 'nwtcdon_expose_status'; | |
| $attributeId = Mage::getResourceModel('eav/entity_attribute_collection')->setCodeFilter($code)->getFirstItem()->getAttributeId(); | |
| $attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId); | |
| if ($attribute->usesSource()) { | |
| $items = $attribute->getSource()->getAllOptions(false,true); | |
| } | |
| foreach($items as $option) { | |
| if($option['label']=='watchable') { |
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
| /*$pages = $collection->getLastPageNumber(); | |
| $currentPage = 1; | |
| $totalCount = $collection->getSize(); | |
| $totalOffset = ceil((int)$totalCount/10); | |
| var_dump($pages); | |
| do { | |
| $collection->setCurPage($currentPage); | |
| foreach ($collection as $prod) { | |
| var_dump($prod->getId()); | |
| var_dump($prod->getName()); |
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
| error_reporting(E_ALL | E_STRICT); | |
| define('MAGENTO_ROOT', getcwd()); | |
| $mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
| require_once $mageFilename; | |
| Mage::setIsDeveloperMode(true); | |
| ini_set('display_errors', 1); | |
| umask(0); | |
| Mage::app(); | |
| $productIds = Mage::getResourceModel('catalog/product_collection')->getAllIds(); |
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 | |
| define('MAGENTO', realpath(dirname(__FILE__))); | |
| ini_set('memory_limit', '512M'); | |
| set_time_limit (0); | |
| require_once MAGENTO . '/app/Mage.php'; | |
| Mage::app(); | |
| $products = 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 | |
| define('MAGENTO', realpath(dirname(__FILE__))); | |
| ini_set('memory_limit', '512M'); | |
| set_time_limit (0); | |
| require_once MAGENTO . '/app/Mage.php'; | |
| Mage::app(); | |
| $installer = new Mage_Eav_Model_Entity_Setup('core_setup'); | |
| $entityTypeId = $installer->getEntityTypeId('catalog_product'); |
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
| // Save photo | |
| if(isset($_FILES['image']['campaign_thumbnail']) && $_FILES['image']['campaign_thumbnail'] != '') { | |
| try { | |
| $uploader = new Varien_File_Uploader('image'); | |
| $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png')); | |
| $uploader->setAllowRenameFiles(false); | |
| $uploader->setFilesDispersion(false); |
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 log | |
| git reset --soft [hash] |
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
| uspTablet: function() { | |
| if(Koket.isMD()) { | |
| //jQuery('.usp-container') | |
| } | |
| }, |
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
| $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); | |
| $fieldset->addField('from_date', 'date', array( | |
| 'name' => 'from_date', | |
| 'label' => Mage::helper('qbanner')->__('From Date'), | |
| 'title' => Mage::helper('qbanner')->__('From Date'), | |
| 'image' => $this->getSkinUrl('images/grid-cal.gif'), | |
| 'input_format' => Varien_Date::DATE_INTERNAL_FORMAT, | |
| 'format' => $dateFormatIso, | |
| )); |
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
| <customer_account_create> | |
| <reference name="customer_form_register"> | |
| <action method="setShowAddressFields"> | |
| <param>true</param> | |
| </action> | |
| </reference> | |
| </customer_account_create> |