AjaxForm and AjaxSubmit Options

JQuery
Ajaxform uses progressive enhancement, users without JavaScript can still use the form in a traditional way users with JavaScript will get a more sophisticated experience.AjaxForm takes zero or one argument. The single argument can be either a callback function or an Options Object. [code lang="js"]$('#myFormId').ajaxForm();[/code] AjaxForm and AjaxSubmit support numerous options which can be provided using an Options Object. The Options Object is simply a JavaScript object that contains properties with values set as follows: urlURL to which the form data will be submitted.Default value: value of form's action attributetypeThe method in which the form data should be submitted, 'GET' or 'POST'.Default value: value of form's method attribute (or 'GET' if none found)targetIdentifies the element(s) in the page to be updated with the server response. This value may be specified…
Read More

XML Sitemap for SEO

SEO
XML sitemap are best an easy method to inform search engines about the website content/pages. XML sitemap lists URLs for a website along with additional information like: date of update, how frequently usually changes, and importance. XML sitemap offer the ability for you to give a priority ranking to all your webpages on a scale from 0.0 to 1.0, with 1.0 being the most important and 0.5 being the default neutral rank. For example your index page you would give a ranking of 1.0 to, while your terms of service page you would probably want to assign a 0.1 to. This point value system helps the search engines by giving them and their bots a way to know which pages on your site you value most and therefore which to…
Read More

Benefits of SEO

SEO
SEO is a process where you can improve your site by ranking higher in search engines. It brings motivated buyers to you online and offline both. It sustains traffic to the site and builds a brand reputation of the same. Free article writing services can help you with SEO content for your site. =>Boost your trafficGet news coverage of your business and your site, Become active in bulletin boards and chat rooms focusing on your industry. =>Long term positioningOnce a website obtains a position through an SEO campaign, it should stay there for the long term as opposed to PPC (Pay Per Click). SEO is a cheaper and long-term solution than any other search engine marketing strategy. =>Increase VisibilityOnce a website has been optimized, it will increase the visibility of…
Read More

Add Remove CSS Class Mouseover with JQuery

JQuery
Sometimes we need to change css class on mouseover and mouseout event some of div, images, paragraph for the set any effect or beautiful looks. If you want to change any css class on mouseover this is possible to make very easily using of Jquery. Only three to four lines of code need write in jquery function to make or set any mouseover event to change css style class. Change style class on mouseover with Jquery Here is the one div which is shows navigation menu. [sourcecode language="plain"] <div clas="leftside"> <div class="navOut"><a href="#">ITEM 1</a></div> <div class="navOut"><a href="#">ITEM 2</a></div> <div class="navOut"><a href="#">ITEM 3</a></div> <div class="navOut"><a href="#">ITEM 4</a></div> </div> [/sourcecode] Here is the jQuery function to add rollover effects to this navigation: [code lang="js"] <script type="text/javascript"> $("div.navOut").mouseover(function(){ $(this).removeClass().addClass("navOver"); }).mouseout(function(){ $(this).removeClass().addClass("navOut"); }); </script>…
Read More

Change image on mouse hover effect with jquery

JQuery
This is possible to many way change image on mouse hover effect like javascript. But it will take time and much coding compare to do with jquery. This is very easy to make mouse hover effect with jquery. How to change image mouse over effect with jquery we first need to add the jquery library script [code lang="js"]<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>[/code] [code lang="js"]<img src="logo.png" alt="juswebdevelopment" class="logo" />[/code] This is jquery function for shows change hover effect [code lang="js"] <script type='text/javascript'> $(document).ready(function(){ $(".logo").hover( function() {$(this).attr("src","logo-hover.png");}, function() {$(this).attr("src","logo.png"); }); }); </script> [/code] This function is working with image class="logo". When mouse hover on class logo that time its call this function and change the image as per code.
Read More

Get attribute name and value magento

