Friday, August 2, 2013

Auto format Code in Dreamweaver?

Go to Dreamweaver menu :-


  1. Commands > Apply Formatting
  2. Commands > Clean up HTML




Thanks 
Comments are welcome :)

Sunday, July 7, 2013

How to remove Checkout Step 2, Step 3, Step 4 in opencart



Code for Older version of  Opencart

For Latest Opencart version Please contact me. 
I am working on this module for latest version(demo latest version)

Dear Friends :)

Here is some Steps for remove Open cart checkout Steps:

For steps 2 : { Payment Address }

Open your checkout.tpl
catalog\view\theme\default\template\checkout\checkout.tpl 

Steps: 1
And find 


$('#payment-address .checkout-content').html(html);
$('#payment-address .checkout-content').slideDown('slow');
 And Replace with

$('#payment-address .checkout-content').html(html);
$('#payment-address #button-payment-address').click();
Steps: 2
And find 


 <div id="payment-address">
 And Replace with

 <div id="payment-address" style="display:none">
Enjoy Comments are welcome


For steps 3 :{ Shipping Address}

Open your checkout.tpl
catalog\view\theme\default\template\checkout\checkout.tpl 
And find 


$('#shipping-address .checkout-content').slideDown('slow');
 And Replace with

$("#shipping-existing select").prop("selectedIndex", $("#payment-existing select").prop("selectedIndex"));
$('#shipping-address #button-address').click();
$('#button-shipping-address').click();
Steps: 2

And find 


<div id="shipping-address">
 And Replace with

<div id="shipping-address" style="display: none">
Steps: 3
Open your guest.tpl
catalog/view/theme/default/template/checkout/guest.tpl

And find 


<input type="checkbox" name="shipping_address" value="1" id="shipping" checked="checked" />
 And Replace with

<input type="checkbox" name="shipping_address" value="1" id="shipping" checked="checked" style="display: none"/>
Enjoy Comments are welcome

For steps 4 : { Shipping Method }

Open your checkout.tpl
catalog\view\theme\default\template\checkout\checkout.tpl 

Steps: 1
And find 


$('#shipping-method .checkout-content').slideDown('slow');
 And Replace with

$('#shipping-method #button-shipping-method').click();
Steps: 2
And find 


<div id="shipping-method">
 And Replace with

<div id="shipping-method" style='display: none'>
Enjoy Comments are welcome


Sunday, March 3, 2013

How to edit Contact Us page in magento

Q. How do I add extra information like company name, address and phone to the contact us page?

A. Dear friends,
You can edit this page for the same on this location 

Your  site /app/design/frontend/base/default/template/contacts/form.phtml 
Your  site/app/code/core/Mage/Contacts/controllers/IndexController.php

magento How to call static block in phtml

Dear friends,
You Can use this Code For call static Blocks as html

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('top_left_links')->toHtml(?>

Monday, February 4, 2013

Magento How to resize product thumbnail Size in magento

Dear ,

Stap :1
Go to this location 

\design\frontend\default\ them name /template/catalog/product/list.phtml
  
and find this code 

 php 

    $_columnCount = $this->getColumnCount(); 

    if($_columnCount == 4){
        $imgSize = 155;
    }elseif($_columnCount == 3){
        $imgSize = 245;
    }

?>

 And replace with this code according your them image size Width and height :

php 
  $_columnCount = $this->getColumnCount(); 
  if( $_columnCount == 4 ) {
    $imgSizeWidth = 200;
    $imgSizeHeight = 300;
  } elseif( $_columnCount == 3 ) {
    $imgSizeWidth = 500;
    $imgSizeHeight = 800;
  }
?>

Stap :2
 Find this code on current page 

 helper('catalog/image')->init($_product, 'small_image')->keepFrame(true)->resize( $imgSize); ?>" alt="stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /> 
 Or find only resize( $imgSize)
 And replace With 
helper('catalog/image')->init($_product, 'small_image')->keepFrame(true)->resize( $imgSizeWidth, $imgSizeHeight ); ?>" alt="stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />

 Or Only With resize( $imgSizeWidth, $imgSizeHeight )
Thanks:)

Tuesday, November 20, 2012

Magento How to Remove price Decimal in magento

Change the price from Rs. 150.00 to Rs . 150 for example.
 For this, you need to edit code/core/Mage/Directory/Model/Currency.php
Open  code/core/Mage/Directory/Model/Currency.php
 Find the following :-
 public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
    {
return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets);
    }
And
Change this code to:-
 public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
    {
return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets);
    }
0 – Denotes the precision point for price..
The most important thing is still left.
- Clear the Cache.
- Go to System –> Cache Management
- Refreh Cache.
- If you have not enabled the Cache OR if it didn’t work even after refreshing the cache, then
- delete the cache folder present inside var (var/cache)
Thanks :)

Friday, November 2, 2012

Magento How to Create New Cms Layout in Magento

Dear All,
Here are the steps to create a NEW layout:-
1. Copy app/code/core/Mage/Page/etc/config.xml File to app/code/local/Mage/Page/etc/config.xml and between “..........
” tag paste the code below If u have no  app/code/local/Mage/Page/etc/config.xml on this link then please copy app/code/core/Mage Folder To past on this location app/code/local/Mage
<homepage module="page" translate="label">
    <
label>Home Page</label>
    <
template>page/home-page.phtml</template>
    <
layout_handle>home_page</layout_handle>
</
homepage>
2. Register your custom module by adding a new file (Mage_Local.xml) to app/etc/modules by pasting the code below 
="1.0"?><config>
    <
modules>
        <
Mage_Page>
            <
active>true</active>
            <
codePool>local</codePool>
            <
depends>
                <
Mage_Core/>
            </
depends>
        </
Mage_Page>
    </
modules>
</
config>
After this go to Admin->CMS->Pages->Add New Page->Design........here into the “Layout” dropdown you must see the new layout name you just created ("Home Page” in my case). Now create a New page and assignt this layout ("Home Page") to it.
3. Now create a file with the name home-page.phtml under app/design/frontend/default/default/template/page and create own layout as per design 
Thanks :)