Sunday, 2 July 2017

Magento [SOLVED]Can not login to admin panel and website footer error 'Access to undeclared static property'

Fatal error: Access to undeclared static property: Mage::$_isDeveloperMode in app/Mage.php on line 881

Go to Mage.php line number 881 find the function.

public static function getIsDeveloperMode()
{
    return self::$_isDeveloperMode;
}

This method simply returns a static property $_isDeveloperMode of the class app\Mage.php. You can find that the definition of that static property
 in that file itself in line 117 (magento 1.9.1) like this.

Add below code of the class app\Mage.php "static private $_isDeveloperMode = false;"

Find: static private $_isDownloader = false;

    /**
     * Is developer mode flag
     *
     * @var bool
     */
ADD: static private $_isDeveloperMode = false;

I tried the solution and it work fine.

Please feel free to contact me any Magento issue at any time.

Regards
Kuldeep
kuldeep4110@gmail.com

Tuesday, 13 June 2017

How to set up x amount discount in % on all products in magento store

Please folow the below steps.
How to set up x amount discount in % on all products in magento store

  •         Login in admin section
  •         Go to Promotions >> Catalog Price Rules
  •         Then Click Add New Rule
  •         Rule Name: x% discount
  •         Status: Active
  •         Websites : Choose the websites you want to apply the discount for
  •         Customer Groups: Choose the customer groups you want to apply the discount for
  •         In the Actions tab, under Discount Amount type x amount
  •         select apply to the "By Percentage of product original price"
  •         Click Save and Apply


Make sure Action Tab "Enable Discount to Subproducts:Yes"


I tried the solution and it work fine.

Please feel free to contact me any Magento issue at any time.

Regards
Kuldeep
kuldeep4110@gmail.com

Thursday, 8 June 2017

Magento Version 1.6- can't upload product images through admin section.


I Uploaded the product image in admin section with the help of Browse and upload button got error  when we reached on 100% ,it automatic disappear and images is not uploaded.
 The images are being uploaded into the / media / tmp folder, but not into / media / catalog.


 Solution: Please check the below mentioned my solution
 1.  Removing htaccess file from media folder 
 2. Giving 777 permission recursively to Media folder 
 3. Using different browsers
 4.  Replacing both prototype.js and product.js
\js\prototype\prototype.js
\js\mage\adminhtml\product.js

I tried the solution and it work fine. 

Please feel free to contact me any Magento issue at any time. 

Regards
Kuldeep
kuldeep4110@gmail.com

Tuesday, 2 August 2016

Magento Unknown date format, neither date nor time in ‘yyyy-MM-dd HH:mm:ss’ found

Issues resolved
go to  file \lib\Zend\Locale\Format.php      line number 827

                 $day   iconv_strpos($format'd');
        $month iconv_strpos($format'M');
        
$year  iconv_strpos($format'y');
        
$hour  iconv_strpos($format'H');
        
$min   iconv_strpos($format'm');
        
$sec   iconv_strpos($format's');
Replace the code

        $day   iconv_strpos($format'd',0,'UTF-8');
        
$month iconv_strpos($format'M',0,'UTF-8');
        
$year  iconv_strpos($format'y',0,'UTF-8');
        
$hour  iconv_strpos($format'H',0,'UTF-8');
        
$min   iconv_strpos($format'm',0,'UTF-8');
        
$sec   iconv_strpos($format's',0,'UTF-8');

and add the below code to add the following to your index.php:




iconv_set_encoding("internal_encoding","UTF-8");
iconv_set_encoding("output_encoding""ISO-8859-1");

Thanks,


Wednesday, 13 July 2016

Magento Remove & Replace Database Table Prefix

Steps:

  1. Take a database backup.
  2. Create a File Named "filename.php" and placed at root directory.
  3. Paste the above Script in it.
  4. before run the file if $dryrun=true; it mins only check the rename process or $dryrun=false; it mins rename the table.
  5. All tables will be renamed.
  6. go to app/etc/local.xml <table_prefix><![CDATA[prefix]]></table_prefix>
  7. you're done.
<?php

$database_host      = "";
$database_user      = "";
$database_password  = "";
$magento_database   = "";
$table_prefix       = "ex_";
$dryrun =  true; // change to false when you want to commit changes
$link = mysqli_connect($database_host, $database_user, $database_password, $magento_database);
/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}
$query = "SHOW TABLES";

$result = mysqli_query($link,$query) or die('### Error cannot connect to DB');
if ($dryrun) { echo "### No changes made, just testing <br />"; }
while($row = mysqli_fetch_array($result)) {
$old_table = $row[0];
if ($new_table = preg_replace('/^'.$table_prefix.'/', '', $old_table)) {
if ($new_table != $old_table ) {
echo "Rename: " . $old_table . ", to: ". $new_table;
if (!$dryrun) {
$query = "RENAME TABLE `$old_table` TO `$new_table`";
mysqli_query($link,$query);
echo " -> DONE <br />";
} else { echo " -> Just checking <br />"; }
} else {
echo "Nothing to rename: " . $old_table  . "<br />";
}
    }
}
?>

Monday, 2 May 2016

PHP Notice 'yii\base\ErrorException' with message 'unserialize(): Error at offset

yiisoft\yii2-debug\controllers\DefaultController.php:132
Looks like a problem in the cached version of the request data.
Clearing the folder files under

\backend\runtime\debug\
\frontend\runtime\debug\

Tuesday, 16 February 2016

Joomla : 500 - PHP regular expression limit reached (pcre.backtrack_limit)


Hello,

I also got this error 500 "PHP regular expression limit reached (pcre.backtrack_limit)" on my website Top iPhone Apps created in Joomla 1.7.3

This occurred when I created so many menu items. After searching forums, I was able to fix it.
How? Here is the solution:

This is some kind of php restriction and you will need to override this php restriction by modifying index.php on your root.

Add following two lines in index.php and you don't need to modify any other file:

ini_set('pcre.backtrack_limit',1000000);
ini_set('pcre.recursion_limit',1000000);

Once it is modified, clear your cache and reopen your website. Its working fine.