Archive

Archive for December, 2009

CRE Loaded 6.4.1 is here

December 29th, 2009 No comments

Long awaited release of CRE Loaded 6.4.1 is finally out. Now Google Base feature is back in CRE Loaded. Beside bug fixes and Google Base it also includes some new features like

  • Admin log in as customer
  • Several PayPal payment modules
  • Admin Password hardening to satisfy PCI PA-DSS requirements 8.5.10 and 8.5.11
  • etc

Right now I did not get chance to look at new release, will get back as soon as I get chance to see.

Categories: CRE Loaded Tags:

Page Speed Tool from Google

December 29th, 2009 No comments

Recently found an interesting tool from Google “Page Speed” for FireFox, similar to yahoo’s YSlow. Page Speed is installed with firebug extension. The tool is very useful for analyzing the performance of any page.

It gives suggestions in different categories to improve page load time. The suggestion include compression, browser cache, serving from cookie less domain, optimize images etc. The suggestion are much similar to which provided by YSlow, but more detailed analysis of images and css etc makes it different.

Page Speed gives cool stats about the images optimization and actually allows us see and save the optimized version in PNG format. The optimized version seems to be as good as the original version when compared visually but significant reduction in file size is achieved. I recently used images optimized with Google Page Speed tool in CRE loaded based project, and observed significant improvement.

Categories: Web Performance Optimization Tags:

A grade performance with CRE Loaded

December 29th, 2009 No comments

For last few days worked on performance optimization of CRE Loaded site. Now all major performance measuring tools Yahoo YSlow, Google Page Speed and WebPageTest.org are rating the site as A grade site.

I have been studying and applying performance guidelines for a while. Recent addition of Site Performance stats in Google Webmaster Tools have motivated me to run a full optimization cycle on CRE Loaded.

A number of performance tweaks were applied over a time, like cache, gzip compression, image cache etc. Still few things were missing like proper use of browser cache, http requests, css gzip etc.

Now following are results from performance measuring tools
YSlow

Page Speed

WebPageTest.org

Detailed test results can be seen at http://www.webpagetest.org/result/091228_3WME/

Time Requests Bytes In
First View 1.812s 14 133 KB
Repeat View 1.061s 2 9 KB

If you want your site to perform as good as A grade site you can contact me by posting a comment for free advice.

Free tool to analyze web server logs

December 21st, 2009 No comments

Web servers log a lot of information regarding request served. These logs can be used extract a lot of information about your site. For example which images are requested most, which pages are famous etc etc. As these logs are in text format so its very difficult to get any meaningful information manually.

I have recently used a tool to get a lot of information which helped in performance optimization of my site. The tool is called WebLog Expert. The tool can analyze apache or iis logs both in compressed form (gzip) or plain text format. Its Lite version is free of cost but pro and std version have small tag price. More information can be found at weblogexpert.com.

Categories: Web Performance Optimization Tags:

Importance of page load time for SEO

December 16th, 2009 No comments

SEO experts are expecting Google to give more importance to page load times in search ranking. This simply means faster site will have more weight in search results. Google is already measuring average page load time, through its toolbar. Google started measuring page load time in early August 09 (at least for sites I monitor).

Before this webmasters and owners just had to worry about crawler speed now they have an other area to cover. Managing good crawler speed is relatively easy to gain, as it only includes delivery of html. On other hand page load includes delivery of html, images, css, js etc and order in which these are provided.

There is a lot of stuff available to improve site performance on server and on client browser in Web Performance Optimization.

Categories: SEO Tags:

Google Site Performance tool released

December 5th, 2009 No comments

Google have added its site performance tool under Webmaster Tools. The tool is available under “Labs” menu, so it means its still in testing mode. See the image below
google_performance_menu

The tool includes a graph of average page loads time. The stats shown are collected from visitors who use Google tool bar with PageRank option enabled. The graph gives clear idea how your site is performing for the visitors. see the image below
google_performance_graph

Next part of the tool shows some tips to improve page load time based on Google Page Speed tool.
The release of the tool shows that Google likes faster sites from visitor point of view, and how important site performance can be in Google ranking. To read more how to improve site performance please follow Web Performance Optimization category.

Categories: Web Performance Optimization Tags:

Product listing bug in CRE Loaded

December 2nd, 2009 1 comment

While working on some site I came across a bug in Special product page. If we have turned manufacturer name on in product listing, the link generated on the name is missing the manufacturer id value. The invalid link created looks like this http://demos.creloaded.com/creloaded_ce/index.php?manufacturers_id= on page https://demos.creloaded.com/creloaded_ce/specials.php.

I found this in cre loaded Pro 6.4.0, but when confirmed it exists in Community edition as well. I guess this issue may exist on other pages like “new products page”.

The manufacturer name can be turned on from Admin > Configuration > Product Listing > Display Product Manufacturer Name.

If you are using SEO URLs addon this bug can cause you a lot because it will generate unwanted link to your home page.

There are two ways of fixing the issue, one is to wait for fix release of which was expected in August but still not here, i am not sure if this bug will be fixed or not. Second fix is simple one, and can be found at Product listing bug fix in CRE Loaded.

Categories: CRE Loaded Tags:

Speed up CRE Loaded with cache

December 2nd, 2009 5 comments

Cache have become an important tool for increasing performance of a website. In this post we will install a famous osCommerce contribution to our CRE Loaded PCI 6.4 for cache.

The contribution is called osC Advanced Cache Class. The contribution will enable us to cache just about every thing like large arrays, data, html, even executable PHP code. More details of the contribution can be found here.

Here we will only install this contribution on cre loaded 6.4 we will use it later some where. For the possible uses please see contribution home page, referred above.

