Remove index.php from magento url on aws ec2 cloud
Hello Guys, On AWS EC2 cloud instance if you have to remove index.php from the URL then you have to tweak apache2.conf file. Edit apache2.conf file and file below code. <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> You can find …
Import data from CSV sheet to Database in Yii
In this post we will see how we can Import data from CSV sheet to Database in Yii. For this You just have to download a JPhpExcelReader Extension. [php] $itu = CUploadedFile::getInstance($model,’csv_file’); $data = new JPhpExcelReader($itu->getTempName()); $rows = array(); for($j=1; $j<=$data->sheets[0][‘numRows’]; $j++) { if($j == 1){ $header …
Resize Images in Magento
Hello Guys, Today i am going to show you how to resize category image in Magento. Use this code to resize images for category. [php] public function getResizeImage(Mage_Catalog_Model_Category $category, $width = 250, $height = 250) { // return when no image exists if (!$category->getImage()) { …
How to improve your business growth with the help of magento ecommerce website development?
In the modern time, Magento eCommerce development is considered as one the most effective solution which is preferred by the businesses today. It is widely used open- source software that has features specifically meant for the development of e-Commerce websites. The Magento website development helps online …
Magento Hole Punch With Varnish Cache
If You want to exclude your custom block from varnish cache then follow below solution. [php] <reference name=”block name”> <action method=”setEsiOptions”> <params> <access>private</access> <flush_events> <wishlist_item_save_after/> <wishlist_item_delete_after/> <sales_quote_save_after/> </flush_events> </params> </action> </reference> [/php] OR [php] <reference name=”block name”> <action method=”setEsiOptions”> <params> <access>private</access> <ttl>0</ttl> </params> </action> </reference> …
Get Payment Method name using Order ID
In this post we will see how how we can get Payment Method name using the Magento Order ID. Payment method is critical in order to create custom extension for orders. We can easily get these required data from an order using Zend methods. In case …
How to get specific order’s all comment or last comment in magento
In magento if you want to get specific order’s all comment or last commet this code can help you to do that. [php] $incrementId = 145000251; // Order’s incrementId $orderdata = Mage::getModel(‘sales/order’)->load($incrementId, ‘increment_id’); // Load that order by incrementId $comments = $orderdata->getStatusHistoryCollection(true); // Collection of …
Rating showing twice on product pages in Magento
We came across an issue recently, where the customer’s product pages review section was showing the rating stars twice. Here is the quick fix . Just goto the phpmyadmin and run this SQL query, [php] TRUNCATE `rating_option_vote` ; TRUNCATE `rating_option_vote_aggregated` ; [/php] …
How to Check, Customer is Logged in or not in Magento2
Below script will helpful to find the customer currently logged in a website or not. [php] $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $customerSession = $objectManager->create(‘Magento\Customer\Model\Session’); if($customerSession->isLoggedIn()) { //customer is loggedin or not $customerSession->getCustomer()->getName(); //Loggedin customer Name $customerSession->getCustomer()->getEmail(); //Loggedin customer Email //print_r($customerSession->getCustomer()->getData()); } [/php] Or You can try below …
Fix the HTTP Error When Uploading Images to WordPress
Many people encountered this HTTP error when uploading images to WordPress. The last time this happened to us was several days ago, after the hosting transfer, so I thought to share with you several solutions that may help you solve this problem. This error appears …