Pages

Magento Shows No Product and Categeory

Magento E-Commerce Community Edition
It took me 20 minutes to figure out why the products and categories don't show up on the front page of the Magento e-commerce store.

  • The product has to be in stock, enabled and has positive inventory quantity.
  • Make sure the category is under the "Default Category"

It's important to make sure every configuration values is set correctly. Magento is a powerful e-commerce system. Without setting the values and configuration right, the site won't function correctly.

Magento 500 Server Error After Installation

Magento E-Commerce Community Edition
This is a simple solution for Magento shopping cart software. After install the Magento software on the server, it generates 500 server error.

The solution is to change the file permission for index.php file to 755.

That's it!

Disable Administrator Login on Windows7 Welcome Screen

Here is the easiest way to disable the Administrator account login screen on Windows7 welcome screen. You have to make sure the current user has administrator access to run the dos command prompt. If you were having trouble fixing your computer's hosts file access denied issues due to the sypware or virus on your computer, you can find the answers here.

According to http://support.microsoft.com/kb/555910
To enable the build-in Administrator account, follow these steps:
1. Click Start, and then type cmd in the Start Search box.
2. In the search results list, right-click Command Prompt, and then click Run as Administrator.
3. When you are prompted by User Account Control, click Continue.
4. At the command prompt, type net user administrator /active:yes, and then press ENTER
5. Type net user administrator , and then press ENTER.
Note: Please replace the tag with your passwords which you want to set to administrator account.
6. Type exit, and then press ENTER.
7. Log off the current user account.

To revert do exactly the same thing but change
net user administrator /active:yes to
net user administrator /active:no

Stop Remote Comment Spam Bot on WordPress Blog

SPAM!
Image Source: SPAM Courtesy Of: MasterMan

If you are running WordPress blog, you may already suffer the lost of your valuable time on fighting for the remote comments submitted by the Remote Comment Spam Bot. It's a known issues with WordPress and there is a work around solutions.

Block WordPress Remote Comment Spam Bot


Your can Read Terence Chang's Living The Dream Lifestyle blog and find out the solution he improved that has stop the spam bot.

CodeIgniter image_lib bug in the image process loop

This bug has me scratch my head for hours and finally found the solutions to fix it.

In CodeIgniter, you can upload multiple images and do resize, crop and watermark stuff. It's cool that you can use one library to do many awesome stuff. However there is problem when using image_lib in the loop.

Problem:

I upload few image and want to loop through each one of them and resize them differently based on their original size. So I put the resize function in the loop. However, the dimension is based on the previous image.

For example. the first image is resized to 100x200. The second image should be resize to 50x100, but is resized to 100x200. The third one should be resized to 400x300, but is resized to 100x75.

In other words, the second image was resized using the dimension from the previous resized image based on the second image's longer side (W or H). The first image was resized to 100x200, so the second image was resized to 100x200 because the original dimension of the second image was 50x100 (Height is larger than width). So it take the first image's height to resize the second images. Crap!


Solutions:
In the image_lib in CodeIgniter, there is a function to clean the setting ($config). However, there is missing parameters in the function.

So I add two lines in the function clear().

$this->width = '';
$this->height = '';
Add the above two lines before closing the function.

Problem solved!

Facebook Social Plugin load page twice on Firefox and Google Chrome

There is weird issues with FireFox and Google Chrome. The page will be loaded twice, if Facebook Social Plugin such as LIKE button installed on your site.

There is a solution post on Terence Chang's blog!

Prevent Facebook Social Plugin to load page twice – CodeIgniter

iPhone is not recoganized on XP / Vista as Camera drive

In some case, the USB driver was not working right so iPhone is not recognized as camera drive or external storage drive.

Here are the step to make it works.

  1. Connect your iPhone by USB
  2. Open Windows Device Manager (right-click My Computer and select Manage). You may find your iPhone under “Universal Serial Bus Controllers” or possibly under “Portable Devices”.  At any rate if your phone can sync with iTunes it will be in there somewhere.  It should be called Apple Mobile Device USB Driver.
  3. Right-click and select “Uninstall” but don’t remove the files from the PC.
  4. Disconnect your iPhone and reconnect. You should see the iPhone showing as one of the camera drive or external storage.

In case you still not seeing your iPhone showing up. Make sure you have at least one photo in your Camera Roll.

Fix YouTube overlay issues with WordPress Menubar

Problem:
YouTube Video is covering up the menu bar. It's due to the flash play that has the top priority.
 
Solutions: 
Add the wmode=opaque parameter to the embed code. 

