//value or label which you select in back end
echo $_product->getResource()->getAttribute('size')->getFrontend()->getValue($_product);
//label of the attribute
echo $_product->getResource()->getAttribute('size')->getFrontend()->getLabel();
// value or option Id
echo $_product->getSize()
Tuesday, September 13, 2011
Getting or Displaying Attributes value and label of product in magento programmatically
Sunday, September 4, 2011
Sending email from local system in magneto OR Sending email from magento in local system
Hi
we can enable sending email from local system if you working magento in local system
we can send or enable 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
we can enable sending email from local system if you working magento in local system
we can send or enable 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
Tuesday, January 25, 2011
How to remove A,H2 tag color border in google chrome browser
If your getting a border for A,H2 etc.. tag use this one line css code
outline: none;
outline: none;
Friday, December 17, 2010
Prob in IE and chrome of div is displaying behind flash image on mouse hover
In some case if you mouse over in menu and it will display or show sub menu some time that sub menu will display behind flash image so add below code(<param name="wmode" value="transparent">) in side object tag
<object style="vertical-align: bottom;z-index:-999;" width="689" height="324" data="">getSkinUrl('');?>images/homePage/banner2.swf" type="application/x-shockwave-flash">
<param name="wmode" value="transparent"><embed src=""></embed>getSkinUrl('');?>images/homePage/banner2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="689" height="324" wmode="transparent">
</object>
Tuesday, November 16, 2010
nu soap with joomla
Place this code in one file modify as per your requirement and add nu soap library
i palace this file inside one folder called sopa inside root folder of joomla project and also i use model from component in this i placed my model in side com-community folder and i call one model and in this example i added multiple in put , compex type out put with array variable, and u can see out put in soap UI
require_once("nusoap/nusoap.php"); //nusopa.php download from net and include it
$ns = "http://soaptest/";
if(!defined('_JEXEC'))
define( '_JEXEC', 1 );
set_time_limit(0);
ini_set('include_path', '../');
if(!defined('JPATH_BASE'))
define('JPATH_BASE', ini_get('include_path') );
if(!defined('DS'))
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
//require_once ( JPATH_BASE .DS.'libraries'.DS.'joomla'.DS.'database'.DS.'table'.DS.'table.php' );
if(!isset($mainframe))
$mainframe =& JFactory::getApplication('site');
//jimport( 'joomla.plugin.plugin' );
//jimport('joomla.filesystem.file');
require_once( JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'plugin' . DS . 'helper.php');
require_once( JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');
require_once("convertingArrayinput.php");
function GetEventInfo(&$EventId,&$Version) {
jimport( 'joomla.application.component.model' );
JModel::addIncludePath(JPATH_ROOT.DS.'components'.DS.'com_community'.DS.'models');
$profilemodel =& JModel::getInstance('webprofile', 'CommunityModel');
//$user =& JFactory::getUser($userid);
//$VersionReq=$user->Version;
//$role=$user->Role;
if($EventId) {
$result = array();
$teams= array();
$clubdata=$profilemodel->getEventInfo($EventId,$Version);
$teamdata=$profilemodel->getEventTeams($EventId);
//print_r($clubdata);
foreach($teamdata as $team) {
$teams[]=array('TeamId'=>$team->TeamId,'TeamName'=>$team->TeamName);
}
foreach($clubdata as $row) {
$result1= array('UserData'=>array('UserId'=>$row->UserId,'Role'=>$row->Role),
'EventData'=>array('EventDetails'=>array('EventId'=>$row->EventId,'EventName'=>$row->EventName,'EventLocation'=>$row->FacilityName,'EventLogo'=>$row->EventLogoPath,'EventDate'=>$row->Event),
'Facility'=>array('Longtitude'=>$row->FacilityLongtitude,'Latitude'=>$row->FacliltyLatitude),
'Schedule'=>$row->ScheduleLink,'Rules'=>$row->RulesLink,'WeatherLine'=>$row->WeatherLine,
'Teams'=>$teams));
}
$res = array('Response' => array('Code' => '100','Msg'=>'Successful'),
'ResponseData'=>$result1);
return $res;
} else {
$res = array('Response' => array('Code' => '-100','Msg'=>'In Valid Event Id'),
'ResponseData'=> array());
}
}
function checkDate1($date1){
return preg_match('`^(19|20)\d\d([- /.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])$`', $date1) ? TRUE : FALSE;
}
$server = new soap_server();
$server->configureWSDL('GetEventInfo', $ns);
$server->wsdl->schemaTargetNamespace = $ns;
$server->debug_flag = true;
$server->wsdl->addComplexType(
'ResponseInfo',
'complexType',
'struct',
'all',
'',
array(
'Response' => array('name' => 'Response', 'type' => 'tns:Response'),
'ResponseData' => array('name' => 'ResponseData', 'type' => 'tns:ResponseData'),
)
);
$server->wsdl->addComplexType(
'Response',
'complexType',
'struct',
'all',
'',
array(
'Code' => array('name' => 'Code', 'type' => 'xsd:int'),
'Msg' => array('name' => 'Msg', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'TeamsArray',
'complexType',
'array',
'',
'SOAP-ENC:Array',
array(),
array(
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Team[]')
),
'tns:Team'
);
$server->wsdl->addComplexType(
'Team',
'element',
'struct',
'all',
'',
array(
'TeamId' => array('name' => 'TeamId', 'type' => 'xsd:int'),
'TeamName' => array('name' => 'TeamName', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'UserData',
'complexType',
'struct',
'all',
'',
array(
'UserId' => array('name' => 'UserId', 'type' => 'xsd:int'),
'Role' => array('name' => 'Role', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'EventDetails',
'complexType',
'struct',
'all',
'',
array(
'EventId' => array('name' => 'EventId', 'type' => 'xsd:int'),
'EventName' => array('name' => 'EventName', 'type' => 'xsd:string'),
'EventLocation' => array('name' => 'EventLocation', 'type' => 'xsd:string'),
'EventLogoPath' => array('name' => 'EventLogoPath', 'type' => 'xsd:string'),
'EventDate' => array('name' => 'EventDate', 'type' => 'xsd:date')
)
);
$server->wsdl->addComplexType(
'Facility',
'complexType',
'struct',
'all',
'',
array(
'Longtitude' => array('name' => 'Longtitude', 'type' => 'xsd:string'),
'Latitude' => array('name' => 'Latitude', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'EventData',
'complexType',
'struct',
'all',
'',
array(
'EventDetails' => array('name' => 'EventDetails', 'type' => 'tns:EventDetails'),
'Facility' => array('name' => 'Facility', 'type' => 'tns:Facility'),
'Schedule' => array('name' => 'Schedule', 'type' => 'xsd:string'),
'Rules' => array('name' => 'Rules', 'type' => 'xsd:string'),
'WeatherLine' => array('name' => 'WeatherLine', 'type' => 'xsd:string'),
'Teams' => array('name' => 'Teams', 'type' => 'tns:TeamsArray')
)
);
$server->wsdl->addComplexType(
'ResponseData',
'complexType',
'struct',
'all',
'',
array(
'UserData' => array('name' => 'UserData', 'type' => 'tns:UserData'),
'EventData' => array('name' => 'EventData', 'type' => 'tns:EventData')
)
);
$inparams = array('EventId' => 'xsd:int', 'Version' => 'xsd:string');
//$outparams = array('msg' => 'xsd:string','name' => 'xsd:string','role'=> 'xsd:int','email'=> 'xsd:string','lastName'=> 'xsd:string','temp'=>'xsd:array');
//$outparams = array('name'=> 'xsd:string', 'emailArray' => 'tns:ContactArray');
$outparams = $outparams = array('ResponseInfo' => 'tns:ResponseInfo');
//$outparams = $outparams = array('ResponseInfo' => 'xsd:string');
//$outparams = array('ProfileInfo'=> 'tns:Book');
$server->register('GetEventInfo', $inparams, $outparams, $ns, false);
if (!isset($HTTP_RAW_POST_DATA))
$HTTP_RAW_POST_DATA = file_get_contents("php://input");
$server->service($HTTP_RAW_POST_DATA);
file_put_contents("sqlwsdl.log", $HTTP_RAW_POST_DATA."\r\n".$server->getDebug());
?>
i palace this file inside one folder called sopa inside root folder of joomla project and also i use model from component in this i placed my model in side com-community folder and i call one model and in this example i added multiple in put , compex type out put with array variable, and u can see out put in soap UI
require_once("nusoap/nusoap.php"); //nusopa.php download from net and include it
$ns = "http://soaptest/";
if(!defined('_JEXEC'))
define( '_JEXEC', 1 );
set_time_limit(0);
ini_set('include_path', '../');
if(!defined('JPATH_BASE'))
define('JPATH_BASE', ini_get('include_path') );
if(!defined('DS'))
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
//require_once ( JPATH_BASE .DS.'libraries'.DS.'joomla'.DS.'database'.DS.'table'.DS.'table.php' );
if(!isset($mainframe))
$mainframe =& JFactory::getApplication('site');
//jimport( 'joomla.plugin.plugin' );
//jimport('joomla.filesystem.file');
require_once( JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'plugin' . DS . 'helper.php');
require_once( JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');
require_once("convertingArrayinput.php");
function GetEventInfo(&$EventId,&$Version) {
jimport( 'joomla.application.component.model' );
JModel::addIncludePath(JPATH_ROOT.DS.'components'.DS.'com_community'.DS.'models');
$profilemodel =& JModel::getInstance('webprofile', 'CommunityModel');
//$user =& JFactory::getUser($userid);
//$VersionReq=$user->Version;
//$role=$user->Role;
if($EventId) {
$result = array();
$teams= array();
$clubdata=$profilemodel->getEventInfo($EventId,$Version);
$teamdata=$profilemodel->getEventTeams($EventId);
//print_r($clubdata);
foreach($teamdata as $team) {
$teams[]=array('TeamId'=>$team->TeamId,'TeamName'=>$team->TeamName);
}
foreach($clubdata as $row) {
$result1= array('UserData'=>array('UserId'=>$row->UserId,'Role'=>$row->Role),
'EventData'=>array('EventDetails'=>array('EventId'=>$row->EventId,'EventName'=>$row->EventName,'EventLocation'=>$row->FacilityName,'EventLogo'=>$row->EventLogoPath,'EventDate'=>$row->Event),
'Facility'=>array('Longtitude'=>$row->FacilityLongtitude,'Latitude'=>$row->FacliltyLatitude),
'Schedule'=>$row->ScheduleLink,'Rules'=>$row->RulesLink,'WeatherLine'=>$row->WeatherLine,
'Teams'=>$teams));
}
$res = array('Response' => array('Code' => '100','Msg'=>'Successful'),
'ResponseData'=>$result1);
return $res;
} else {
$res = array('Response' => array('Code' => '-100','Msg'=>'In Valid Event Id'),
'ResponseData'=> array());
}
}
function checkDate1($date1){
return preg_match('`^(19|20)\d\d([- /.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])$`', $date1) ? TRUE : FALSE;
}
$server = new soap_server();
$server->configureWSDL('GetEventInfo', $ns);
$server->wsdl->schemaTargetNamespace = $ns;
$server->debug_flag = true;
$server->wsdl->addComplexType(
'ResponseInfo',
'complexType',
'struct',
'all',
'',
array(
'Response' => array('name' => 'Response', 'type' => 'tns:Response'),
'ResponseData' => array('name' => 'ResponseData', 'type' => 'tns:ResponseData'),
)
);
$server->wsdl->addComplexType(
'Response',
'complexType',
'struct',
'all',
'',
array(
'Code' => array('name' => 'Code', 'type' => 'xsd:int'),
'Msg' => array('name' => 'Msg', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'TeamsArray',
'complexType',
'array',
'',
'SOAP-ENC:Array',
array(),
array(
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Team[]')
),
'tns:Team'
);
$server->wsdl->addComplexType(
'Team',
'element',
'struct',
'all',
'',
array(
'TeamId' => array('name' => 'TeamId', 'type' => 'xsd:int'),
'TeamName' => array('name' => 'TeamName', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'UserData',
'complexType',
'struct',
'all',
'',
array(
'UserId' => array('name' => 'UserId', 'type' => 'xsd:int'),
'Role' => array('name' => 'Role', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'EventDetails',
'complexType',
'struct',
'all',
'',
array(
'EventId' => array('name' => 'EventId', 'type' => 'xsd:int'),
'EventName' => array('name' => 'EventName', 'type' => 'xsd:string'),
'EventLocation' => array('name' => 'EventLocation', 'type' => 'xsd:string'),
'EventLogoPath' => array('name' => 'EventLogoPath', 'type' => 'xsd:string'),
'EventDate' => array('name' => 'EventDate', 'type' => 'xsd:date')
)
);
$server->wsdl->addComplexType(
'Facility',
'complexType',
'struct',
'all',
'',
array(
'Longtitude' => array('name' => 'Longtitude', 'type' => 'xsd:string'),
'Latitude' => array('name' => 'Latitude', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'EventData',
'complexType',
'struct',
'all',
'',
array(
'EventDetails' => array('name' => 'EventDetails', 'type' => 'tns:EventDetails'),
'Facility' => array('name' => 'Facility', 'type' => 'tns:Facility'),
'Schedule' => array('name' => 'Schedule', 'type' => 'xsd:string'),
'Rules' => array('name' => 'Rules', 'type' => 'xsd:string'),
'WeatherLine' => array('name' => 'WeatherLine', 'type' => 'xsd:string'),
'Teams' => array('name' => 'Teams', 'type' => 'tns:TeamsArray')
)
);
$server->wsdl->addComplexType(
'ResponseData',
'complexType',
'struct',
'all',
'',
array(
'UserData' => array('name' => 'UserData', 'type' => 'tns:UserData'),
'EventData' => array('name' => 'EventData', 'type' => 'tns:EventData')
)
);
$inparams = array('EventId' => 'xsd:int', 'Version' => 'xsd:string');
//$outparams = array('msg' => 'xsd:string','name' => 'xsd:string','role'=> 'xsd:int','email'=> 'xsd:string','lastName'=> 'xsd:string','temp'=>'xsd:array');
//$outparams = array('name'=> 'xsd:string', 'emailArray' => 'tns:ContactArray');
$outparams = $outparams = array('ResponseInfo' => 'tns:ResponseInfo');
//$outparams = $outparams = array('ResponseInfo' => 'xsd:string');
//$outparams = array('ProfileInfo'=> 'tns:Book');
$server->register('GetEventInfo', $inparams, $outparams, $ns, false);
if (!isset($HTTP_RAW_POST_DATA))
$HTTP_RAW_POST_DATA = file_get_contents("php://input");
$server->service($HTTP_RAW_POST_DATA);
file_put_contents("sqlwsdl.log", $HTTP_RAW_POST_DATA."\r\n".$server->getDebug());
?>
Tuesday, July 6, 2010
Package Trip from bangalore to tirupati
Hi
I like to share the information about my package trip to Tirupati in Green-line travels
Its awesome trip
* They pick us near indranagar depo
* They collected our ticket and give one boarding ticket keep safe its very important
* Once u seated they will give half liter water,and some Snacks
* Its Volvo bus so seats are comfort
* Around 8:30 pm bus will leave banglore
* Around 11:30 bus will stop for 15 min in some hotel
* Around 2 O'clock it will reach to Tirupati
* They will give room's to fresh up .. room was good... only 45min or 1 hour time to fresh up
* Around 3 one TDT bus is ready to take u to Tirumala
* It took 1 hour to reach to Tirumala
* Phone and Camera's are not allowed so your guide will tell to keep things and sleepers in one shop...... its safe no problem if u keep there... per mobile he will charge 10Rs took keep..
* Guide will give 300Rs to every one to take sigarra darsann ticket .. and will be in Q for Darsanna
* If rush is less then u will come out with in 7 :30
* Else it will 9:30 each 300Rs ticket u will get 2 Laddu. once u came out from temple. u will get break fast which is included in package.
* 10 O'clock u will Tirumala and come back to Tirupati.. u will back to volvo bus and You will moved to one more temple Padmavati Devi Temple Wife of Tirupati
* 12:30 Lunch this is also include in package
* 7:30 will be back to Banglore
Cost of Ticket per head is 1450Rs which include 1beakfast,1lunch, sigarra Darsanna ticket and Volvo bus
I hope this package is very good
I like to share the information about my package trip to Tirupati in Green-line travels
Its awesome trip
* They pick us near indranagar depo
* They collected our ticket and give one boarding ticket keep safe its very important
* Once u seated they will give half liter water,and some Snacks
* Its Volvo bus so seats are comfort
* Around 8:30 pm bus will leave banglore
* Around 11:30 bus will stop for 15 min in some hotel
* Around 2 O'clock it will reach to Tirupati
* They will give room's to fresh up .. room was good... only 45min or 1 hour time to fresh up
* Around 3 one TDT bus is ready to take u to Tirumala
* It took 1 hour to reach to Tirumala
* Phone and Camera's are not allowed so your guide will tell to keep things and sleepers in one shop...... its safe no problem if u keep there... per mobile he will charge 10Rs took keep..
* Guide will give 300Rs to every one to take sigarra darsann ticket .. and will be in Q for Darsanna
* If rush is less then u will come out with in 7 :30
* Else it will 9:30 each 300Rs ticket u will get 2 Laddu. once u came out from temple. u will get break fast which is included in package.
* 10 O'clock u will Tirumala and come back to Tirupati.. u will back to volvo bus and You will moved to one more temple Padmavati Devi Temple Wife of Tirupati
* 12:30 Lunch this is also include in package
* 7:30 will be back to Banglore
Cost of Ticket per head is 1450Rs which include 1beakfast,1lunch, sigarra Darsanna ticket and Volvo bus
I hope this package is very good
Monday, June 28, 2010
Creating a table in for loop each row with 5 column
If Your retrieving a n-number of data from database and wants to display in table like with n*m row*col then this code will be used
$col is number of column's
O/P will be like this

$col is number of column's
O/P will be like this

<table border="1px"> ?php $col=5; for ( $i=1; $i<=20; $i++){ if(!($i-1 % $col)){ ?> <tr><?php } ?> <td><?php echo $i; ?></td> <?php if(!($i % $col)){?> </tr> <?php }
} ?> </table>
Subscribe to:
Posts (Atom)