We will be installing it on Pro version and I hope the process will be same for other cre loaded versions. We will use Runtime Code Inclusion (RCI) feature of Cre loaded, to minimize chances of losing our changes during future upgrades. For RCI details refer to cre loaded.

Step One: downloading the contribution

Download the contribution from this page and extract it to some folder. The code includes an install script but please don’t use it as it is made for oscommerce not cre loaded.

Step Two: Adding class file

Copy osC-Cache/osC-Cache/upload/includes/classes/cache.class.php file to your installation of your cre loaded. The file should be copied to /includes/classes/ folder of your installation.

Step Three: Database Changes

You will need to add a new table in you database. Create a new table by executing the following query.

CREATE TABLE cache (
cache_id varchar(32) NOT NULL default '',
cache_language_id tinyint(1) NOT NULL default '0',
cache_name varchar(255) NOT NULL default '',
cache_data mediumtext NOT NULL,
cache_global tinyint(1) NOT NULL default '1',
cache_gzip tinyint(1) NOT NULL default '1',
cache_method varchar(20) NOT NULL default 'RETURN',
cache_date datetime NOT NULL default '0000-00-00 00:00:00',
cache_expires datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (cache_id,cache_language_id),
KEY cache_id (cache_id),
KEY cache_language_id (cache_language_id),
KEY cache_global (cache_global)
) TYPE=MyISAM;

Step Four: Implement cache class using RCI

Now create a new empty file named cache_applicationtop_bottom.php in folder includes/runtime/applicationtop/ of your cre loaded installation. Now open the new file and put following code in the file cache_applicationtop_bottom.php

<?php
global $cache, $languages_id;
# include the cache class
include(DIR_WS_CLASSES . ‘cache.class.php’);
$cache = new cache($languages_id,true);
# Get the cache – no parameters will get all GLOBAL cache entries for this language
$cache->get_cache(‘GLOBAL’);
?>

After saving the file try browsing your site, if you have done all steps properly you should not have any problems with it. If you see any problem like blank page is displayed or any thing else please make sure that you followed all steps properly.

May be in some other post we will see how we can use this cache contribution with cre loaded and get maximum advantages of cache.

Categories: CRE Loaded Tags:

Product listing bug in CRE Loaded

December 1st, 2009 No comments

Today fixed a bug in product listing of cre loaded 6.4.0 pro. Due this bug manufacturer link on certain pages was missing manufacturer id. The bug existed on Special products, New Products and Featured products page.

To fix the issue open file specials.php and find line case 'PRODUCT_LIST_MANUFACTURER':. In line next to it add p.manufacturers_id, after m.manufacturers_name,. This will add manufacturers_id column in selection list. Save the file and test.

You can do same thing in files products_new.php and featured_products.php. Keep following CRE Loaded category to stay updated.

Categories: CRE Loaded Tags:

Speed up product search for CRE Loaded

December 1st, 2009 No comments

CRE Loaded provides a basic search where a product can be searched by product name, model and manufacturer. If selected search is also performed in product description. This search uses SQL “LIKE” syntax to search in text fields. For example is keyword “test” is search the query will be

select distinct p.products_image ... final_price from ( products p left join specials s using(products_id) ) left join manufacturers m on p.manufacturers_id = m.manufacturers_id , products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%test%' or p.products_model like '%test%' or m.manufacturers_name like '%test%' or pd.products_description like '%test%') ) order by pd.products_name

The LIKE search can be very slow with large amount of products and specially when searching in description as well. To avoid this we can make this search to use fulltext searching feature of MySQL. The fulltext search will make searching in description much faster then normal like query. So lets start on fulltext search for CRE Loaded but before we start backup your files and database before you make any changes in case if any thing goes wrong, secondly changes mentioned worked for CRE Loaded pro 6.2 version but it should work with other versions as well.

First we need to create fulltext index on products table by following query.

ALTER TABLE products_description ADD FULLTEXT INDEX idx_name_desc (products_name, products_description);

Now to enable or disable fulltext search we need to add configuration so admin can do it easily. The query to add configuration is following.

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id

, sort_order, last_modified, date_added, set_function)

VALUES ('Fulltext search', 'ADVANCED_SEARCH_FULLTEXT', 'false', 'Enable/Disable fulltext search', '1', '999', NOW(), NOW(), 'tep_cfg_select_option(array(\'true\',\'false\'),');

Now we need to add code for fulltext searching which will be added in file /templates/content/advanced_search_result.tpl.php. To do this open the above mentioned file and find

if (isset($search_keywords) && (sizeof($search_keywords) > 0)) {

$where_str .= " and (";

and add following code after it.

if(ADVANCED_SEARCH_FULLTEXT == 'true')

{

$ft_keyword = tep_db_input($keywords);

$where_str .= "MATCH(pd.products_name, pd.products_description) AGAINST('".$ft_keyword."' IN BOOLEAN MODE) OR p.products_model like '%".tep_db_input($keywords)."%'";

}

else

{

now find

$where_str .= " )";

and add code

}

before the code found.

Now the query should look like

select distinct p.products_image, ... final_price from ( products p left join specials s using(products_id) ) left join manufacturers m on p.manufacturers_id = m.manufacturers_id , products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and (MATCH(pd.products_name, pd.products_description) AGAINST('test' IN BOOLEAN MODE) OR p.products_model like '%test%' )

In above query fulltext search will be performed in product name and description, the model will still be searched in LIKE mode, and manufacturer name will not be searched. With little effort model and manufacturer name can also be added to fulltext search.

Categories: CRE Loaded Tags: