Monthly Archives: November 2013

  1. All Magento URL list

    Magento Mage Core, Admin Static Blocks, or Phtml edits are usually includes getting url path such as images, javascript, base url, media and store url. There are different ways to retrieve mentioned URL paths depending on which section you’re editing.

    To Retrieve URL path in STATIC BLOCK
    To get SKIN URL

    {{skin url='images/sampleimage.jpg '}}
    To get Media URL

    https://www.samdoit.com/pub/media//sampleimage.jpg
    To get Store URL

    https://www.samdoit.com/mypage.html/
    To get Base URL

    {{base url='yourstore/mypage.html'}}
    TO Retrieve URL path in PHTML
    Note: In editing PHTML don’t forget to enclode the following code with PHP tag

    Not secure Skin URL:

    getSkinUrl('images/sampleimage.jpg') ?>

    Read more »
  2. Display magento cart in Menu

    If you want to change your shopping cart display like number of item and price ,

    i give sample image show ,

    Cart in menu bar

    <div class="mybag">

    <a href="<?php echo $this->getUrl('checkout/cart')?>">

    <span class="mybag-text">Shopping Cart:</span>

    <?php $cartcnt= Mage::helper('checkout/cart')->getItemsCount();?>

    <?php if($cartcnt==0):?>

    <span class="empty-bag"><?php echo '0 items,';?>

    <?php echo $this->helper('checkout')->formatPrice(Mage::getSingleton('checkout/cart')->getQuote()->getGrandTotal());

    Read more »
  3. Display Related products on magento

    As a magento developer display related product on product view page.It’s easy to show related product by following few easy steps. First we will have to add products to a particular product as related product. Screen shows product added as related product

    Related Product

    After selecting products it will show on your product view page if you can`t view related product on it .Do following steps it`s very easy to follow all the best friends.


    1)Open catalog.xml

    catalog.xml file available in .

    {magento root}/app/design/frontend/default/{your theme}/layout/catalog.xml .

    If you not have the file just copy file

    Read more »
  4. How to add Login/Logout code on magento

    Login/Logout Code in Header

    <?php if (! Mage::getSingleton('customer/session')->isLoggedIn()): ?>

    <a href="<?php echo Mage::helper('customer')->getLoginUrl(); ?>"><?php echo $this->__('Login') ?></a>

    <?php else: ?>

    <a href="<?php echo Mage::helper('customer')->getLogoutUrl(); ?>"><?php echo $this->__('Logout') ?></a>

    <?php endif; ?>

    Read more »
  5. Add wysiwyg editor in magento custom module.

    Add wysiwyg editor in magento custom module. is very easy to make it in your magento custom modue use this following method to add wysiwyg editor .

    go to the file

    {your magento root folder}/Block/Adminhtml/{module name}/Edit/Tab/Form.php

    add following code in top of the file

    $fieldset->addField('followupemail_text', 'editor', array( 

    'name'=>'followupemail_text',

    'label' => Mage::helper('followupemail')->__('Content'),

    'title' => Mage::helper('followupemail')->__('Content'),

    'required' => true,

    'style' => 'height:24em;',

    'config' => $wysiwygConfig, ));

     

    go to the file

    {your magento root folder}/Block/Adminhtml/{module name}/Edit.php

    Read more »
  6. Magento

    From time to time everyone finds them selves in a position where they are faced with a development they have never confronted before. Today I was achieve to get all orders for a customer based on the customer email address.. While there are almost certainly several ways to do this, I found a nice query that is quick, and capable.

    $orderCollection = Mage::getModel(‘sales/order’)->getCollection(); $orderCollection->addFieldToFilter(‘customer_email’,'email@domain.com’);

    Happy coding, hope this helps next time you’re working on Magento

    Read more »
  7. Vtiger outgoing mail server setting

    Vtiger outgoing mail server setting for gmail user

    Mail Server Settings (SMTP)
     
    * Server Name
    User Name youremail@gmail.com
    Password your email password
    From Email youremail@gmail.com
    Requires
    Read more »
Copyright © 2016 Samdoit Infotech. All rights reserved.