website success

The Geek Blog


4/26/2012 Ed Lemmers

Zen Cart™ - Mystifying Message

Problem:

Setup zone shipping module with calculations based on weights and observed the following message:

The shipping rate cannot be determined at this time

Analysis:

Added debugging code to chase down values to see what was happening and discovered that somehow that the system thought the book shipping weight was 5 lbs, and not 1 lb.  I then determined that tare weight was some how being added to the item weight, and that this tare weight was rather excessive.

Solution:

Went to Configuration / Shipping/Packaging / Package Tare Small to Medium - added percentage:weight and set the value to 0:0 to eliminate tare weight.  You can set this to some thing reasonable for your cart, but the point is that the stock value was so radical that it caused the zone shipping by weight to not work at all.


1/10/2012 Ed Lemmers

Hot tip for regaining CPU Usage in Vista and Windows 7

Problem:

The process audiodg.exe uses ~30% of your system's CPU time.  You will see this in the task manager under Processes. You can open the task manager by typing <cntl><shft><esc>.

Solution:

Turn off audio enhancements.  To do this right-click on the audio icon and select Payback devices.  Select the Playback tab.  Select your audio playback device (usually Speakers) and click the Properties button.  (There may be several playback devices.  You will need to determine which is used for system playback.  You can ignore anything having to do with a voice modem is one is installed on your computer.)  Click on the Enhancements tab. Check the checkbox Disable all sound effects and click Apply.  Then click OK and then OK to dimiss the dialogs..


11/28/2011 Ed Lemmers

SugarCRM™ Upgrade

I upgraded from version 6.2.3 to version 6.3.0.  This time I remembered to uninstall all modules first, run the ugrade and then re-install the modules.  The upgrade was painless!


7/19/2011 Ed Lemmers

SugarCRM™ - Dispage Enhanced Search™

It healed itself!!!  That's right.  I logged in a few days ago and the Dispage Extension Manager™ updated itself correcting the problem.  The extension manager is now 1.0.11a.  This allowed me to install the Dispage Enhanced Search™ 3.1.03b.


7/8/2011 Ed Lemmers

SugarCRM™ - Calendar2.0™ - Dispage Enhanced Search™

The calendar that comes with SugarCRM is just shy of being something that people would actually want to use.  It has the functionality that one would expect in a calendar, but the lack of Ajax popups for quick entry makes it too cumbersome to add new appointments.  In fact, upon adding a new appointment it takes you to a list of all appointments rather than back to the month view of the calendar.  Thus in order to go back to the month view to compare what is going on each week visually requires a few time-consuming page loads.  Calendar2.0 addresses this issues very well.  At only $40 one-time for your SugarCRM installation, Calendar2.0 is a bargain.  It is an Ajax/PHP plug-in solution that gives SugarCRM a calendar that is actually efficient to use.  It requires SugarCRM 6.2.0 or later, so you will need to upgrade if you are using an older version.  Fortunately, the upgrade from 6.1.2 was a snap.  With Calendar2.0, you can even set the start and end times displayed in your calendar which eliminates the need to hack the Calendar.php file as mentioned in an earlier post here.

Dispage offers a must-have search enhancement for SugarCRM for FREE!  The only requirement is that you must install their Dispage Extension Manager (DEM) which allows you to install any of their products (some are free, other are for purchase).  The Dispage Enhanced Search allows you to search by date range, add AND, OR, NULL, NOT NULL, etc search parameters to fields, and more.  Without it, at some point you will find that the SugarCRM built-in search tools are just not enough.  Installation is fairly easy, but it adds a popup overlay that connects to the Dispage site to check for updates every time you log in.  Unfortunately, upgrades to SugarCRM become way to complicated once the DEM is installed.  If you simply upgrade SugarCRM, you will find that not only are all of the Dispage plugins are not working, but that the SugarCRM's built-in search tools a broken.  To upgrade SugarCRM, you must uninstall each Dispage extension, then uninstall the DEM module first.  I not, you will wind up having to do a very tedious manual uninstall.  At this point, my DEM is not working after the last upgrade.  It gives me the following error:

