Search This Blog

Saturday, November 12, 2011

magento

download magento, ecommerce magento, featured products magento, install magento, magento, magento alternative, magento blog, magento cms, magento community edition, magento community features, magento connect, magento customization, magento demo, magento design, magento designer, magento developers, magento download, magento ecommerce, magento expert, magento extension, magento feature, magento feature list, magento featured, magento featured product, magento featured products, magento featured products extension, magento go, magento help, magento install, magento mobile, magento module, magento modules, magento plugins, magento seo, magento shops, magento software, magento specialist, magento ssl, magento store, magento support, magento template, magento templates free, magento theme, magento themes, magento user guide, magento website, magentocommerce, premium magento themes, seo magento, templates magento

Sunday, November 6, 2011

Create new module “HelloWorld” – in Magento

http://magento4u.wordpress.com/2009/06/08/create-new-module-helloworld-in-magento/

Friday, October 28, 2011

Free one click cart checkout community edition

Free one click cart checkout community edition

Magento 2.0
http://connect20.magentocommerce.com/community/GoldenSpiralStudio_OneClickCartCheckout
Magento 1.0
magento-community/GoldenSpiralStudio_OneClickCartCheckout

refrence
http://www.magentocommerce.com/magento-connect/GoldenSpiralStd/extension/6971/goldenspiralstudio_oneclickcartcheckout

Tuesday, October 18, 2011

magento create customer custom attribute throuogh sql or code

$installer = $this;

$installer->startSetup();

$connection = $installer->getConnection();

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');

$installer->removeAttribute('customer', 'name_goes_here');

$setup->addAttribute('customer', 'name_goes_here', array(
'input' => 'text',
'type' => 'varchar',
'label' => 'name_goes_here',
'backend' => '',
'visible' => 1,
'required' => 0,
'user_defined' => 1,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));
$installer->endSetup();

$installer->installEntities();

use this in mysql4-upgrade-0.1.0-0.1.1.php or any latest sql folder script

Tuesday, September 20, 2011

How to Remove Product from cart on checkout page or by coding in magento

$session= Mage::getSingleton('checkout/session');
$quote = $session->getQuote();

$cart = Mage::getModel('checkout/cart');
$cartItems = $cart->getItems();
foreach ($cartItems as $item)
{
$quote->removeItem($item->getId())->save();
}

Wednesday, August 24, 2011

Magento display gift message in front end

$message = Mage::getModel('giftmessage/message');

/* Add Gift Message*/
$gift_message_id = $order->getOrder()->getGiftMessageId();
if(!is_null($gift_message_id)) {
$message->load((int)$gift_message_id);
$gift_sender = $message->getData('sender');
$gift_recipient = $message->getData('recipient');
echo $gift_message = $message->getData('message');
}
http://www.magentocommerce.com/boards/viewthread/11346/

Friday, August 12, 2011

best php export to csv without space or comma

$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
// DB Connection here
$db = mysql_select_db("test",$con);

$result = mysql_query("SELECT * FROM test1");
csvToExcelDownloadFromResult($result);
function csvToExcelDownloadFromResult($result, $showColumnHeaders = true, $asFilename = 'data.csv') {
setExcelContentType();
setDownloadAsHeader($asFilename);
return csvFileFromResult('php://output', $result, $showColumnHeaders);
}

function csvFileFromResult($filename, $result, $showColumnHeaders = true) {
$fp = fopen($filename, 'w');
$rc = csvFromResult($fp, $result, $showColumnHeaders);
fclose($fp);
return $rc;
}
function setExcelContentType() {
if(headers_sent())
return false;

header('Content-type: application/vnd.ms-excel');
return true;
}

function setDownloadAsHeader($filename) {
if(headers_sent())
return false;

header('Content-disposition: attachment; filename=' . $filename);
return true;
}
function csvFromResult($stream, $result, $showColumnHeaders = true) {
if($showColumnHeaders) {
$columnHeaders = array();
$nfields = mysql_num_fields($result);
for($i = 0; $i < $nfields; $i++) { $field = mysql_fetch_field($result, $i); $columnHeaders[] = $field->name;
}
fputcsv($stream, $columnHeaders);
}

$nrows = 0;
while($row = mysql_fetch_row($result)) {
fputcsv($stream, $row);
$nrows++;
}

return $nrows;
}