Always Get Better

Posts Tagged ‘e-commerce’

Wamp Server Crashes Installing X-Cart

Sunday, January 24th, 2010

When running a default installation, WAMP Server’s Apache crashes when installing X-Cart. The error happens immediately after setting up the MySQL tables and is caused by the curl extension in PHP.

To resolve, click on the WAMP Server icon in the task tray, go to Apache -> Version -> Get More. Download one of the 2.0 series Apache servers and install it.

Repeat the process for PHP; download one of the 5.0 series PHP versions and install it.

Switch WAMP Server to the new versions and run the install again – it should work with no problems.

  • Share/Bookmark

GoDaddy Hit by DoS Attack

Thursday, January 15th, 2009

Until recently, Always Get Better was hosted by GoDaddy. We moved in November so I could have better control of the various web sites I am running. I can say that I was not unhappy with the service offered by GoDaddy – I just outgrew it.

I guess I got lucky this time. According to cnet, GoDaddy was struck by a denial-of-service attack on the morning of January 14, 2008. There are conflicting reports (naturally) of the exact number of sites affected ranging from several to several thousand.

  • Share/Bookmark

RIAA Changes Tactics

Monday, January 12th, 2009

The RIAA has had an interesting few years. Their business model is dying and they have been fighting to save it by suing evil music thieves like single mothers on disability pay, deceased grandmothers and, most heinous of all, families who do not own computers.

Now the Association has backed off slightly and switched to a more cost-effective method; at least, they have offloaded the burden of identifying music pirates to the ISPs that host them. Rather than issue subpoenas to service providers for the names of their downloading subscribers, the RIAA has switched to sending lists of IP addresses and evidence to those ISPs it has partnered with. The ISP can then take measures into its own hands by:

  • sending warning emails
  • sending warning letters
  • reducing bandwidth/speed of violators’ Internet connection

It works for everyone except Internet users – the RIAA gets counter-sued less because it is no longer serving papers to innocent bystanders victimized by faulty IP records or the delays between court orders and identifying information (leading, for example, to charges against families who don’t even own a computer when in fact the former occupants of their home was involved in downloading). The ISPs get an excuse to rid themselves of customers who make full use of the bandwidth and network resources they are paying for.

I recently heard an argument that people who download or otherwise pirate a particular piece of software or music are unlikely to have purchased it at all therefore prosecuting them is pointless since they would never have been a customer anyway – the creator of the downloaded content hasn’t “lost” money. Where I come from, if we aren’t willing to pay for something for any reason idealogical or otherwise, we simply do not own it – we don’t try to source it for free. I’m not defending the RIAA, I just don’t understand the value derived from downloading libraries of music.

  • Share/Bookmark

Apple is Having Babies

Monday, December 1st, 2008

We rented Baby Mama this weekend. I was happily surprised to find PC Guy in the role of the fertility doctor – perhaps a nod to Mac Guy’s film appearances. It warms my heart to see those references transitioning into the cultural lexicon. All this got me thinking about Apple’s “Get a Mac” campaign; there have been some funny ads circulating around the net lately, including some Flash videos seemingly spreading between ad spots (how do they do that?).

The newest byte is that due to a shortage of trained developers, talented programmers can earn $125-$200 per hour by developing iPhone applications.  Unbelievable!  Where is my old iBook when I need it – buried under a stack of music CDs with an old version of OS X that doesn’t support the iPhone SDK.  Maybe the time is right to spring for a new laptop if there is a potential to earn $250,000 by creating a decent marketable application.  Gold rushes like this don’t act long – talk about striking when the iron is hot!

  • Share/Bookmark

How to Create Full Text Search Using mySQL

Thursday, February 14th, 2008

Search is one of the most basic features visitors expect when they come to a web site. This is especially true in e-commerce where your ability to make a sale is directly related to your customer’s ability to find the product they’re looking for.

Using Third-Party Solutions

Many first-time site owner choose to go with Google Custom Search because of its easy setup and because of Google’s incredible indexing reach and results. I don’t like the standard edition of the Custom Search because of the branding – your search results advertise Google and provide links to competing content. For an e-commerce site to lose control of such a critical function, the results can be costly.

Don’t Give Up Control

Especially in e-commerce, it is best to never give up control over any content. Advanced users may choose to ignore your site’s search tool and use Google to get at your content anyway (via the site: directive) but in the general case there is great potential to keep selling useful products to your potential customers even while they search your site for other items.

Incorporating a decent search tool into a web site using PHP is dead simple. All it involves is a database table with 3 or more rows and a little bit of an eye for layout. Even if you don’t consider yourself a designer, having a look around other search engines will give you a feel for how results should display.

Creating the Search Tables

Let’s get started. Our simplistic database table (PRODUCTS) will consist of the following columns:

Column Name Data Type Description
intID int Product ID and Primary Key
vcrName varchar(25) Product Name
txtDescription text Product Description
vcrPhoto varchar(40) Path (URL) to product photo

Obviously this is just a simplified example, but the product ID, name, description and photo should be enough for the purposes of our demonstration.

The SQL to create the table looks like this:

CREATE TABLE PRODUCTS
(
intID int auto_increment,
vcrName varchar(25),
txtDescription text,
vcrPhoto varchar(40),
CONSTRAINT PRODUCTS_pk PRIMARY KEY ( intID )
);

Add the Full-Text Index

In this example, we’re interested in searching the name and description fields of our products. In order to add the full-text index to our table, we use the ALTER TABLE command:

ALTER TABLE PRODUCTS ADD FULLTEXT( vcrName, txtDescription );

Alternatively, we could have created the index along with the table in our original CREATE statement like this:

CREATE TABLE PRODUCTS
(
intID int auto_increment,
vcrName varchar(25),
txtDescription text,
vcrPhoto varchar(40),
CONSTRAINT PRODUCTS_pk PRIMARY KEY ( intID ),
FULLTEXT( vcrName, txtDescription )
);

Searching For Text

Now that the index has been created, we can go ahead and search the database. To activate full-text search, we use the MATCH () AGAINST () syntax like this:

SELECT intID, vcrName, txtDescription, vcrPhoto
FROM PRODUCTS
WHERE MATCH( vcrName, txtDescription ) AGAINST ( ‘search terms here’ );

That’s all there is to it! Anyone with access to a mySQL database should be able to incorporate search into their sites without too much difficulty. Of course this is a very basic introduction, but should be more the sufficient to get going with.

  • Share/Bookmark

SEO Powered by Platinum SEO from Techblissonline