The Top 20 replies by programmers when their programs do not work

The Top 20 replies by programmers when their programs do not work: That’s weird… It’s never done that before. It worked yesterday. How is that possible? It must be a hardware problem. What did you type in wrong to get it to crash? There is something funky in your data. I haven’t touched that module … Read more

Alter MySQL table to add & drop column & add Foreign Key

This article shows:- – How to add column to mysql database table after the table has already been created – How to delete column from mysql database table after the table has already been created – How to add foreign key to table column after the table has already been created Basically, all this can … Read more

Magento: How to get product stock quantity & other stock information?

Here is a quick code to get any product’s stock information like quantity (qty), minimum quantity (min_qty), stock availability (is_in_stock), minimum and maximum sale quantity (min_sale_qty and max_sale_qty), etc. First load the product. Product can be loaded in different ways. Here are the two different ways to load any product in Magento:- 1. Load product … Read more

WordPress Fix: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s)

Scenario: I am getting this warning message in my wordpress blog:- open_basedir restriction in effect. File(/tmp) is not within the allowed path(s) Solution: You should check the Uploading Files path settings in your wordpress admin. – Go to Settings -> Media – Under ‘Uploading Files‘, see the path for ‘Store uploads in this folder‘ – … Read more

WordPress Contact Form 7: Quick Fix to spinning arrow displays forever & no success/error message displayed

Scenario / Problem I am using Contact Form 7 plugin on my WordPress blog. The form is displayed properly. But, when I submit the form, the spinning arrow is displayed forever and no success or error message is displayed. However, the form is working. It is submitted and I get the message in my inbox. … Read more

Javascript: How to Submit form and Change form action?

This article will show you how to submit form and change form action using javascript. This is a very simple trick but it’s very useful and frequently used. Submit Form using Javascript HTML form <form name="myForm" action="http://google.com" method="get"> Search: <input type="text" name="q" /> <button onclick="javascript: submitForm()">Search</button> </form> Javascript function function submitForm() { document.myForm.submit(); } Change … Read more

Magento: Show/Hide Demo Store Notice

A demo store is where there are products but the order done by customer is not processed. If your website is in development mode then it is better to enable demo store notice. Enabling demo store notice in Magento is very simple. You just need to select an option in configuration settings in admin panel. … Read more

Magento: Show/Hide website to search engines by adjusting robots meta tag

The Robots META Tag is meant to provide users who cannot upload or control the /robots.txt file at their websites, with a last chance to keep their content out of search engine indexes and services. <meta name="robots" content="robots-terms"> The content=”robots-terms” is a comma separated list used in the Robots META Tag that may contain one … Read more

Magento: How to get actual price and special price of a product?

Here is a quick and useful code on getting actual price and special price of any product in Magento. The actual price is the real price assigned to the product and special price is the price after any discount is applied to the product. Loading Product $_productId = 52; $_product = Mage::getModel('catalog/product')->load($_productId); Get Actual Price … Read more