< object width="460" height="307" VIEWASTEXT>
 < param name="movie" value="src="YOUR_YOUTUBE_URL_HERE"">
 < param name="allowFullScreen" value="true">
 < param name="allowscriptaccess" value="always">
 < param name="wmode" value="opaque" />
 < embed src="YOUR_YOUTUBE_URL_HERE"
  type="application/x-shockwave-flash"
  allowscriptaccess="always"
  allowfullscreen="true"
  width="460"
  height="307"
  wmode="opaque">
 < /embed>
< /object>

iPhone Google Active Sync Stop working - Keep asking password

iPhone Google Active Sync keep asking to enter correct password. There is chance that the Captcha is locked. To unlock it visit the following site and enter the correct Google account.

https://www.google.com/accounts/UnlockCaptcha

Zenith DTT900 Digital-To-Analog Converter For Remote Control

To use the Zenith remote control to turn on the TV, press the "Power TV" button and keep pressing. Then press "Ch. Up" or "Ch. Down" button on the right. Zenith will send "manufacturing code" to your TV. Once the TV turns on/off (do this little slowly), then you're set to use the same Zenith remote for both TV and the converter box.

Source:
http://reviews.pricegrabber.com/tv-accessories-and-mounts/m/63677291/discussions/thread/449643/

Use These Ten Sales Copy Approaches To Beef Up Your Online Sales

Source:

These 10 secret methods will work for you and hopefully improve your conversions and profits.

1. The "Blast From The Past" Approach
The "if you order today, you will also receive all the past (bonuses or products) that I've previously removed..." approach tells potential customers that in the past you removed some things from your offer that they would never have had the chance to get until now. It could be older products, articles, reports, software, courses, content, etc.

2. The "Bought Everything" Approach
The "like you, I've bought products from everywhere imaginable and they still didn't work..." approach tells potential customers that you know that they have likely bought a lot of products from all sorts of places which never lived up to their claims. You could mention they may have bought them from infomercials, catalogs, the Internet, seminars, etc. You can say that after all those horrible experiences, you finally decided to develop a product that actually works.

3. The "A Bonus Date" Approach
The "special bonus just added! (date) (time)..." approach tells potential customers that you recently added a new bonus to your offer. It may excite them that it has just been added because they will be one of the first to get it. You could even tell them the date your next new bonus will be added. They will assume they will keep getting new bonuses as a paid customer.

4. The "Buyer Advantage" Approach
The "all my paid customers get told about my new product releases before my regular prospects...." approach tells potential customers that if they become a paid customer, they will get a chance to benefit from your new product releases before everyone else. You could give your paid customers another perk, like being the first to join your new affiliate program for the new products you release.

5. The "Buy A Bio" Approach
The "I'll reveal more about my past with you when you become a customer..." approach tells potential customers that they can learn more personal and professional things about you when they purchase your product. You could have a partial bio on your web site and a full bio sent with their product package or on your thank you page. Many people become curious about your whole life and history when they decide to purchase something from you.

6. The "Inside The Mind" Approach
The "go inside the mind of successful people that have (your product's benefit)..." approach tells potential customers that you will give them the mental instructions for using and gaining their desired benefit with your product. You could mention they will learn the habits, attitudes, beliefs, mindsets, emotions, etc. of other people that have been successful with your product. You could just interview these people and compile it into an information product.

7. The "Bed Of Nails" Approach
The "I'd rather lie on a bed of nails than not have (your product's benefit)..." approach tells potential customers now that you know what it's like to have your desired benefit with your own product or one from someone else, you would do almost anything not to go back to the way it was. You could explain the emotions you used to have, the problems that you experienced, the way if affected people around you, etc. Other descriptions of torture are: walking over glass, needles shoved under your finger nails, lying on hot coals, etc.

8. The "Back You Up" Approach
The "bonus: you'll get a back up copy shipped to you..." approach tells potential customers that you will give them a physical back up copy of your digital product that they normally just download. Tell them it will save them the time and frustration of re-downloading it if their computer crashes, if they get a destructive virus, if they accidentally delete it, etc. Tell them to hurry because you only produced so many copies.

9. The "My Favorite" Approach
The "my favorite food is..." approach tells potential customers that you are revealing some fun, personal information about yourself that is unrelated to your product. It will lighten up your sales letter or pitch so people might rest their buying defenses for a few minutes. It could be your favorite color, TV show, movie, music, joke, heroes, drink, place to vacation, quotes, vehicle, book, dream item, etc.

10. The "Normal Than Usual" Approach
The "the normal commission is $(no.) per sale but if you join the affiliate program through this link, you'll get ($) per sale..." approach tells potential customers that you made a deal with the product owner to give your audience a higher commission than normal on his affiliate program. Of course, the owner could give you second tier commissions for telling your prospects about it. It's a win/win deal for everyone involved.

