Magento – Replace “Add to Cart” button with an “Buy Now” button linking to the “Checkout” page

magento-1.7

In my Magento site product view page, I need to replace the button "Add to Cart" to "Buy Now" button in I want like to the "Checkout" page.

Example :
if the customer clicks the "buy now" button the link will going to the checkout page.

enter image description here

Best Answer

<?php $_product = $this->getProduct(); ?>
<?php $buttonTitle = $this->__('Buy Now'); ?>
<?php if($_product->isSaleable()): ?>
    <div class="add-to-cart">
        <?php if(!$_product->isGrouped()): ?>
        <label for="qty"><?php echo $this->__('Qty:') ?></label>
        <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
        <?php endif; ?>
        <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
        <?php echo $this->getChildHtml('', true, true) ?>
    </div>
<?php endif; ?>

enter image description here