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