Marketing ides

Source: Fastlane by MJ
1) Press releases ... a great way to get FREE publicity. Because the cause is good and somewhat newsworthy, there is a good chance that it might be given airtime on major news outlets. If not, the release still might get picked up on news aggregators on other websites. The other benefit to good PR is you might get calls from media outlets that want to use your product in some sort of promotion (A cable TV cooking show for example)

2) Partner with websites that cater to your target market. Could be gourmet foods, chefs, recipe sites, or even charitable foundations. Obviously, the type of partner / joint-venture arrangement is dependent on your offer and what you are capable of supporting, tracking, and executing. It can be an extravagant arrangement involving revenue shares, product placement, or something as simple as link exchanges.

There are two entities you can approach -- 1) The product (jams, jellies) and 2) The good cause of helping disadvantaged children.

I think as you dive into marketing, you will see which entity approach provides you the most traction.

3) Traditional PPC campaigns targeting all your products specifically. I'd think that your keywords would be fairly cheap -- examples, "peanut butter jam" "amish family recipes" etc. When you start dabbling in the generic words "recipes" then things get quite costly and competitive.

4) Traditional SEO -- again, each product you offer should have its own page that specifically promotes that product. This will help your organic rankings for specific product searches which is how most people search.

5) Affiliate programs -- start your own affiliate program or join a management network. When your affiliates sell your product, you pay them a cut. To find affiliate networks that you can join, hit Google and type in "AffiliateNetworks". Do your diligence on these as they can get costly and some have affiliates that are just plain horrible.

6) Attempt to create a community whereas users can see the benefits of their work. As with all donations, people LOVE to see their money at work. If people don't see their money at work they are less likely to give. I know this is a content issue moreso marketing, but creating community generates traffic and buzz. Word-of-mouth is the best marketing tools available. Perhaps a "Children who have been helped" and their pictures and what kind of help they received.

7) Free giveaways - Promote a giveaway, a contest, or something and promote it on your site, your MySpace/Facebook pages etc. Perhaps a "Jam of the Month?" or a contest? Giveways are great -- just an example right here -- the daily visitors here spiked 40% when I offered D. Kennedy's FREE book. While the traffic spike might be temporary, it surely will increase quality users over the long haul which is the long-term goal. Contests can also be promoted via Press Release.

8) Post articles to article websites pertaining to either Amish Recipes or charitable causes. Allow users to DIGG them. Same goes for your own website.

Source: Fastlane by Andrew
I would suggest focusing on the public relations side and hitting it really hard. Ignore the advertising and SEO for now. Your business sells itself so you already have an edge. Build a contact list of journalists -- newspapers, magazines, cable news networks, local news networks, blogs, major web sites, and so on. Every single contact you make needs to be very focused and tailored to that specific individual. Look at previous work the reporter has written and figure out how to tie that into your first contact. Having the personalized approach is critical, and you will get responses, guaranteed.

PHP Header Location vs Header Refresh

This is very interesting tips about using PHP to do Redirect.

PHP Header with Location seem to redirect faster than using Refresh. Looks like Refresh will create the <meta> refresh tag and depends on the Browser to redirect. In FireFox, it will actually show a blank page before it redirects to destination page.

With Location option, it seems to redirect directly without showing the blank page.

header("Refresh:0;url=". $this->config->item('PF_HTTPS_ROOT') . '/member/signin/');


header('Location: ' . $this->config->item('PF_HTTPS_ROOT') . '/member/signin/', TRUE, 301);

Either ways, it will have a round trip between Server and Client's browser.

Handle PHP multiple choice select dropdown and checkbox

This took me hours to figure out that something was wrong in the PHP.

is_array() and count() can't really distinguish array() or string, if there is only one element.

For example.

$test = array('123');
is_array($test) will return true;
count($test) return 1

$test = '123';
is_array($test) will still return true.
count($test) will still return 1.


So there is no point to check a submitted field from PHP form as an array or a string.

This will cause problem when handling multiple choice select dropdown box or checkbox.

In PHP multiple choice field will need to be name with [] after the field.

For example:

state_id[]
In normal case, if the select box only accept one selection, the field name will be just state_id.

This confuse the PHP form validation. It returns just one string. So you will get error message when handling it with foreach loop.

for example
foreach($_POST['state_id'] as $state_id)
You will get an error like this.

Severity: Warning

Message: Invalid argument supplied for foreach()

Solutions:

No matter the select dropdown box allows to choice one or multiple options, always use multiple format. In other words, always use [] after the field name in the html form.

It will work with the validation process and treat the field as array as always.

CodeIgniter Cache Issues

Well! This is actually not an issues of CodeIgniter cache system. It's how I wrongly use the cache function.

