Find attribute_id
SELECT * FROM eav_attribute where attribute_code = 'is_anchor'
Update all of them with anchor_id from above (usually is ID 51)
UPDATE `catalog_category_entity_int` set value = 1 where attribute_id = 51
<?php | |
$isMobile = Zend_Http_UserAgent_Mobile::match( | |
Mage::helper('core/http')->getHttpUserAgent(), | |
$_SERVER | |
); |
// @overright = app/code/core/Mage/Core/Controller/Response/Http.php | |
public function sendHeaders() | |
{ | |
if (!$this->canSendHeaders()) { | |
Mage::log('HEADERS ALREADY SENT: '.mageDebugBacktrace(true, true, true)); | |
return $this; | |
} | |
if (in_array(substr(php_sapi_name(), 0, 3), array('cgi', 'fpm'))) | |
{ |
<?php | |
/* | |
To make the cleaning expired carts automatic, override cleanExpiredQuotes with the following | |
version which will also take care of the old active carts: app/code/core/Mage/Sales/Model/Observer.php | |
*/ | |
public function cleanExpiredQuotes($schedule) | |
{ | |
// extending limit |
/** | |
* Add funcionality to change the focus using tab and shiftkey | |
*/ | |
function matrixTabIndex() { | |
var tabKey = 9; | |
$('#product-matrix-std .owl-item').each(function(){ | |
$(this).find('INPUT[type=hidden]').attr('tabindex', '-1'); |
const TYPE_BOOLEAN = 'boolean'; | |
const TYPE_SMALLINT = 'smallint'; | |
const TYPE_INTEGER = 'integer'; | |
const TYPE_BIGINT = 'bigint'; | |
const TYPE_FLOAT = 'float'; | |
const TYPE_NUMERIC = 'numeric'; | |
const TYPE_DECIMAL = 'decimal'; | |
const TYPE_DATE = 'date'; | |
const TYPE_TIMESTAMP = 'timestamp'; // Capable to support date-time from 1970 + auto-triggers in some RDBMS | |
const TYPE_DATETIME = 'datetime'; // Capable to support long date-time before 1970 |
if (Mage::getSingleton('customer/session')->isLoggedIn()) { | |
// Load the customer's data | |
$customer = Mage::getSingleton('customer/session')->getCustomer(); | |
$customer->getPrefix(); | |
$customer->getName(); // Full Name | |
$customer->getFirstname(); // First Name | |
$customer->getMiddlename(); // Middle Name |
SELECT DISTINCT(p.ID), p.post_title, p.post_content FROM `wp_posts` p | |
LEFT JOIN wp_posts im ON p.ID = im.post_parent AND im.post_type = "attachment" | |
WHERE p.post_status ='publish' | |
AND p.post_type = "post" | |
AND im.ID IS NULL | |
AND p.post_content NOT REGEXP 'src=".*"' |
<?php | |
$date_plus_60_days = new DateTime("30-06-2017"); | |
$date_plus_60_days->modify("+1 days"); | |
$date_plus_60_days->modify("+3 days"); | |
//echo $date_plus_60_days->format("D"); | |
$d_leadtime = 3; | |
$date = "30/06/2014"; |