Monthly Archives: September 2013

  1. Magento multi site

    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 this following files:

    Find this two sample file installed

    magento root directory

    • index.php.sample
    • .htaccess.sample .

    Copy the two files and Rename both sample files by below names in your other domain.

    • .htaccess
    • index.php

    Open “index.php”

    and change line which start with“$mageFilename”

    $mageFilename = ‘{Your magento root}/app/Mage.php’;

    Also Change Line start with

    $mageRunCode" $mageRunCode = isset ($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ”;

    change ' ' into Your store code

    $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ‘samdoit_com’;

    Theme Changes: You must to change skin, media and javascript link . Now set Magento admin Panel by click follow way click " Configuration in System on admin panal " In Configuration tab select {YOUR website/store } from the dropdown Under Configuration tab Click "Web" under Web tab select and change the link for Secure also Unsecured : Skin Link (eg: Media Link (eg: JavaScript Link (eg: Now you done . Now your multiple stores magento is ready to use. We can create you a Magento Theme for your site by just copy the folder and paste the folder into {your magento}/skin/frontend/default/{your theme} " and paste it as your store name and then just go the "system *then* configuration *then* Web *then* Design" and change the select your store name and paste the theme name whatever you have created in magento skin folder.  

    Read more »
  2. How to change magento mobile template

    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, Layout, Default) in the “Matched Expression” field.  Then in the values section you should put in “iphone” in the value field. If you have a different mobile theme then your value field should be the theme name. Then click save config. reefer this following screenshot. mobile theme for magento.  

    Read more »
  3. How to create Custom module for vtiger customer portal

    Create 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 1 

    want 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 visible

    Step 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
    'SOLD'=>'Partially Completed Lead',
     Step 3:

    These queries are in Users.php They will add your widget to the DB when a user is created. Remeber you will need to create a new user for this to take affect, because that is when the module info will be inserted into the DB for each user. Also you could manually insert the fields for a existing user.
    //** $s18=$adb->getUniqueID("vtiger_homestuff"); $visibility=$this->getDefaultHomeModuleVisibility('SOLD',$inVal);

    $sql="insert into vtiger_homestuff values(?,?,?,?,?,?)"; $res=$adb->pquery($sql, array($s18,18,'Default',$uid,$visibility,'Sold Policies'));
    //** $sql="insert into vtiger_homedefault values(".$s18.",'SOLD',10,'SoldPolicies')";
    $adb->query($sql);

    Step 4:
     
    In Home.php within the function getDefaultDetails($dfid,$calCnt) add the code that will select your custom widget code }elseif($hometype=="SOLD" && vtlib_isModuleActive("Leads")){ if(isPermitted('Leads','index') == "yes"){ $home_values=$this->getCustomDetails($dfid); } }  

    Step 5:

    Create the custom code that displays your data My getCustomDetails($dfid) function returns array loded with all the detials to dsplay a widget. You will need to write a similar fucntion that return this array.
     
    $title=array(); $title[]='keyMetrics.gif'; $title[]=$app_strings['LBL_HOME_KEY_METRICS']; $title[]='home_metrics'; $header=Array(); $header[]='Lead Name'; $header[]='Company'; $header[]='Phone';
    $entries=Array(); for($l=0; $l $lastname = $adb->query_result($result,$l,"lastname");
    $firstname = $adb->query_result($result,$l,"firstname");
    $phone = $adb->query_result($result,$l,"phone");
    $lead_id = $adb->query_result($result,$l,"leadid");
    $value=array(); $value[]=''.$firstname.' '.$lastname.'';
    $value[]=''.$company.'';
    $value[]=''.$phone.'';
    $entries[]=$value;
    }
    $values=Array('Title'=>$title,'Header'=>$header,'Entries'=>$entries);
    if ( ($display_empty_home_blocks ) || (count($value)!= 0) )
    return $values;
    }
    Read more »
  4. Create default widget for vtiger

    Create 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 1 
     
    want 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 visible
    Step 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
    'SOLD'=>'Partially Completed Lead',
     Step 3:
     
    These queries are in Users.php They will add your widget to the DB when a user is created. Remeber you will need to create a new user for this to take affect, because that is when the module info will be inserted into the DB for each user. Also you could manually insert the fields for a existing user. //** $s18=$adb->getUniqueID("vtiger_homestuff"); $visibility=$this->getDefaultHomeModuleVisibility('SOLD',$inVal); $sql="insert into vtiger_homestuff values(?,?,?,?,?,?)"; $res=$adb->pquery($sql, array($s18,18,'Default',$uid,$visibility,'Sold Policies')); //** $sql="insert into vtiger_homedefault values(".$s18.",'SOLD',10,'SoldPolicies')"; $adb->query($sql);
     
    Step 4:
     
    In Home.php within the function getDefaultDetails($dfid,$calCnt) add the code that will select your custom widget code }elseif($hometype=="SOLD" && vtlib_isModuleActive("Leads")){ if(isPermitted('Leads','index') == "yes"){ $home_values=$this->getCustomDetails($dfid); } }  
     
    Step 5:
    Create the custom code that displays your data My getCustomDetails($dfid) function returns array loded with all the detials to dsplay a widget. You will need to write a similar fucntion that return this array.
    $title=array(); $title[]='keyMetrics.gif'; $title[]=$app_strings['LBL_HOME_KEY_METRICS']; $title[]='home_metrics'; $header=Array(); $header[]='Lead Name'; $header[]='Company'; $header[]='Phone'; $entries=Array(); for($l=0; $l $lastname = $adb->query_result($result,$l,"lastname"); $firstname = $adb->query_result($result,$l,"firstname"); $phone = $adb->query_result($result,$l,"phone"); $lead_id = $adb->query_result($result,$l,"leadid"); $value=array(); $value[]=''.$firstname.' '.$lastname.''; $value[]=''.$company.''; $value[]=''.$phone.''; $entries[]=$value; } $values=Array('Title'=>$title,'Header'=>$header,'Entries'=>$entries); if ( ($display_empty_home_blocks ) || (count($value)!= 0) ) return $values; }
    Read more »
  5. Invoke Custom Function on vTiger

    Workflow model in vTigercrm how to create custom workflow.
     
    It have simple steps to follow to make custom workflow.
     
    Step1:

    create one new file (registerworkflow.php) to register workflow in ur vTiger root .
    add all these line in that file.
     
    require_once 'include/utils/utils.php';
    require 'modules/com_vtiger_workflow/VTEntityMethodManager.inc';
    $emm = new VTEntityMethodManager($adb);
    //$emm->addEntityMethod("Module Name","Label", "Path to file" , "Method Name" );
    $emm->addEntityMethod("Invoice", "Update Inventory", "include/InventoryHandler.php", "handleInventoryProductRel");
     
    run that file like.
     
    http://YOUR-VTIGER/registerworkflow.php
     
    Strictly follow you must run this file at once. If u run that file more than one time u create more entry.

    Step 2:
     
    Go to  
     
    {YOUR_VTIGER_ROOT FOLDER}/include/InventoryHandler.php

    And Add these lines
    function handleInventoryProductRel($entity){
     
    //Enter Your code Here
    }

    Step 3:

     
    Go to
      Settings > Workflow > Workflow List  > New Workflow
    Vtiger Workflow Vtiger Workflow[/caption]

    Step 4:
     
    In Your
      Settings > Workflow > Edit Task 
    You see like this
    Vtiger Workflow  
    Read more »
  6. profile privileges doesn't save/update for some modules on vTiger

    Hi,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 "
    Read more »
Copyright © 2016 Samdoit Infotech. All rights reserved.