Showing posts with label Magento Hint Websites. Show all posts
Showing posts with label Magento Hint Websites. Show all posts

Friday, September 13, 2013

How to increase page speed in magento:('without merge css and javascript files')

In you htaccess file do chages as:

Uncomment the line
 php_flag zlib.output_compression on
means remove '#' from starting of php_flag zlib.output_compression on.

write these line in your htaccess file

<IfModule mod_expires.c>

# Enable expirations

ExpiresActive On

# Default directive

ExpiresDefault "access plus 1 year"

# My favicon

ExpiresByType image/x-icon "access plus 1 year"

# Images

ExpiresByType image/gif "access plus 1 year"

ExpiresByType image/png "access plus 1 year"

ExpiresByType image/jpg "access plus 1 year"

ExpiresByType image/jpeg "access plus 1 year"

# CSS

ExpiresByType text/css "access 1 year"

# Javascript

ExpiresByType application/javascript "access plus 1 year"

</IfModule>


Uncomment the lines:

SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary


means remove '#' from starting of these lines.

How to overwrite magento controller in local directory

For Example you have to overwrite Mage/Contacts/controller/IndexController.php
Step 1: First you have to make a xml in app/etc/modules/ with name CompanyName_NameSpace.xml true local 0.1.0

Step2: You have to create the folders if not exist in local/CompanyName/NameSpace/etc/ local/CompanyName/NameSpace/controllers/ In etc folder you have to create a config.xml file Shweta_Newscontacts In controllers folder copy the Mage/Contacts/controller/IndexController.php file and include the lines: include_once('Mage/Contacts/controllers/IndexController.php'); and change the class name as: class CompanyName_NameSpace_IndexController extends Mage_Core_Controller_Front_Action Now apply changes in the file you wanted. Now also, Magento take local pool file instead of core pool.

customize of label "choose an option" of configurable product in magento

Step 1: Change in catalog/product/view/type/options/configurable.phml getProduct(); $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes()); ?> isSaleable() && count($_attributes)):?>
getAttributeId(); $_attributeInfo = Mage::getModel('eav/entity_attribute')->load($_attributeId); $_attributeLabel = str_replace(' ','-',strtolower($_attributeInfo->getFrontendLabel())); ?>
decoratedIsLast){?> class="last">
Step 2: js/varien/configurable.js replace line 171 = element.options[0] = new Option(element.config.label, '');

 Step 3: app/design/frontend/default/grayscale/template/catalog/product/view/type/options/configurable.php change this line: 'label' => 'choose a '.$attribute->getLabel(),

Wednesday, August 7, 2013

Magento display all categories from product id (product listing page and search product listing page).

$product_model = Mage::getModel('catalog/product');
$product_model->reset();
$_product = $product_model->load($_product->getId());
$all_cats = $product_model->getCategoryIds($_product);
foreach($all_cats as $key => $_categoryId)
{
$category = Mage::getModel('catalog/category')->load($_categoryId);
echo "<br />".$category->getName();
}

Friday, April 19, 2013

Payment Gateways and Extensions for Indian Rupee Currency

EBS Payment Gateway India:
WebSite: http://ebs.in/
Downloads:https://support.ebs.in/app/index.php?/default_import/Knowledgebase/List/Index/9

Magento Extension:
https://support.ebs.in/app/index.php?/default_import/Knowledgebase/Article/View/366/0/magento-16-ebs-integration-kit-ver-25

CC Avenue:
WebSite: http://www.ccavenue.com/
Signup Link: https://mars.ccavenue.com/mer_register/mer_register_form_ccav.jsp
Sample Code: Available in merchant account

Magento Extension: http://bluezeal.in/ccavenue4magento/ccavenue-payment-module-for-magento
CC Avenue Integration Scripts:
http://opensourceprogrammer.in/php-script-for-integration-of-ccavenue-payment-gateway
http://world.ccavenue.com/downloads/CCAVenueWorldIntegrationManual.pdf