Saturday , April 20 2024
Home / v.shakya (page 3)

v.shakya

I am V.Shakya, Software Developer & Consultant I like to share my ideas, views and knowledge to all of you who come across my website. I am young, enthusiastic, highly motivated and self disciplined person. I completed my studies in Master of Computer Application and currently giving my technical expertise to one of the Big IT company. I have more than fifteen years of experience in vast field of Programming , Designing and Development of websites and various software's.

Difference between Mage::getSingleton() and Mage::getModel() in Magento

Mage::getSingleton() Mage::getSingleton() will first check the same class instance is exits or not in memory. If the instance is created then it will return the same object from memory. So Mage::getSingleton() faster then Mage::getModel(). $product1 = Mage::getSingleton('catalog/product'); $product2 = Mage::getSingleton('catalog/product'); $product1 and $product2 both will share same memory of OS …

Read More »

Linux Command

Swich the user to root user $ sudo su Install httpd service $ sudo yum install httpd Install mysql-server service $ sudo yum install mysql-server Install php & php-mysql $ sudo yum install php php-mysql Install phpmyadmin $ sudo yum –enablerepo=epel install phpmyadmin Edit the httpd.conf file $ nano /etc/httpd/conf/httpd.conf …

Read More »

Unlink or Remove a Symbolic link in Linux

How to unlink or remove a symbolic link in linux that was created with “ln” command Use the unlink command To unlink a symbolic link file : # unlink symbolic_link_file To unlink a symbolic link to a directory : # unlink symbolic_link_dir When unlinking a directory make sure that you …

Read More »

How to fetch email status and other details from aweber through aweber API?

Below are the complete code to fetch the aweber account subscriber status and other details through aweber API Download AWeber API PHP Library <?php function httpPost($url,$params) { $postData = ''; //create name value pairs seperated by & foreach($params as $k => $v) { $postData .= $k . '='.$v.'&'; } rtrim($postData, …

Read More »

How to create an observer in Magento?

How to create an observer in Magento.? —————————– We are consider that you are familiar to create new module in magento. Following are the steps to create a module in magento to override the observer. Step 1) Create main module xml file We need to create a file called Cmpny_Observername.xml …

Read More »

How we can add one more new option in product images in magento?

You would need to update following files : 1) appcodecoreMageCatalogModelProductAttributeBackendMedia.php 2) appcodecoreMageCatalogModelResourceProductAttributeBackendMedia.php 3) appcodecoreMageCatalogModelProductAttributeMediaApi.php 4) appdesignadminhtmldefaultdefaulttemplatecatalogproducthelpergallery.phtml 5) jsmageadminhtmlproduct.js Also You would need to alter table “catalog_product_entity_media_gallery_value” and Add field in Table ‘newoption’ How we can add one more new option in product images in magento please follow below steps : …

Read More »

PHP 5 Global Variables – Superglobals

Superglobals were introduced in PHP 4.1.0, and are built-in variables that are always available in all scopes. PHP Global Variables – Superglobals Several predefined variables in PHP are “superglobals”, which means that they are always accessible, regardless of scope – and you can access them from any function, class or …

Read More »

PHP 5 Sorting Arrays

The elements in an array can be sorted in alphabetical or numerical order, descending or ascending. PHP – Sort Functions For Arrays In this chapter, we will go through the following PHP array sort functions: sort() – sort arrays in ascending order rsort() – sort arrays in descending order asort() …

Read More »

PHP 5 Arrays

An array stores multiple values in one single variable: Example <?php $cars=array("Volvo","BMW","Toyota"); echo "I like " . $cars[0] . ", " . $cars[1] . " and " . $cars[2] . "."; ?> What is an Array? An array is a special variable, which can hold more than one value at …

Read More »