How to add color picker with text into your site

Step 1: First you have to create html file index.html from code given below link
index.html

Step 2: You can download included color_picker.js file from below link
color_picker.js

Step 3: Run index.html file you can add text with selected color on defined area with div

Hope this will useful for you…..

Remove cre banners and all the things from footer

in catalog/include/application_bottom.php

just comment out this part

//cre_uregisterBasicFunctions();

and your footer banner is remove

How To Create Photoshop Action

(1).With a file open in Photoshop — it does not matter if the image has to be rotated or not; you just need to be in the Photoshop application — open your Actions window (Window > Actions).

(2). At the top right of the Actions box or palette, there is an arrow. Click here to open more options and select New Action.

(3). Give a Name to your Action and assign a Function Key (I give a name “rotate 90ccw” and assigned the F11 key to your action). If you like, create a new “Set” folder in advance to store related actions.

(4).Now you are ready to record each step you make. Either select Record on the window that is still open or simply click on the round record button at the bottom of the palette (it will turn red when you are in Record mode). Go to Image > Rotate Canvas > Rotate 90º CCW. Your image should rotate at 90 degrees counter-clockwise (see image below). Next, go back to your Actions options and select Stop Recording or simply click on the square button at the bottom of the palette.

 

5. You have just recorded your Action. To test it, press your F11 key, and the image will rotate again. The same action can now be applied to any image you open in Photoshop.

 


How to disable right click using php script?

First you have to put below code in php tag and run the page Now Right click is disabled for that particular page.


echo '  <script>

var isNS = (navigator.appName == "Netscape") ? 1 : 0;

if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);

function mischandler(){

return false;

}

function mousehandler(e){

var myevent = (isNS) ? e : event;

var eventbutton = (isNS) ? myevent.which : myevent.button;

if((eventbutton==2)||(eventbutton==3)) return false;

}

document.oncontextmenu = mischandler;

document.onmousedown = mousehandler;

document.onmouseup = mousehandler;

</script>';

How to remove Junk Characters from Product Description in Magento for Google Base

At the time of submitting Google base approved in Magento. Sometimes it generates error message like “Expected response code 200, got 400. Type: data. Field: description. Reason: There is a problem with the character encoding of this attribute.” because in the Product Description some Junk Characters have used which doesn’t support by Google Base. So, it generates the errors.

Step: – 1 First of all create php file for getting product description and removes the escape character from product description. Copy below code and paste into PHP file.

<?php
require_once './app/Mage.php';
Mage::app();

// Get the current store id
$storeId = Mage::app()->getStore()->getId();

// Get the Configurable Product only

$products = Mage::getResourceModel('catalog/product_collection')
->addAttributeToFilter('type_id', array('eq' => 'configurable'));

// Loop for getting all Configurable Product one by one

foreach ( $products as $productModel )
{

$_product = Mage::getModel('catalog/product')->load($productModel->getId());

//do something useful with this $_product object

$desc= $_product->getDescription();
$id= $_product->getId();

echo $id; echo "&nbsp;&nbsp;";
$newdesc = iconv('UTF-8', 'ASCII//TRANSLIT', $desc);
$_product->setDescription($newdesc);
$_product->save();
echo "complete"; echo "<br/>";
}

Step: – 2 Put this file on the Root Directory of your Magento site and run it manually.
For ex: –
http://www.yourdomain.com/test.php

Step: – 3 After completion of the process it will display Product ID which Description have been successfully changed.

Posted in Magento. 1 Comment »