Realtime Charts / Graphs

CanvasJS  provides a very developer friendly chat or graph library. The library is based on HTML 5 and JS. And can also be used for displaying realtime charts or graphs also. There are various types of charts/graphs available. Below are some useful codes Frontend code: <?php $conn = mysql_connect(“localhost”,”xxxxxxxxx”,”xxxxxxxxx”); if(!$conn) {     echo “Error: failed… Continue reading Realtime Charts / Graphs

Published
Categorised as PHP

Woocommerce Change “Read More” Button

This code is useful for removing the “Read More” button (in woocommerce) for items that are out of stock. /* * replace read more buttons for out of stock items **/ if (!function_exists(‘woocommerce_template_loop_add_to_cart’)) { function woocommerce_template_loop_add_to_cart() { global $product; if (!$product->is_in_stock()) { echo ‘<a href=”‘.get_permalink().'” rel=”nofollow” class=”outstock_button”>Sold Out</a>’; } else { woocommerce_get_template(‘loop/add-to-cart.php’); } } }

Prestahop Installation error 500

Problem: Trying to install a new prestashop but getting error 500, the installation doesn’t even start Solution: Check file and folder permissions. Folder permission should be 755 and file should be 644.   Commands for changing file / folder permissions in linux through (ssh) console: This is for changing folder permissions find /public_html/prestashop -type d… Continue reading Prestahop Installation error 500

Published
Categorised as PHP

Upload Files through AJAX (using Jquery and PHP)

This post demonstrates how to upload files to the server through AJAX. For the javascript  part JQuery has been used. Besides the file upload thing there are few other useful codes here: A generalised mail function. The function is capable of sending mails with attachments also. Ajax call using JQuery. Some server side validation codes.… Continue reading Upload Files through AJAX (using Jquery and PHP)

Published
Categorised as jQuery, PHP