/*Check if customer loggen id */
Mage::helper('customer')->isLoggedIn();
/* Get log in url */
Mage::helper('customer')->getLoginUrl();
/* Get register url */
Mage::helper('customer')->getRegisterUrl()
Override _getSearchableProducts function in class Mage_CatalogSearch_Model_Resource_Fulltext so that it always searches in-stock products.
File to modify: app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php
/**
* Retrieve searchable products per store
*
* @param int $storeId
/* return shopping cart items count means how many sku add to shopping cart. */
Mage::helper('checkout/cart')->getItemsCount()
/* return shopping cart items summary (suppose you add sku1 6 qty and sku2 3 qty = total 9 qty return) */
Mage::helper('checkout/cart')->getSummaryCount()
Via Admin Panel
Navigate to System > Tools > Compilation page and click on Disable button
Navigate to System > Cache Management screen and use Flush Cache button.
Via SFTP
To disable compilation in Magento, edit includes/config.php. At around line 28, uncomment the first line and comment out the second:
/**
* Retrieve full path of url including category
*
* @param Mage_Catalog_Model_Product $product
* @return string url
*/
public function getFullProductUrl($product)
{
array_unique(array_merge($array1,$array2), SORT_REGULAR);
Create a container div around the iframe code and give it a class
<div class="video-container"><iframe></iframe></div>
Add in the CSS
/* @var $installer Mage_Catalog_Model_Resource_Setup */
$installer = Mage::getResourceModel('catalog/setup','default_setup');
$attributeCode = "oversized";
$installer->startSetup();
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, $attributeCode, array(
'group' => 'General',
UPDATE catalog_product_entity_text AS A
SET A.value = (
SELECT B.value
FROM (SELECT * FROM catalog_product_entity_text) AS B
WHERE B.attribute_id = 72
AND B.entity_id = A.entity_id
AND B.store_id = A.store_id