Magneto Module Explore for Android App 1
ERP-in-Cloud: Order, Inventory & Catalog management
Product Locator
Full catalog translate
CloudGento API Extension
Mobile PoS, Inventory, Barcode Scanning, Photos and more on Android
Infobip StoreSMS
Developer Manual
ShopDash – Super Slick Shopping App for the iPhone, iPad and Android
Appy Pie Mobile App Connect
MAGE SMS – SMS notification & SMS marketing


Install XAMPP 1.8.3, Composer, Laravel, and/or Yii2 Notes

SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)


Support for non standard port or unix socket will be available in next release.

Meanwhile you can replace these 2 files:
Mysql.php: lib/Varien/Db/Adapter/Pdo/Mysql.php
Mysqli.php: lib/Varien/Db/Adapter/Mysqli.php

Specify non-standard port like this:


For unix socket use only the path in DB host field during install:


You can also try changing the driver Magento will access mysql in app/etc/config.xml:


There are driver types under <core_setup> (used during install/upgrade) and <core_write> (used during normal operation). Possible values are mysqli and pdo_mysql


File Attachments
Mysql.php  (File Size: 5KB – Downloads: 907)
Mysqli.php  (File Size: 5KB – Downloads: 569)

Magento – Configurable products not visible until manually saved in admin panel

Solved this by going through the saveAction in the ProductController.

I wasnt setting the websiteIds correctly so the new products were never getting added to the site correctly.

Magento uses this method to get the currect website:



protected function checkFile(){
// echo ‘ check file ‘.$this->file_name;
$media_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
$store_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
$file_path = $media_url.’csv/’.$this->file_name.’.csv’;
// $file_path = $media_url.’csv/’.$this->file_name.’.txt’;
// $file_path = ‘/media/csv/’.$this->file_name.’.txt’;
// echo ‘ check file ‘.$file_path.’ ‘.$store_url;
// $this->resave();

protected function fileFunc($file,$lib){
if($handle = fopen($file, “r”)){
$count=0; $mediaAttribute = array(‘thumbnail’,’small_image’,’image’);
$imgUrl = ‘media/catalog/product/’;
// $imgUrl = ‘media/csv/img/’;
while (($data = fgetcsv($handle)) !== FALSE)
// print_r($data); echo ‘<br />’;
// $cat = Mage::getResourceModel(‘catalog/category_collection’)->addFieldToFilter(‘name’, $data[0]);
// $catId = $cat->getFirstItem()->getEntityId();
// echo $catId.'<hr><br />’;
// echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).’csv/i/’.$data[17].'<br /><hr><br />’;
// print_r($data);echo ‘<hr><br />’;
// /*
if($count > 1)
$cat = Mage::getResourceModel(‘catalog/category_collection’)->addFieldToFilter(‘name’, $data[0]);
$catId = $cat->getFirstItem()->getEntityId();

$product = Mage::getModel(‘catalog/product’);

$store_id = Mage::app()->getStore()->getStoreId();
$store_website_id = Mage::app()->getStore()->getWebsiteId();
// ->setWebsiteId($store_website_id)
// ->setWebsiteIds(array(1))
// ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)
// ->addImageToMediaGallery(‘media/catalog/product/demo.jpg’, array(‘image’,’thumbnail’,’small_image’), false, false)
// ->addImageToMediaGallery($imgUrl.’demo.jpg’, array(‘image’,’thumbnail’,’small_image’), false, false)
->addImageToMediaGallery($imgUrl.$data[15], array(‘image’,’thumbnail’,’small_image’), false, false)
// ->addImageToMediaGallery($data[15], array(‘image’,’thumbnail’,’small_image’), false, false) //assigning image, thumb and small image to media gallery
// ->addImageToMediaGallery( $imgUrl , $mediaAttribute, false, false )
‘use_config_manage_stock’ => 0, //’Use config settings’ checkbox
‘manage_stock’=>$data[16], //manage stock
‘min_sale_qty’=>$data[17], //Minimum Qty Allowed in Shopping Cart
‘max_sale_qty’=>$data[18], //Maximum Qty Allowed in Shopping Cart
‘is_in_stock’ => $data[19], //Stock Availability
‘qty’ => $data[20] //qty
if(!is_null($data[22])){$product->addImageToMediaGallery( $imgUrl.$data[22] , null, false, false );}
if(!is_null($data[23])){$product->addImageToMediaGallery( $imgUrl.$data[23], null, false, false );}
if(!is_null($data[24])){$product->addImageToMediaGallery( $imgUrl.$data[24] , null, false, false );}

echo ‘save success’.'<hr><br />’;

}catch(Exception $e){
echo ‘while saving product ‘.$this->errorFunc();
}//if statement ends here

// */

}// end of while loop
echo ‘<br />not yet<br />’;

Magento deleting product BIGINT UNSIGNED value is out of range

Several of our clients get an unusual recurring error in their Magento stores looking like:

SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in '(`magento_store`.`q`.`items_count` - 1)'

Option 1

DELETE FROM magento_sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 30 DAY);

Option 2

DELETE FROM magento_sales_flat_quote WHERE customer_is_guest = 0;

Option 3

#truncate magento_enterprise_customer_sales_flat_quote;
#truncate magento_enterprise_customer_sales_flat_quote_address;
truncate magento_sales_flat_quote;
truncate magento_sales_flat_quote_item;
truncate magento_sales_flat_quote_address;
truncate magento_sales_flat_quote_shipping_rate;

Magento Developer Knowledge Links

Magento for Developers

Magento API

Magento Documentation (phpdoc) Varien Lib Documentation