search
top

Stock configuration using Magento API

In one of my post I explained the basics of SOAP API, please refer Magento SOAP API before proceeding further I am listing here the methods to update Product’s stock related information...
read more

MySQLi with PHP

Below is the simple PHP script to connect database using mysqli <?php $link = mysqli_connect("127.0.0.1", "username", "password", "database_name"); if...
read more

File Upload in PHP

Hello All, I had to make a custom form for file uploading in PHP, I am explaining here the way to upload a file. <?php //error_reporting(E_ALL); if(isset($_FILES) && !empty($_FILES['docname'])) { ...
read more

Get payment method of quote in Magento

Hello All, Please check the below script that will help you find the payment method information set in Magento quote $quote = Mage::getModel("sales/quote")->loadByIdWithoutStore($quoteId);...
read more

Coupon code generation using Magento

Hello All, I am writing here a script that will help you generate random coupon codes using Magento’s existing modules $format = Mage_SalesRule_Helper_Coupon::COUPON_FORMAT_ALPHANUMERIC; $charset...
read more

Get child product in Magento

Hello All, I am writing here a script for getting all the child products of the required parent product id <?php $productId = '123'; $product = Mage::getModel('catalog/product')->load($productId);...
read more

MS SQL with PHP

Below is the simple PHP (>= 7.0.0) script to connect with the MS SQL database <?php try { $hostname = ""; //host name $port = 1433; //port number $dbname = "";...
read more

MS SQL with Magento

Here is a way to connect mssql database using Magento’s inbuilt models. <?php include_once 'app/Mage.php'; Mage::app(); $host = '';//in the format 127.0.0.1:1433 , 1433 is the...
read more

« Previous Entries

top