Search This Blog

Monday, May 14, 2012

Redirect Product direct to checkout in magento

 Redirect your product direct to the checkout page with one add to cart product.. good working code.....

<form action="<?php echo $this->getUrl('checkout/cart/add')?>" method="post">
<input type="hidden" name="product" value="1" />
<div class="buy-now-btn">

    <input name="qty" type="hidden" class="input-text qty" id="qty" maxlength="12" value="1"</span>
     <a href=""><button class="form-button" onclick="productAddToCartForm.submit()"><img src="<?php echo $this->getSkinUrl('images/buy-now.jpg');?>" alt="Buy now" /></button></a>
    
      <button class="form-button" onclick="productAddToCartForm.submit()"><a href=""><img src="<?php echo $this->getSkinUrl('images/add-to-cart.jpg');?>" alt="Buy now" /></a></button>
      
</div>
</form>

<script type="text/javascript">
    var productAddToCartForm = new VarienForm('product_addtocart_form');
    productAddToCartForm.submit = function() {
        if(this.validator.validate()) {
            this.form.submit();
        }
    }.bind(productAddToCartForm);
</script>

For more information checkout our official website.

Change image on mouse over....

 Change image on mouse over very nice script.. and very easy.....

<img src="images/calendars.jpg" width="115" height="57" name="calendars" alt="Calendars And Tent Calendars"
                onmouseover="document.calendars.src = 'images/calendars-h.jpg';"
                onmouseout="document.calendars.src = 'images/calendars.jpg';"/>

For more information checkout our official website.

Monday, May 7, 2012

Display image in magento



<?php echo $this->getSkinUrl('images/imagename.png')?>
For more information checkout our official website.

Display the attribute any wher in magento…



<?php echo $_product->getAttributename() ?>
Just take care that the attribute name first letter is capital…
For more information checkout our official website.

Code for Magento Category display at any other place in the site..


<ul>
               <?php
 $h3h3=Mage::getModel('catalog/category')->getCollection();
foreach($h3h3 as $cat){
               
$cata=Mage::getModel('catalog/category')->load($cat->getEntityId());
if($cat->getEntityId() != 1 && $cat->getEntityId() != 2){
                                echo "<li><a href='".$cata->getUrl()."'>".$cata->getName()."</a></li>";
}
}
?>
</ul>
Just copy and paste and get the category listed….
For more information checkout our official website.

Tuesday, February 21, 2012

Wordpress Contact Form Redirection Link code

Your Mail Sent Successfully....<script type="text/javascript">jQuery(function($){ window.location.href="http://www.wirelesssolutionsny.com/thankyou.php"; });</script>

For more information checkout our official website.

Friday, January 6, 2012

HTML 5 Design Page

<!DOCTYPE html>
<head>
<meta charset="utf-8">
<html lang="en">
<title>HTML 5 - Tutorial</title>
<style>
body  { margin: 0px auto; padding: 0px; background:#666; font-family: Verdana, Geneva, sans-serif; font-size: 14px; color: #666666;}
.main  { margin: 0px auto; padding: 0px; width: 950px; background:#ffffff; font-family: Verdana, Geneva, sans-serif; font-size: 14px; color: #666666;}
header  { margin: 0px; padding: 0px; background:#ececec; height: 50px;}
footer  { margin: 20px 0 0 0; padding: 0px; background:#9c9c9c; color:#ffffff; height: 50px;}
</style>
</head>

<body>
<div class="main">
<header>
<nav>
<ul>
<li><a href="index.htm">home</a></li>
</ul>
</nav>
</header>

<article>
<h1>
The article title</h1>
<p>
This is the contents of the article element.</p>
</article>

<aside>
<h2>
The article title</h2>
<p>
This is the contents of the article element.</p>
</aside>

<p>
My first webpage</p>
<ul>
<li>List item 1</li>
<li>List item 2</li>
</ul>

<ol>
<li>List item 1</li>
<li>List item 2</li>
</ol>

<dl>
<dt>Term 1</dt>
<dd>Definition of term 1</dd>
<dt>Term 2</dt>
<dd>Definition of term 2</dd>     </dl>

<p>
<a href="http://www.html-5-tutorial.com/">XYZ</a></p>

<table>
<tr>             <td>Row 1 - Col 1</td>             <td>Row 1 - Col 2</td>         </tr>
<tr>             <td>Row 2 - Col 1</td>             <td>Row 2 - Col 2</td>         </tr>
</table>


<footer>This is my footer.</footer>
</div>
</body>
</html>

For more information checkout our official website.