Tuesday, 18 September 2012

Slider menu with ajax content

Slider with ajax content

PHP script to create subdomains

Php Script to create subdomain

Javascript for google map with multiple points pointed

Google Map with multiple points

CMS html template for admin panel

Free Html Template for admin panel

jQuery image preview like monster.com

Click here to download  imagepreview

How to create and custom page template in wordpress?

1). create a file : D:\xampp\htdocs\wp-register\wp-content\themes\twentyeleven\test.php

2). Paste the following code :
<?php
/*
Template Name: test
*/
get_header();
?>
<?php echo "test page is called";?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>

3). Open wp-admin and create new page : view template on right side : select "test" option.
4). Done.

Monday, 17 September 2012

Thursday, 13 September 2012

CSV to HTML using PHP

<?php

$file_handle = fopen("path/to/file/Book2.csv", "r");

while (!feof($file_handle) ) {

$line_of_text = fgetcsv($file_handle, 1024);

print "<p>" . $line_of_text[0] . "</p>";
print "<p>" . $line_of_text[1] . "</p>";
print "<p>" . $line_of_text[2] . "</p>";

}

fclose($file_handle);

?>

Thursday, 6 September 2012

Magento Ajax scrolling functionality on product and search listing page

1. Download the zip, version 1.1 (DUH!)
2. Extract it’s contents to the root of your Magento installation. You can use FTP to do that. It’s the directory containing index.php [App] [Skin] [Media] among others
3. Log in to your Magento backend
4. Go to System -> Cache Management, select all options, and in the action dropdown select “Refresh”. Then click Submit.
5. Log out/in to your backend
6. Go to System -> Configuration -> Catalog and drop down the “Front-end” selection
7. The extension adds a new option here; “Use jQuery Infinite Ajax Scroll” and this new version adds the option “Use jQuery UItoTop”.
8. Set both “Use jQuery Infinite Ajax Scroll” and “Use jQuery UItoTop” to “Yes”
9. Click save config.
10. All done!

 

 

Ajaxscroll

How to delete customers in magento?

TRUNCATE `customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;

TRUNCATE `customer_address_entity_decimal`;

TRUNCATE `customer_address_entity_int`;

TRUNCATE `customer_address_entity_text`;

TRUNCATE `customer_address_entity_varchar`;

TRUNCATE `customer_entity`;

TRUNCATE `customer_entity_datetime`;

TRUNCATE `customer_entity_decimal`;

TRUNCATE `customer_entity_int`;

TRUNCATE `customer_entity_text`;

TRUNCATE `customer_entity_varchar`;

TRUNCATE `log_customer`;

TRUNCATE `log_visitor`;

TRUNCATE `log_visitor_info`;


ALTER TABLE `customer_address_entity` AUTO_INCREMENT=1;

ALTER TABLE `customer_address_entity_datetime` AUTO_INCREMENT=1;

ALTER TABLE `customer_address_entity_decimal` AUTO_INCREMENT=1;

ALTER TABLE `customer_address_entity_int` AUTO_INCREMENT=1;

ALTER TABLE `customer_address_entity_text` AUTO_INCREMENT=1;

ALTER TABLE `customer_address_entity_varchar` AUTO_INCREMENT=1;

ALTER TABLE `customer_entity` AUTO_INCREMENT=1;

ALTER TABLE `customer_entity_datetime` AUTO_INCREMENT=1;

ALTER TABLE `customer_entity_decimal` AUTO_INCREMENT=1;

ALTER TABLE `customer_entity_int` AUTO_INCREMENT=1;

ALTER TABLE `customer_entity_text` AUTO_INCREMENT=1;

ALTER TABLE `customer_entity_varchar` AUTO_INCREMENT=1;

ALTER TABLE `log_customer` AUTO_INCREMENT=1;

ALTER TABLE `log_visitor` AUTO_INCREMENT=1;

ALTER TABLE `log_visitor_info` AUTO_INCREMENT=1;

List of tables to store product

catalog_product_entity
catalog_product_entity_datetime
catalog_product_entity_decimal
catalog_product_entity_gallery
catalog_product_entity_int
catalog_product_entity_media_gallery
catalog_product_entity_media_gallery_value
catalog_product_entity_text
catalog_product_entity_tier_price
catalog_product_entity_varchar
catalog_product_link
catalog_product_link_attribute
catalog_product_link_attribute_decimal
catalog_product_link_attribute_int
catalog_product_link_attribute_varchar
catalog_product_link_type
catalog_product_super_attribute
catalog_product_super_attribute_label
catalog_product_super_attribute_pricing
catalog_product_super_link
catalog_product_website

List of tables to store category

catalog_category_entity
catalog_category_entity_datetime
catalog_category_entity_decimal
catalog_category_entity_int
catalog_category_entity_text
catalog_category_entity_varchar
catalog_category_flat

How to display random tweets on our website?


Friday, 17 August 2012

Magento get store config


$strFbLink = Mage::getStoreConfig('banner/socialnetworking/banner_facebook_url');
$strTwLink = Mage::getStoreConfig('banner/socialnetworking/banner_twitter_url');
$strLiLink = Mage::getStoreConfig('banner/socialnetworking/banner_linkedin_url');

Monday, 13 August 2012

Magento display date format

                            $strReviewDate = $_review->getCreatedAt();
                            $arrReviewDate = explode(' ',$strReviewDate);
                            $intReviewDate = strtotime($arrReviewDate[0]);
                            $dtReviewDate = date('d F, Y',$intReviewDate);
                            echo " - ".$dtReviewDate;
                            ?>

Sunday, 12 August 2012

Thursday, 9 August 2012

magento custom add to cart link

getLayout()->createBlock('catalog/product_list')->getAddToCartUrl($_product) ?>

Wednesday, 8 August 2012

How to display final price on listing page in magento?

                            $_coreHelper = $this->helper('core'); 
                            $_taxHelper = $this->helper("tax"); 
                            $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_product->getFinalPrice(), true); 
                            $_finalPriceFormated = $_coreHelper->currency($_finalPriceInclTax,true,false); 
                            echo $_finalPriceFormated;
                            //echo $this->getPriceHtml($_product, true) ?>

Tuesday, 7 August 2012

Magento solve enable cookies

http://ka.lpe.sh/2011/07/09/magento-cant-loginadd-items-in-chrome-and-ie/

Monday, 6 August 2012

Remove Price from Custom Options

catalog.xml


Comment following line
<reference name="content">
    <
remove name="product.clone_prices"/>
reference>