How to add admin panel Custom Menu in Magento?
Added a new tab in the admin panel take a look at the picture Folder structure:- Here is what i have in my files:- 1) IN — app/etc/modules/Shraddha_CreateAdminController.xml [php] <?xml version=”1.0″?> <config> <modules> <Shraddha_CreateAdminController> <active>true</active> <codePool>community</codePool> </Shraddha_CreateAdminController> </modules> </config> [/php] 2) IN– app/code/community/Shraddha/CreateAdminController/etc/config.xml [php] <?xml version=”1.0″?> …
Restrict the date on second CJuiDatePicker based on selected date in first CJuiDatePicker
Hello guys, Having issue in datepicker where end date is greater then start date do as below. [php] <pre class=”prettyprint”>//booking_from datepicker <?php $this->widget(‘zii.widgets.jui.CJuiDatePicker’,array( ‘id’ => CHtml::getIdByName(get_class($model) . ‘[booking_from]’), ‘name’=>’booking_from’, ‘model’=>$model, ‘attribute’ => ‘booking_from’, //’flat’=>true, ‘model’=>$model, ‘options’=>array( ‘dateFormat’ => ‘D, d M yy’, ‘showAnim’=>’slide’,//’slide’,’fold’,’slideDown’,’fadeIn’,’blind’,’bounce’,’clip’,’drop’ ‘changeMonth’=>true, ‘changeYear’=>true, …
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] …