Friday, 16 November 2012
Clean Cache and Session in Magento
If you have made any modifications to your Magento code, they will not appear immediately unless you clear the cache.
Magento keeps its cache in /var/cache located inside the Magento home directory. So, for example, if your Magento is installed in your main www/magento folder, the cache will be in magento/var/cache.
To clear the cache, simply delete everything from the /var/cache directory and then reload your website in your browser.
To clear all sessions, you can also delete everything from the /var/session folder within your Magento home directory.
Solution of Unable to communicate with the PayPal gateway in magento 1.7
I am using magento 1.7.0.0 version and it is quite advance then older version. When i have integrated Express Checkout in my localhost magento admin as it is quite simple, you can get many tutorials for it. But the main problem come in front of me when i placed an order using Paypal Express Checkout., it display an error msg "Unable to communicate with the PayPal gateway" ..
Solution : The fix for me was to disable SSL verification at configuration >>
system >> payment methods >> PayPal payment solutions
>> Enable SSL verification . If you were testing on the localhost
as well, re-enable the option on your live site to check whether it
works. Otherwise just disable it until a proper fix has been found for
magento 1.7 +
I think it may help you !!!!
Friday, 9 November 2012
Change logo in Magento
To change the path or filename of the default logo, simply log in to your
admin panel and navigate to System -> Configuration -> Design.
Under the Header section, change the Logo Image Src from "images/logo.gif" to whatever file path/name suits your needs.
Tuesday, 18 September 2012
Print A Div using Javascript
<html>
<head>
<script type="text/javascript">
function PrintContentDiv() {
var divPrint = document.getElementById('divContent');
var popupWin = window.open('', '_blank', 'width=300,height=300');
popupWin.document.open();
popupWin.document.write('<html><body onload="window.print()">' + divPrint.innerHTML + '</html>');
popupWin.document.close();
}
</script>
</head>
<body >
<div id="divContent" >
<div style="width:300px;height:500px;">
<strong> Div Print on anchor click </strong>
</div>
</div>
<div>
<a href="javascript:void(0)" onclick="PrintContentDiv();"><img src="images/print-icon.png" /><br />Print<br />Item</a>
</div>
</body>
</html>
Monday, 17 September 2012
Get Google Map using latitude and longitude
This is a very simple way to integrate Google map using latitude and longitude in a div. Just copy+paste the code and set the lat/long according to your location or set it dynamically from database by passing lat/long parameter.
<html>
<head>
<style type="text/css">
div#map {
position: relative;
}
div#crosshair {
position: absolute;
top: 192px;
height: 19px;
width: 19px;
left: 50%;
margin-left: -8px;
display: block;
background: url(crosshair.gif);
background-position: center center;
background-repeat: no-repeat;
}
</style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var map;
var geocoder;
var centerChangedLast;
var reverseGeocodedLast;
var currentReverseGeocodeResponse;
function initialize() {
var latlng = new google.maps.LatLng(18.524220910029783,73.85761860000002);
var myOptions = {
zoom: 10,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
geocoder = new google.maps.Geocoder();
var marker = new google.maps.Marker({
position: latlng,
map: map,
title: "Hello World!"
});
}
</script>
</head>
<body onload="initialize()">
<div id="map" style="width:200px; height:200px">
<div id="map_canvas" style="width:100%; height:200px"></div>
<div id="crosshair"></div>
</div>
</body>
</html>
<html>
<head>
<style type="text/css">
div#map {
position: relative;
}
div#crosshair {
position: absolute;
top: 192px;
height: 19px;
width: 19px;
left: 50%;
margin-left: -8px;
display: block;
background: url(crosshair.gif);
background-position: center center;
background-repeat: no-repeat;
}
</style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var map;
var geocoder;
var centerChangedLast;
var reverseGeocodedLast;
var currentReverseGeocodeResponse;
function initialize() {
var latlng = new google.maps.LatLng(18.524220910029783,73.85761860000002);
var myOptions = {
zoom: 10,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
geocoder = new google.maps.Geocoder();
var marker = new google.maps.Marker({
position: latlng,
map: map,
title: "Hello World!"
});
}
</script>
</head>
<body onload="initialize()">
<div id="map" style="width:200px; height:200px">
<div id="map_canvas" style="width:100%; height:200px"></div>
<div id="crosshair"></div>
</div>
</body>
</html>
Wednesday, 15 August 2012
JQuery Form Validation
Doing mistakes while form submission is very common and form validation is the very best solution for this. I have found a link which i want to share it with my Web friends. So here it is :
Form Validation
If you like it and helpful for you so leave a comment.. It will be best motivator for me..
Thanks
Gaurav Goel
Delhi, India
Form Validation
If you like it and helpful for you so leave a comment.. It will be best motivator for me..
Thanks
Gaurav Goel
Delhi, India
Tuesday, 24 July 2012
Delete and Update cascading constraint in existing table
ALTER TABLE `emp_details` ADD
CONSTRAINT `foreign_key_const`
FOREIGN KEY (`emp_id`) REFERENCES `employee` (`emp_id`)
ON DELETE CASCADE ON UPDATE CASCADE
Subscribe to:
Posts (Atom)