So far I have found nothing on the Internet that addresses this exact problem and the SugarCRM log file is not revealing anything to me.  If you have an idea on how to fix this, please contact me.  As I mentioned above, the Dispage Enhanced Search is a must-have, so I need to get it up and running again.


4/16/2011 Ed Lemmers

SugarCRM™ - Default File Permissions

Problem:

By default, SugarCRM sets folder permissions to 2770 and file permissions to 0660 which is incompatible to most LAMP (Linux-Apache-MySQL-PHP) servers. Most LAMP servers require folder permissions to be 0755 and file permissions to be 0644.  This problem may be fixed in newer versions, but if you running version 5.5.x, or have upgraded from this version and thus your config file has been migrated, then you will have this problem.  The symptoms of this are after installation, or after any upgrade, some program functionality will be broken, or certain messages show as "undefined" because the language files cannot be accessed.  You can find information relating to this problem in the SugarCRM forums, but it may not be apparent as how to find it, so I decided to post it here as well.

Solution:

You will find the following code around line 162 of config.php:

array (
    'dir_mode' => 1528,
    'file_mode' => 432,
    'user' => '',
    'group' => '',
  ),

The numbers here represent Linux/Unix file permissions expressed in decimal format.  i.e. 1528 in decimal is equal to 2770 in octal, and 432 in decimal is equal to 0660 in octal.  But what we need is 0755 octal and 0644 octal which is 493 and 420 decimal respectively. So modify the above code to be:

array (
    'dir_mode' => 493,
    'file_mode' => 420,
    'user' => '',
    'group' => '',
  ),

Upload the your config.php file after making these changes and you should no longer need to run chmod scripts after every upgrade to recover from the damage.


2/4/2011 Ed Lemmers

SugarCRM™ - Calendar Shows only 8:00 AM to 6:00 PM

Problem:

The calendar shows only 8:00 AM to 6:00 PM when displaying a single day.  This is worthless for a musician, restaurant, entertainment business, or many other businesses that are open outside of the traditional business hours.

Solution:

Download sugarcrmfolder/modules/Calendar/Calendar.php and look for the following code started around line 345:

