Open the location given below
note: path can differ according to templete
app\design\frontend\base\default\template\checkout\cart\item\default.phtml
use the Code below in default.phtml.
<?php
$product = Mage::getModel(‘catalog/product’)->load($this->getProduct()->getId());
$attributes = $product->getAttributes();
foreach ($attributes as $attribute) {
if ($attribute->getIsVisibleOnFront() && $attribute->getIsUserDefined()) {
$value = $attribute->getFrontend()->getValue($product);
if (strlen($value) && $product->hasData($attribute->getAttributeCode())) {
$data[$attribute->getAttributeCode()] = array(
‘label’ => $attribute->getFrontend()->getLabel(),
‘value’ => $value //$product->getData($attribute->getAttributeCode())
);
?>
<span style=”font-weight:bold;”><?php echo $data[$attribute->getAttributeCode()]['label']; ?></span>: <span><?php echo $data[$attribute->getAttributeCode()]['value']; ?></span>
<?php
}
}
}
?>
If you are searching for the professional web development, app development company in Vadodara then Cloudswift Solutions is the name on which you can trust. Visit our website for more information.
Tuesday, 20 November 2012
Magento Image Switcher On MouseOver
Step1. open file on location given below
app/design/frontend/default/default/template/catalog/product/view/media.phtml
Step2. Search the code in media.phtml file
<a onclick="popWin('<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;" href="#"> <!--nested img tag stays the same--></a>
Step 3. Replace searched code with code below.
<a title="<?php echo $_product->getName();?>" onmouseover="$('image').src = this.href; return false;" href="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile()); ?>"> <img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" width="56" height="56" /></a>
app/design/frontend/default/default/template/catalog/product/view/media.phtml
Step2. Search the code in media.phtml file
<a onclick="popWin('<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;" href="#"> <!--nested img tag stays the same--></a>
Step 3. Replace searched code with code below.
<a title="<?php echo $_product->getName();?>" onmouseover="$('image').src = this.href; return false;" href="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile()); ?>"> <img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" width="56" height="56" /></a>
Monday, 19 November 2012
Sunday, 11 November 2012
Friday, 9 November 2012
Thursday, 8 November 2012
magento cash on devliary extension
http://www.magentocommerce.com/magento-connect/cashondelivery.html
Tuesday, 6 November 2012
Sending email from local system in magneto OR Sending email from magento in local system
1) make sure you did setting in php.ini
i'e
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = mail.yourdomine.com
; http://php.net/smtp-port
smtp_port = 25
and in magento go to admin
System->Configuration->System->Mail Sending Setting->host
replace host from localhost to mail.yourdomine.com
i'e
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = mail.yourdomine.com
; http://php.net/smtp-port
smtp_port = 25
and in magento go to admin
System->Configuration->System->Mail Sending Setting->host
replace host from localhost to mail.yourdomine.com
Magento - How to get all Product details in magento Programmatically?
<?php
require_once 'app/Mage.php';
umask(0);
Mage::app('default');
function empty_pk($data){
if($data!=''){return $data;}
else {return " ";}
}
$collection = Mage::getModel('catalog/product')->getCollection();
echo '<table border="1"> ';
echo '<tr>';
echo "<th>sku<th />";
echo "<th>name<th />";
echo "<th>qty<th />";
echo "<th>is_in_stock<th />";
echo "<th>price<th />";
echo '</tr>';
foreach ($collection as $product_all) {
//echo '<pre>';print_r($product);echo '</pre>';
$sku = $product_all['sku'];
// retrieve product id using sku
$product_id = Mage::getModel('catalog/product')->getIdBySku($sku);
// call product model and create product object
$product = Mage::getModel('catalog/product');
// Load product using product id
$product ->load($product_id);
$pk_sku = empty_pk($product['sku']);
$pk_name = empty_pk($product['name']);
$stockData = $product->getStockData();
$pk_qty = empty_pk($stockData['qty']);
$pk_in_stock = empty_pk($stockData['is_in_stock']);
$pk_price = empty_pk($product['price']);
echo '<tr>';
echo "<td>".$pk_sku."<td />";
echo "<td>".$pk_name."<td />";
echo "<td>".$pk_qty."<td />";
echo "<td>".$pk_in_stock."<td />";
echo "<td>".$pk_price."<td />";
echo '</tr>';
}
echo '</table>';
?>
require_once 'app/Mage.php';
umask(0);
Mage::app('default');
function empty_pk($data){
if($data!=''){return $data;}
else {return " ";}
}
$collection = Mage::getModel('catalog/product')->getCollection();
echo '<table border="1"> ';
echo '<tr>';
echo "<th>sku<th />";
echo "<th>name<th />";
echo "<th>qty<th />";
echo "<th>is_in_stock<th />";
echo "<th>price<th />";
echo '</tr>';
foreach ($collection as $product_all) {
//echo '<pre>';print_r($product);echo '</pre>';
$sku = $product_all['sku'];
// retrieve product id using sku
$product_id = Mage::getModel('catalog/product')->getIdBySku($sku);
// call product model and create product object
$product = Mage::getModel('catalog/product');
// Load product using product id
$product ->load($product_id);
$pk_sku = empty_pk($product['sku']);
$pk_name = empty_pk($product['name']);
$stockData = $product->getStockData();
$pk_qty = empty_pk($stockData['qty']);
$pk_in_stock = empty_pk($stockData['is_in_stock']);
$pk_price = empty_pk($product['price']);
echo '<tr>';
echo "<td>".$pk_sku."<td />";
echo "<td>".$pk_name."<td />";
echo "<td>".$pk_qty."<td />";
echo "<td>".$pk_in_stock."<td />";
echo "<td>".$pk_price."<td />";
echo '</tr>';
}
echo '</table>';
?>
Magento - How to get all Magento Database hosting details?
<?php
require_once 'app/Mage.php';
umask(0);
Mage::app('default');
$resource = Mage::getConfig()->getNode('global/resources')->asArray();
echo '<pre>';
print_r($resource);
echo '</pre>';
$db_host = $resource['default_setup']['connection']['host'];
$db_user = $resource['default_setup']['connection']['username'];
$db_pass = $resource['default_setup']['connection']['password'];
$db_name = $resource['default_setup']['connection']['dbname'];
echo '<br />host : '.$db_host;
echo '<br />username : '.$db_user;
echo '<br />password : '.$db_pass;
echo '<br />dbname : '.$db_name;
?>
require_once 'app/Mage.php';
umask(0);
Mage::app('default');
$resource = Mage::getConfig()->getNode('global/resources')->asArray();
echo '<pre>';
print_r($resource);
echo '</pre>';
$db_host = $resource['default_setup']['connection']['host'];
$db_user = $resource['default_setup']['connection']['username'];
$db_pass = $resource['default_setup']['connection']['password'];
$db_name = $resource['default_setup']['connection']['dbname'];
echo '<br />host : '.$db_host;
echo '<br />username : '.$db_user;
echo '<br />password : '.$db_pass;
echo '<br />dbname : '.$db_name;
?>
Subscribe to:
Posts (Atom)