Page 9 - Blog
-
- November 30, 2013
If you want to change your shopping cart display like number of item and price ,
i give sample image show ,
<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()); ?></span><?php else:?><span class="bag-item"><?php echo $cartcnt.' '.'items,';?><?php echo $this->helper('checkout')->formatPrice(Mage::getSingleton('checkout/cart')->getQuote()->getGrandTotal()); ?></span><?php endif; ?></a></span></div> -
- November 30, 2013
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
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 from
{magento toot}/app/design/frontend/base/default/layout/catalog.xml
to your theme i already mention the path.
2) Remove & Add some xml in catalog.xml
Search catalog_product_view in
{magento root}/app/design/frontend/default/{your theme}/layout/catalog.xml
. Command or remove the following line from there .Search in catalog.xml "catalog.product.related" in appropriately line 258 under <reference name="right">
-
- November 30, 2013
Login/Logout Code in Header
<?phpif(! Mage::getSingleton('customer/session')->isLoggedIn()): ?><a href="<?php echo Mage::helper('customer')->getLoginUrl(); ?>"><?phpecho$this->__('Login') ?></a><?phpelse: ?><a href="<?php echo Mage::helper('customer')->getLogoutUrl(); ?>"><?phpecho$this->__('Logout') ?></a><?phpendif; ?> -
- November 30, 2013
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.phpadd 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.phpadd the following line in this file
protected function _prepareLayout(){// Load Wysiwyg on demand and Prepare layoutif (Mage::getSingleton('cms/wysiwyg_config')->isEnabled() && ($block = $this->getLayout()->getBlock('head'))){$block->setCanLoadTinyMce(true);}parent::_prepareLayout();} -
- November 26, 2013
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
-
- November 26, 2013
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 Authentication? if not working let`s try with this setting
Mail Server Settings (SMTP) * Server Name User Name Password From Email youremail@yourcompany.com Requires Authentication? no need to use user name also password , and finaly don`t enable authentication
-
- September 05, 2013
Do you want the multi store magento from Single installation of magento . If you want create multi store magento proceed my following way.
Process: 1
If your store have different type of Category and product then follow the steps. Catalog *then* Manage Categories *then* Add Root Category
Process: 2
Create the new Website System *then* Manage Stores *then* Create Website
fill up all asking.
Name: Name for the domain (“samdoit”)
Code : Identifier for the domain (“samdoit")
Create the new store System *then* Manage Stores *then* Create Store
Fill all fields
Website:) Select “samdoit.com” on dropdown .
Name: ) Use samdoit_com identify of store.
Root Category:) Select Categories from category list by default "Default Category"
Create store view:
System *then* Manage Stores *then* Create Store
View Store: Select “samdoit_com” show in dropdown menu.
Name and Code “samdoit_com”
Make sure all leters in smaller case Status: 'Enabled'
Process: 3
Create Magento another domains. You need to update
-
- September 05, 2013
If you want to change your magento theme with mobile platform . It`s very simple just do it what i tell you in following. In Magento Admin : System > Configuration > Design is where you want to be. You also want to make sure you have the mobile designed theme . Configuration the following way Depending on how you want to serve up your store depends on what configuration you want.
Option #1 :
Show mobile version on Any Mobile Based OS (phone ,tablet, kindle fire)
iPhone|iPod|BlackBerry|Pre|Palm|Googlebot-Mobile|mobi|Safari Mobile|Windows Mobile|Android|Opera Mini|mobile|Silk|Kindle
Option #2:
Show mobile version to just phone based browser and Display normal desktop version on tablet based devices
(iPhone|iPod|BlackBerry|Pre|Palm|Googlebot-Mobile|mobi|Safari Mobile|Windows Mobile|Android|Opera Mini|mobile)|(!iPad|Silk|Kindle|Xoom|SCH-I800|Tablet)
You have chosen one of the configurations above .Go under the Design “Themes” section & add it to the following sections (Template, Skin,
-
- September 05, 2013Create default widget for vtigerYou change happen in following files
modules/Users/Users.php modules/Users/language/en_us.lang.php modules/Home/language/en_us.lang.php include/Home.php
Step 1want to see your widget in your home page you follow this step.Add your widget identifier to $homeorder_array in Users.php search "$homeorder_array"I added 'SOLD'var $homeorder_array = array('HDB','ALVT','PLVT','QLTQ','CVLVT','HLT','OLV','GRT','OLTSO','ILTI','MNL','OLTPO','LTFAQ', 'UA', 'PA', 'SOLD'); Do the same in the function getHomeStuffOrder($id) function $this->homeorder_array = array('UA', 'PA', 'ALVT','HDB','PLVT','QLTQ','CVLVT','HLT','GRT','OLTSO','ILTI','MNL','OLTPO','LTFAQ','SOLD'); The above will allow vtiger to pull the widget into your myprefrecnes view so you can select to make visibleStep 2: Adding language file to how you look like add line in these files modules/Users/language/en_us.lang.php modules/Home/language/en_us.lang.php search using "Home page order" and add like this -
- September 05, 2013Hi,I have vtiger 5.4 installed on Centos 6.2. When I create/edit new profile, privilege of some modules did not save.Solution" So simply edit php.ini (/etc/php5/apache2/php.ini) and uncomment or add a line with: max_input_vars = 2000 "