function get_start_slice_idx()
    {

        if ($this->isDayView())
        {
            $start_at = 8;

            for($i=0;$i < 8; $i++)
            {
                if (count($this->slice_hash[$this->slices_arr[$i]]->acts_arr) > 0)
                {
                    $start_at = $i;
                    break;
                }
            }
            return $start_at;
        }
        else
        {
            return 0;
        }
    }
    function get_end_slice_idx()
    {
        if ( $this->view == 'month')
        {
            return $this->date_time->days_in_month - 1;
        }
        else if ( $this->view == 'week' || $this->view == 'shared')
        {
            return 6;
        }
        else if ($this->isDayView())
        {
            $end_at = 18;

            for($i=$end_at;$i < 23; $i++)
            {
                if (count($this->slice_hash[$this->slices_arr[$i+1]]->acts_arr) > 0)
                {
                    $end_at = $i + 1;
                }
            }


            return $end_at;

        }

 

Change $start_at = 8; to the time of day you would like your day to start, i.e. $start_at = 6;.

Change $end_at = 18; to the time of day you would like your day to end (24-hour format), i.e. $end_at = 23; for 11:00 PM.

Upload your Calendar.php and you are done.  (This is known to work for version 6.0.2.)

Note:  This modification is not upgrade proof.


12/2/2010 Ed Lemmers (as discovered by Ed Lemmers and Dave Courey)

KFM™ - Kae's File Manager (ver. 1.4.7) - Need to refresh file-manager pop-up to get it to populate

Problem:

In all browsers it is necessary to refresh the file browser page to see the page.  The problem is caused by a permission issue with the readfile function on line 9 of {kfm_folder}/j/all.php where {kfm_folder} is the base folder for your KFM installation.  This is because most LAMP web servers are setup with readfile disabled for security reasons.  Note: It is generally not a good idea to defeat this security measure as the readfile function can be used to push PHP file content out to the client.  Normally, PHP code never leaves the server, but if the readfile function is enabled, it could be possible for a hacker to exploit it to look at PHP file content.  This would be disasterous as database login information would then be available to the hacker.

Solution:

Modify line 9 of {kfm_folder}/j/all.php from:

if(file_exists(WORKPATH.$name)) readfile(WORKPATH.$name);

to

if(file_exists(WORKPATH.$name))
{
   $js = file_get_contents(WORKPATH.$name);
   echo $js;
}

The reason this works is that file_get_contents is generally not disabled on web servers because this function can only be used to send the contents of a file to a string within a PHP file.  If you examine the rest of the all.php file, you will notice that this is the method that is used if the file_exists function fails on line 9.

Note:  This modification is not upgrade proof.


10/23/2010   Ed Lemmers

SugarCRM™ - Pagination buttons are too far to the right after adding custom fields to list view

Problem:

After adding a lot of custom fields to the list view, the pagination buttons hang so far to the right that one needs to scroll to the right after every page change in order to do another  page change.

Solution:

Open ListViewPagination.tpl found in includes/ListView.  Look for the line that reads:

<table border='0' cellpadding='0' cellspacing='0' width='100%' class='paginationTable'>

and change the width to something smaller, such as 70%.

Note:  This modification is not upgrade proof.


10/13/2010     Ed Lemmers

SugarCRM™ - Large newsletters truncate in editor

While helping a client get her newsletter into a template, I discovered that the limit to the size of the newsletter was less than what was necessary to complete the newsletter.  Upon investigation, I discovered that the newsletter templates are stored in the email_templates table in the body and body_html fields.  These fields are of the "text" type.  Changing the type to "longtext" allowed me to get the entire newsletter into the template.


10/7/2010     Ed Lemmers

SugarCRM™ - Increasing email limit of only 10 recipients while emailing directly from contacts or leads. "Please select less than 10 records to proceed."

Problem:

When you try to select more than 10 recipients from either contacts or leads, then choose Email from the Actions dropdown, you get this message: Please select less than 10 records to proceed.

Solution:

Unfortunately, this is not something that SugarCRM™ wants to make configurable at this time.  The fix requires modifying two core javascript files.  Note that your modifications are NOT upgrade proof and will need to be re-applied if you upgrade.  I have performed this modification in versions 5.5.3, 6.0.0, and 6.0.2.

The two files that need to be modified are sugar_grp1.js and sugar_3.js.  These files are found in includes/javascript of your SugarCRM folder.  Open sugar_grp1.js add this line just below the comments block at the top of the file:

var max_emails = 100;

Then search for this line around line 303:

sugarListView.prototype.send_form_for_emails=function(select,currentModule,action,no_record_txt,action_module,
totalCount,totalCountError){if(document.MassUpdate.select_entire_list.value==1){if(totalCount>10){alert(totalCountError);
return;}

and replace 10 with max_emails.

Next, search for the following line around line 311:

var selectedArray=uidTa.value.split(",");if(selectedArray.length>10){alert(totalCountError);return;}

and once again replace 10 with max_emails.

Open sugar_3.js and perform the exact same modifications.  Note: Both files have the exact same functions at the exact same line numbers in SugarCRM™ version 6.0.2.

And that is it.  In this example we have the max limit set to 100 which seems to work fine.  You may set the limit to whatever number you like, but I have not tested it above 100, so I can't guarantee it will work for more than 100.


 

 

 

 

 

 

 

 

 

 

 

 

EB Dynamics, Inc.   2460 Fairmount Boulevard, Unit A, Cleveland Heights, OH 44106     E-mail: info@EBDynamics.com     ©EB Dynamics, Inc., 2009