Archive | Ecommerce RSS feed for this section

Introduction to MySQL Query Expansion – Part 1

12 Sep

We all know that back in stone age, the cave-man had no issues with data incompatibility, storage and search because stones & leaves were the only medium for data storage and search but that is past and  today we are in 21st century where we have to dealt with tons and tons of data and the data searching becomes more important.

Today we are going to learn the basics of MySQL Query Expansion. There are some cases,  where you want to find some information based on limited knowledge that you have. You use some keywords to search for information, and typically those keywords are too short. To solve this problem and help users to find what they want based on the too-short keywords, MySQL full-text search engine introduces a concept called query expansion.

What is query expansion?

The term query expansion in MySQL is used to broaden the search result of the full-text searches based on automatic relevance feedback which is sometimes referred as blind query expansion. Let us understand  how MySQL full-text search engine performs the steps when the query expansion is used:

  • First, MySQL full-text search engine looks for all the rows that match the search query provided by you.
  • Second, it checks all rows in the search result and then it finds all the relevant words.
  • Third, it performs a search again but based on the relevant words instead of the original keywords provided by the users.

Since you understood the basic concepts of query expansion, it might be clear  that you can use the query expansion when the search results are too short. You need to  perform the searches again but with query expansion to offer users more information that are related and relevant to the user.

Lets us understand the syntax:

In order to use query expansion, you need to use the WITH QUERY EXPANSION search modifier in the AGAINST()function. The following illustrates the syntax of the query using the WITH QUERY EXPANSION search modifier.

SELECT column1, column2
FROM table1
WHERE MATCH(column1,column2)
      AGAINST(‘keyword’,WITH QUERY EXPANSION);
In the next post, I’ll be continuing this topic with relevant examples and will see some quick facts about the full- text search. Please share your feedback and share if you like this topic.

Integrating PayUmoney payment gateway in PHP

10 Jun

payumoney

Today I am going to explain, how you can integrate PayUmoney in your custom PHP based website. In initial stage of plan to integrate PayUmoney to the website seems to be little confusing to those who are not doing regular coding but once you get involved, it seems to be easy one.  If you have gone through the technical document of PayUmoney, then most of the things are clearly mentioned as easy to understand.

Here is the step by step guide to integrate PayUmoney payment gateway in your site:

  1. Go to https://test.payumoney.com/ and sign up as a merchant account.
  2. At time of sign up you need to use your valid email id.
  3. Then fill all required business details. Use this details for PAN no. ABCDE1234F (use your PAN Number) and DOB – (dd/mm/yyyy) .
  4. Add your bank detail, note you can add whatever bank name and details use this IFSC – ALLA0212632 in place of IFSC.
  5. Don’t worry about bank details verification as you know this is your test account only.
  6. Once your required steps are completed and your account is live,then write mail to support team : (techsupport@payumoney.com) for activating your account and to provide salt key.
  7. Now after activation you can get your key go to Manage Account ⇒ My Account ⇒ Merchant -Key Salt copy your key and paste in your code.
  8. After receiving you salt key, you are ready to test the code which can be downloaded from PayUmoney site also.

I hope following these easy steps, you can easily integrate PayUmoney to your website.

Sample Code

You can also download the sample code from github.com

https://github.com/payumoney-india/PayUMoney_PHP_Module/archive/master.zip

 

Note:- Don’t forget to change the Merchant Key & Salt in the code.

 

Magento version 1.8 available to Download

10 Oct

Finally wait is over for new version. New Magento version 1.8 is available,Are you happy with 1.7? if yes that’s good but you can try the newer version. Download it from here.
1. Security Updates :- The security feature of the system has witnessed a major overhaul with the recent update….

6 Things Online Retailers Can Learn From Amazon

9 Oct

This post was originally written by Jeff Oxford , an Internet marketing consultant and founder of 180 Marketing who specializes in SEO for e-commerce.
With global ecommerce sales reaching over $1 trillion in 2012, it’s easy to see why so many companies are taking their business online. One o…

Page Speed the Key to User Experience & Tools

9 Oct

I was analyzing the page speed of my site and found that it need to be worked on seriously. I am working on it and in the mean while thought to share my views. You are definitely agree to me that page speed play an important role in online business. For User Experience it is one of the important…

Programmatically update coupon expiry date in magento

4 Oct

 
In my last post, I have discussed on how to update the expiry date of coupon via SQL Query in magento. In this post I am giving an alternate method of updating the expiry date of coupon and believe that it is a better way than the raw query. Below is the code which will update the expiry…