Whenever you use db->cache_on() function to cache the current query. It will cache all the executed queries from this point for the rest of queries in the whole PHP page.

In other words, it will cache everything query that do not have db->cache_off(). WOW! What a big mistake.

So if you just want to cache the current query execution, remember to put db->cache_off() after executing the query. Always remember that!

for example:
$this->pf_db->db->cache_on();
$result = $this->pf_db->db->query($query);
$this->pf_db->db->cache_off();
Without the cache_off(), all the queries after this one will be cached!

Annoying bug in MYSQL 5.0.51b

Just realized that in MYSQL 5.0.51b, sorting data from INNODB on primary key with where clause will NOT work.

See other bug report at http://bugs.mysql.com/bug.php?id=31001

Basically, if you use where clause in the query like this. The primary won't sort.

SELECT * FROM (`store`) WHERE `publisher_id` = 1006 ORDER BY `store_id` desc
In the query, store_id is the primary key in the innodb.

If you remove the where clause, it will sort correctly.

WTF! This is a critical bug. How come MySQL don't catch that at first place. This bug seem to be there for a long time.

CodeIgniter Issues with .htaccess to display No input file specified. error

When running CodeIgniter on Apache 2.2 with PHP5, it display the following error when access url.

No input file specified.

System state:
Apache 2.2
PHP5.2 running as CGI mode with cgi.fix_pathinfo=1 according to PHPINFO().

Problems:
This problem is primary due to running PHP in CGI mode on Apache.

There are two solutions. No matter which one you choose, you will always have the same step 1.

Step 1: Obviously, PHP running under CGI mode has cgi.fix_pathinfo default to 1. Simpley open the /system/application/config/config.php file and make sure the following two options are set.

$config['index_page'] = "";

$config['uri_protocol'] = "AUTO";

Solutions 1:
Step 2: Create a customized PHP.INI file under the root directory of your site with the following line.

cgi.fix_pathinfo = 0;


Solutions 2:
Step 2:
Go to .htaccess file and add question mark after index.php and before slash.
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?/$1 [L]

Personally, I choose the Solution 1 with PHP.INI. It seems to run faster.

Problem solved!

PHP5 + Apache2.2 + MySQL5 Installation issue solved

I have tried many ways to get this working.

When install PHP5 + Apache2.2 + MySQL5, it shows that MySQL extension can not be loaded.

I followed every instruction to enable the extension in PHP.ini and point the Extension_dir to the right directory (ex. C:\PHP\ext). I also add the right model in Apache2.2 conf file to load the PHP5.

Problem:
PHP5 is unable to find the libmysql.dll and related MySQL extension. According to new PHP5 installation manual, you simply add your PHP5 installation path to the windows environment variables. Even you add your PHP5 installation path to the windows PATH environment variable, it still doesn't work.

Solution 1:
Copy libmysql.dll to your Windows System32 folder and restart your Apache2.2.

Warnning: This is not an ideal ways to solve the issues. You will run into situation that you need copy more dll to System32 folder. It is a night maire to upgrade the future versioin of PHP.

Solution 2:
After you set the PATH environment and restart your computer, it should just work without copying files to System32 folder. This is the reason, why it doesn't work.

Apache does not update the PATH environment until you reboot the server.
After you set the PATH environment variable, turn PHPINFO() and see if the Apache Environment variable is updated with the new path variable. If not, you will need to reboot the machine.

Problem solved! It's as simple as rebooting the machine.

MySQL Administrator :: server service or the configuration file could not be found

After install MySQL Administrator GUI tool, it is possible that you run into the error like the following when you login into the tool.




The solution is simple. Try login to the server without the login and password.


Remove the username and password and press control key. The "Cancel" button turns into a "Skip" button.

Press Skip and it will take you to the interface that you can manage and make correction to the config file. In most of the case, the default ini file is pointing to my.cnf. Change it to my.ini.




Problem solved!

Unable to Install WIndows Live Writer on XP SP3

I was using Windows Live Writer for sometime on XP SP2. After installing SP3, many programs stop working. One of them is the Windows Live Writer. I keep getting Windows Installer error and Windows Live Setup service errors in the event log.

It seems that when running Windows XP SP3 many people are having issues installing windows live applications using the windows live installer. After much googling I have come across a solution. This also solves issues that exist with the windows update service after installing SP3.

Essentially what you need to do is:

1. Download and run the Windows Live Installer Cleanup tool from:

2. Reboot

3. Click START>Run and type 'command' to load the console.

4. Type in:

regsvr32 wups2.dll

and press enter.

5. Type exit to leave the console

6. Download and run the windows live installer, it should now work perfectly.