Magento
In magento you can create as many custom attributes for your products as you want.Suppose you want to add or display brand color for every product on home, category or product page. So this is very easy to do with custom attributes. If we were to create a new custom attribute called "brand_color" and the attribute was of a "Text Field" type, we could do something like the following at a product level to obtain its value. [php]<?php echo $_product->getBrandColor(); ?>[/php] Get attribute collection [php]<?php $attribute = $_product->getResource()->getAttribute('my_attribute'); ?>[/php] Get attribute type [php]<?php $attribute = $_product->getResource()->getAttribute('my_attribute')->getAttributeType(); ?>[/php] Get attribute Label [php]<?php $attribute = $_product->getResource()->getAttribute('my_attribute')->getFrontendLabel(); ?>[/php] Attribute is visible or not [php]<?php $attribute = $_product->getResource()->getAttribute('my_attribute')->getIsVisible(); ?>[/php] Attribute is required [php]<?php $attribute = $_product->getResource()->getAttribute('my_attribute')->getIsRequired(); ?>[/php] Get attribute value [php]<?php $attributeValue = Mage::getModel('catalog/product')->load($_product->getId())->getMyAttribute();?>[/php]…
Read More

Excute custom query in magento

Magento
Magento has provide us very good features for handling or interacting with Database tables. Magento give all the data by default but some time we need to get or insert some custom data.So for this we need to write custom query. Database Connections In Magento [php] <?php // fetch read database connection that is used in Mage_Core module $read= Mage::getSingleton('core/resource')->getConnection('core_read'); // fetch write database connection that is used in Mage_Core module $write = Mage::getSingleton('core/resource')->getConnection('core_write'); ?> [/php] How to excute custom query in magento [php] <?php // fetch read database connection that is used in Mage_Core module $read= Mage::getSingleton('core/resource')->getConnection('core_read'); $value=$read->query("SELECT ...."); $row = $value->fetch(); echo "<pre>";print_r($row);echo "</pre>"; // As Array ?> [/php] Insert custom data in magento tabel [php] <?php // fetch write database connection that is used in Mage_Core module…
Read More

Redirecting non-www to www with .htaccess

PHP
If your website can be access both way with and without www. So may search engines consider same content with two different URLs with and without www. So it might be a case of Duplicate Content as well as Google Canonical problems. So you must stick your domain name accessible either with www or without www. Before writing this rules in .htaccess , make sure that your mod_rewrite is enabled(On). Most probably mod_rewrite is enabled in Linux server but for windows server you need to contact hosting people to make mod_rewrite enabled. You can check this by looking in phpinfo(). How to redirect www to non-www and non-www to www URL using .htaccess redirect Redirect www to non-www: [sourcecode language="plain"] RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www.justwebdevelopment.com [NC] RewriteRule ^(.*)$…
Read More

Add New Field to Magento Contact Form

Magento
In magento default contact us form provide only four fileds information like Name, Email, Telephone and comment but some time need to more information for contact form it's depends on bussiness model and criteria. If you want to add new field or need more inforation about the user from contact us so this artical to be helpfull to you. Below are the step how to add new field in magento contact us form. This example to show you how to add extra input type field in magento contact us form. Step 1: Add field to phtml file Go to app -> design -> frontend -> yourpackage -> yourtheme -> template -> contacts -> form.phtml If you want to add required field: [sourcecode language="plain"] <li> <label for="email"><em>*</em><?php echo Mage::helper('contacts')->__('Company Name') ?></label>…
Read More

How to show latest tweet on magento site

Magento
Display latest tweet on magento site without any extension. Twitter is most popular social networking site in a day.Using this code publish their Twitter account posts directly onto any section of their Magento store.This is a fast and effective way to keep your website up to date with relevant information. Once integrated, messages are able to appear directly into a designated section of your website and will appear in real-time as soon as the messages are posted. Benefit of twitter integrate into magento store Keep your Magento store live with fresh information via Twitter data feeds Fast and effective way to integrate your Magento store with Twitter Keep your website up to date with relevant information posts Step 1: Create magento_tweet.phtml from catalog/product/magento_tweet.phtml [php] <?php function getTime($time){ $tweetdate = $time;…
Read More