How to update expiry date of coupon in Magento

3 Oct

I have asked by one of my colleague to update the expiration date of coupon code in Magento, I thought of writing a script which will update the date of all coupon. Suddenly thought of a shortcut method and updated in database.
Here is the simple query:-
UPDATE salesrule_coupon set…

Blog Shifted

13 Sep

Dear Friends,

I got lot of support from you and I am very happy to let you know that Finally I have migrated from WordPress Hosting to own hosted Blog.

Yes, I believe WordPress is the best blogging platform available in market. So I have used wordpress again for my blog.

Here is a link for my New Blog :- http://mukundtechie.com

I request all my followers to visit my site and suggest me, What can be done to make it more interactive and pleasing to see posts.

All your feedback and suggestions are welcomed.

Thanks,

Mukund Chaudhary

New Blog : http://mukundtechie.com

 

How to get Controller, Module, Action & Router Name in Magento

6 Sep

In most of the case you need to know the name of controller or module in order to debug. Simple one line code to get these. In my previous post written about skill a developer must have. So targeting developer this is another post for them

1. Get Controller Name In Template Files:

$this->getRequest()->getControllerName();

2. Get Action Name In Template Files:

$this->getRequest()->getActionName(); //the function inside the controller

3. Get Router Name In Template Files:

$this->getRequest()->getRouteName();

4. Get Module Name In Template Files:

$this->getRequest()->getModuleName();

Finding Controller, Module, Action & Router Name In Class Files:

5. Get Controller Name In Class Files:

Mage::app()->getRequest()->getControllerName();

6. Get Action Name In Class Files:

Mage::app()->getRequest()->getActionName();

7. Get Router Name In Class Files:

Mage::app()->getRequest()->getRouteName();

8. Get Module Name In Class Files:

Mage::app()->getRequest()->getModuleName();

These functions i.e. getControllerName, getActionName, getRouteName, getModuleName are present in the class Mage_Core_Model_Url, you can display all the results by taking a vardump as
var_dump(Mage::app()->getRequest());

Hope this make sense to you and help you in debugging. Happy coding..:)

How to optimize the performance of a website.

3 Sep

Performance of a web page play a key role in conversion rate of your website. A fast website gets more user automatically. I decided to write on how to make the web pages loads faster.

Optimise performance of website

Optimize performance of website

If your answers is yes then, there are some of golden rule to be followed to make your site loads faster. They are as below:-

Rule 1: Make Fewer HTTP Requests

HTML take 10-20% time only however 80-90% of time spent in making HTTP requests for all the components (images, scripts, stylesheets, Flash, etc.) referenced in the HTML document. Using techniques as below, we can reduces response times of the pages by as much as 50%

  • Image Maps
  • CSS Sprites
  • Inline Images
  • Combined Scripts and Stylesheets

Rule 2: Use a Content Delivery Network
Content Delivery Networks (CDN) is a large distributed system of servers.The goal of a CDN is to serve content to end-users with high availability and high performance.

Rule 3: Add an Expires Header
A web server uses the Expires header in the HTTP response to tell the client how long a component can be cached.In Apace ExpiresDefault is set to 10 year.

Some useful techniques are as below:-

  • Expires Header
  • Max-Age and mod_expires
  • Empty Cache vs. Primed Cache
  • More Than Just Images
  • Revving Filenames

Rule 4: Gzip Components
Compression is a simple, effective way to save bandwidth and speed up your site. Smaller the file, faster it will loads.If you are using Apache, see how it work
Rule 5: Put Stylesheets at the Top
Put all your stylesheets at the top and remove unused content.
Rule 6: Put Scripts at the Bottom
Put script at bottom as anything below the script is blocked from rendering and downloading until after the script is loaded.
Rule 7: Make JavaScript and CSS External
Use external javascript and css as much as possible.

Rule 9: Reduce DNS Lookups
The Domain Name System (DNS) maps hostnames to IP addresses, just as phonebooks map people’s names to their phone numbers.DNS lookups add delays to the initial requests to a host. Making requests to a large number of different hosts can hurt performance.

Rule 10: Minify JavaScript
Always minify your javascript or css. There are various online tools available.(http://minify.avivo.si/#results)

Rule 11: Avoid Redirects
Redirects increase the load time as it has to look up two different address. Try to avoid redirects.

Rule 12: Remove Duplicate Scripts
Duplicacy in code normally happens but it can hurt your performance. So try to remove duplicacy in the code.

This article is based on Steve’s book High Performance Web Sites, published by O’Reilly.]