]]>http://www.kalenyuk.com.ua/postfix-relay-gmain-ubuntu-217.html/feed0Magento hebrew full text searchhttp://www.kalenyuk.com.ua/magento-hebrew-full-text-search-209.html
http://www.kalenyuk.com.ua/magento-hebrew-full-text-search-209.html#commentsMon, 30 Jan 2012 14:43:38 +0000http://www.kalenyuk.com.ua/?p=209Proper using hebrew in Magento needs some tuning. I had a problem to find such phrases as: ‘??? ???’ or ‘???’. I have used MySQL 5.1.49. The minimum and maximum lengths of words to be indexed are defined by the ‘ft_min_word_len‘ and ‘ft_max_word_len‘ system variables.
SQL: ‘SHOW VARIABLES;’ I have found that ‘ft_min_word_len’ was 4.
I have changed it to 2 in ‘/etc/mysql/my.cnf‘ in [mysqld].

More information can be found here:
http://dev.mysql.com/doc/refman/5.1/en/fulltext-fine-tuning.html
Then I reindexed the table with: ‘REPAIR TABLE catalogsearch_fulltext’.
More details:
http://dev.mysql.com/doc/refman/5.0/en/repair-table.html

QUERY (native Magento query):

SELECT 7 AS `query_id`, `s`.`product_id`, MATCH (s.data_index) AGAINST (‘??? ???’ IN BOOLEAN MODE) AS `relevance`, s.data_index
FROM `catalogsearch_fulltext` AS `s`
WHERE (s.store_id = 2) AND (MATCH (s.data_index) AGAINST (‘??? ???’ IN BOOLEAN MODE));

]]>http://www.kalenyuk.com.ua/illumination-options-for-configurable-products-103.html/feed0Add new image type for product in Magentohttp://www.kalenyuk.com.ua/add-new-image-for-product-in-magento-81.html
http://www.kalenyuk.com.ua/add-new-image-for-product-in-magento-81.html#commentsWed, 14 Apr 2010 15:54:39 +0000http://www.kalenyuk.com.ua/?p=81The goal of this article is to show to add new image type to product in Magento.

By default Magento has 3 type of images:

Base image

Small image

Thumbnail image

Typically these types of images is sufficient. But sometimes it becomes necessary to add a new type of image. Add a new type of image is easy as Magento in the gallery displays all the attributes for which the attribute ‘input_type’ equals ‘media_image’.

Code, described below adds a new type of image «small_image_two». It should be executed as an SQL update.

After installing Magento on hosting you probably have a desire to optimize its work.

Google offers solutions, which consist on using one of the following options: installing higher-performance hardware, correction for mysql/php configuration, using PHP accelerators, accelerate downloads JS and CSS, the correction assignment expires date for content, customization Magento core files to fit your needs.

Varien released a book titled “Enterprise Edition Whitepaper High Performance eCommerce” which explains the above methods of Magento optimization. I recommend reading this book and use the described methods of optimization.

I propose another new approach for the optimization of Magento, which was not described in the Internet before. I propose to use Varnish for caching pages.

What is Varnish you can read here. Varnish handles the request, looks in the cache this page and, if such page is found, returns it. If the page is not found in the cache – a request sent to Apache. This approach allows you to create any number of dynamic pages.

EXAMPLE

On the main page you can see poll module. Assume that we have 4 different polls. I propose randomly create 100 different copies of the main page. When user loads main page Varnish gives random copy of the main page. The probability of withdrawal of one of the 4 polls close to 25%.

This caching will give us the static pages to users who simply browse the site and did not do such actions as a vote, adding product to cart, login, etc. Majority of these users, so using this approach can significantly reduce the load on Apache. Once a user has voted, logged, added product to cart, etc. Varnish cache turn off.