Showing posts with label magento. Show all posts
Showing posts with label magento. Show all posts

Monday, June 22, 2015

Display Reviews Starts on Product listing page Magento

hi guys if you want to display reviews rating stars on product listing page or anywhere else you will need up the following code.

<?php
$storeId = Mage::app()->getStore()->getId();
$summaryData = Mage::getModel('review/review_summary')->setStoreId($storeId)  ->load($_product->getId());
?>
<div class="ratings" style="text-align: center;">
        <div class="rating-box">
            <div class="rating" style="width:<?php echo $summaryData['rating_summary']; ?>%"></div>          
         </div>
</div>



Just you need to copy and paste above code to your program and you are done after placing this code you might need to delete cache of magento which is under var/cache.

if you need any other help or facing any issue please comment i will get back to you soon with you reply.


Wednesday, June 3, 2015

can not login to magento after installation

Hi guys if you can not login to magento admin panel after installation it's not an issue. All what you need to do is you will have to modify up a file of magento.



Go to:
app\code\core\Mage\Core\Model\Session\Abstract\Varien.php

and look for this code.

$cookieParams = array(
            'lifetime' => $cookie->getLifetime(),
            'path'     => $cookie->getPath(),
            'domain'   => $cookie->getConfigDomain(),
            'secure'   => $cookie->isSecure(),
            'httponly' => $cookie->getHttponly()
        );

        if (!$cookieParams['httponly']) {
            unset($cookieParams['httponly']);
            if (!$cookieParams['secure']) {
                unset($cookieParams['secure']);
                if (!$cookieParams['domain']) {
                    unset($cookieParams['domain']);
                }
            }
        }

you need to comment all of these codes. or you can replace this code with

/*$cookieParams = array(
            'lifetime' => $cookie->getLifetime(),
            'path'     => $cookie->getPath(),
            'domain'   => $cookie->getConfigDomain(),
            'secure'   => $cookie->isSecure(),
            'httponly' => $cookie->getHttponly()
        );

        if (!$cookieParams['httponly']) {
            unset($cookieParams['httponly']);
            if (!$cookieParams['secure']) {
                unset($cookieParams['secure']);
                if (!$cookieParams['domain']) {
                    unset($cookieParams['domain']);
                }
            }
        }*/

After this modification open your admin URL

http://domain.com/index.php/admin

and now try login with the username and password that you have setup on the installation time.

Note: This is tested on magento ver1.9.x

Sunday, December 21, 2014

[Solved] How To Import Export Product in Magento?

Well i had scenario that i have upload all the product and categories on my local host Magento store now what i had to is to make the website live and i had configured it live but the challenge came to me is i have to upload all the product in a day. There was around 3,000 products on my store which looks very difficult for me. so i have started researching and googling over it. After a long research i got a solution. and the solution here it is.

Step1:
 Go to your phpMyAdmin select your database on which your store is running on localhost. There you have to select all the tables starting with catelog_

After selecting tables you need to export all these table scroll bottom and you will get a dropdown saying with selected click on it and select export.

Step2:
After selecting export you will be redirected to another page where you will get two radio buttons
Quick - display only the minimal options
Custom - display all possible options
you have to select 2nd one custom. and in table list all the tables that you had checked previously will be selected.
befor exporting all the products you need to check all these following option are enabled.


Now click on go button at the very bottom of page and your product with categories are exported. 

Step3
simply import this SQL file. for product images you need to upload all those image in 
media/products
and you are done. Hope this artical will help you.