Category Archive for "PHP"

How to hide product attributes with no value in Magento

As a working consultant on Magento Project I come across that different product type to have different product attributes. This means that every product will have more than 20 options and sometimes all option don’t apply to certain products. For instance a projector and laptop have different kind of product attributes like “Front Camera” in laptop is necessary to show as an product attribute, but into project it should not. Because the store uses the same attribute sets for each…

Read More

How to validate ‘target=_blank’ in anchor tag with W3C Compatibility

While the apply ‘_blank’ value to a native link’s attribute ‘target’ that will give you not validated for W3C, the solution is to handle the click on the link and open it in a new window. Please note this alternative methods are absolutely SEO friendly and W3C valid. The code for the solution is: <script type=”text/javascript”> $(document).ready(function(){ $(‘A[rel=”_blank”]’).click(function(){ window.open($(this).attr(‘href’)); return false; }); }); </script> <a href=”http://www.shashidharkumar.com/shashidharkumar/index.html” rev=”solution-02″ rel=”_blank”>Shashidhar Kumar</a> Shashi Dhar KumarShashi Dhar Kumar Experience in Web/software development including client…

Read More

Simple email script in php

This chapter explains how to send email in php. We will upload advanced mailing script in php soon. Download the script : Simple email script in PHP Shashi Dhar KumarShashi Dhar Kumar Experience in Web/software development including client server and implementation using PHP, XML, MySQL and SQL Server. Experience of working on Apache, Linux projects, Javascript, Ajax, Putty, FTP, Remote Connection, XML parsing, Mod-Rewriting, Payment Gateways and shipping modules, Trouble shooting and Manual Testing. https://www.shashidharkumar.in

Read More

Convert xml to html

This chapter explains how to display XML data as HTML. In the example below, we loop through an XML file (test.xml), and display each element as an HTML table row: <script type=”text/javascript”> var xmlDoc; if (window.XMLHttpRequest) { xmlDoc=new window.XMLHttpRequest(); xmlDoc.open(“GET”,”test.xml”,false); xmlDoc.send(“”); xmlDoc=xmlDoc.responseXML; } // IE 5 and IE 6 else if (ActiveXObject(“Microsoft.XMLDOM”)) { xmlDoc=new ActiveXObject(“Microsoft.XMLDOM”); xmlDoc.async=false; xmlDoc.load(“test.xml”); } document.write(“<table>”); var x=xmlDoc.getElementsByTagName(“TEST”); for (i=0;i<x.length;i++) { document.write(“<tr><td><b>”); document.write(x[i].getElementsByTagName(“SNIPPET”)[0].childNodes[0].nodeValue); document.write(“</b></td></tr><tr><td>”); document.write(x[i].getElementsByTagName(“NAME”)[0].childNodes[0].nodeValue); document.write(“</td></tr><tr><td>”); document.write(x[i].getElementsByTagName(“EMAIL”)[0].childNodes[0].nodeValue); document.write(“</td></tr><tr><td>”); document.write(x[i].getElementsByTagName(“WEBSITE”)[0].childNodes[0].nodeValue); document.write(“</td></tr><tr><td>”); document.write(x[i].getElementsByTagName(“LICENSE”)[0].childNodes[0].nodeValue); document.write(“</td></tr>”); } document.write(“</table>”); </script> * We…

Read More

File upload script-PHP

Here I am giving a full source code of File Upload at run time. You can upload single file. You can do it just some customize there and put it at your server folder. Download Script Shashi Dhar KumarShashi Dhar Kumar Experience in Web/software development including client server and implementation using PHP, XML, MySQL and SQL Server. Experience of working on Apache, Linux projects, Javascript, Ajax, Putty, FTP, Remote Connection, XML parsing, Mod-Rewriting, Payment Gateways and shipping modules, Trouble shooting…

Read More

Multiple File Uploader Script – PHP

Here I am giving a full source code of Multiple Upload at run time. You can upload single file if you wish and if you want to upload multiple file than you can do it just some customize there and put it at you server folder. Download Script Shashi Dhar KumarShashi Dhar Kumar Experience in Web/software development including client server and implementation using PHP, XML, MySQL and SQL Server. Experience of working on Apache, Linux projects, Javascript, Ajax, Putty, FTP,…

Read More