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
| SELECT e.sku, cp.sku FROM catalog_product_entity e LEFT JOIN catalog_product_entity_int ei ON e.entity_id = ei.entity_id AND ei.attribute_id = 87 LEFT JOIN catalog_product_flat_1 cp ON cp.sku = e.sku WHERE ei.value = 1 AND cp.sku is NULL |
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
| SELECT EAOV.value, count(EAOV.value) as cnt FROM eav_attribute EA LEFT JOIN eav_attribute_option EAO ON EAO.attribute_id = EA.attribute_id LEFT JOIN eav_attribute_option_value EAOV ON EAOV.option_id = EAO.option_id WHERE EA.attribute_code = 'ATTRIBUTE_CODE_HERE' AND EAOV.store_id = 0 GROUP BY EAOV.value HAVING cnt > 1; |
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
| rsync -av --exclude=var/cache --exclude=media/captcha --exclude=media/catalog/product/cache --exclude=var/tmp --exclude=var/session --exclude=var/report SRC DEST |
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
| /** | |
| * Pimcore | |
| * | |
| * This source file is available under two different licenses: | |
| * - GNU General Public License version 3 (GPLv3) | |
| * - Pimcore Enterprise License (PEL) | |
| * Full copyright and license information is available in | |
| * LICENSE.md which is distributed with this source code. | |
| * | |
| * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org) |
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 echo $this->getLayout()->createBlock('cms/block')->setBlockId('delivery_returns')->toHtml() ?> |
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 | |
| $date = Mage::app()->getLocale()->date('01.01.2015'); | |
| echo $date->toString('F Y', '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 | |
| if ($categoryIds) { | |
| $subCategories = array(); | |
| $categoryIds = explode(',', $categoryIds); | |
| foreach ($categoryIds as $categoryId) { | |
| $category = Mage::getModel('catalog/category')->load($categoryId); | |
| $subCategories += explode(',', $category->getChildren()); | |
| } | |
| $collection->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id=entity_id', null, 'left') | |
| ->addAttributeToFilter('category_id', array('in' => array_merge($categoryIds, $subCategories))); |
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 | |
| $fieldset->addField('country_id', 'select', array( | |
| 'name' => 'country_id', | |
| 'label' => $this->__('Country'), | |
| 'values' => Mage::getModel('adminhtml/system_config_source_country')->toOptionArray(), | |
| )) |
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 | |
| $collection->addFieldToFilter('start_date', | |
| array( | |
| array('to' => Mage::getModel('core/date')->gmtDate('Y-m-d')), | |
| array('start_date', 'null' => '') | |
| ) | |
| ); | |
| $collection->addFieldToFilter('end_date', | |
| array( | |
| array('gteq' => Mage::getModel('core/date')->gmtDate('Y-m-d')), |
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
| $results = db_query("SELECT entity_id FROM field_data_field_birthday WHERE DATE_FORMAT(field_birthday_value,'%m-%d') = DATE_FORMAT(NOW(),'%m-%d') AND entity_type = 'user'"); | |
| $ids = array(); | |
| foreach ($results as $result) { | |
| $ids[] = $result->entity_id; | |
| } | |
| return implode(',',$ids); |