Wednesday, 18 October 2017

Magento 2 : issues with M2E Pro 'Duplicated line on invoice/order for configurable product'[solved]

Duplicated line on invoice/order for configurable product

When configurable product is ordered, Magento show 2 lines in order (and in invoice)
configurable product generates 2 lines : one with the actual price and the other one with $0 price.

Go this location:
app/code/Ess/M2ePro/Plugin/Order/Magento/Quote/Model/Quote/Item/

Replace 2 function :

public function aroundConvert($interceptor, \Closure $callback, $item)
    {
        return $this->execute('convert', $interceptor, $callback, [$item]);
    }

    // ---------------------------------------

    protected function processConvert($interceptor, \Closure $callback, $arguments)
    {
        $orderItem = $callback($arguments[0]);

        $this->eventManager->dispatch(
            'ess_sales_convert_quote_item_to_order_item',
            [
                'order_item' => $orderItem,
                'item' => $arguments[0],
            ]
        );

        return $orderItem;
    }
 

    To:
 
 
   public function aroundConvert($interceptor, \Closure $callback, ...$arguments)
    {
        return $this->execute('convert', $interceptor, $callback, $arguments);
    }

    // ---------------------------------------

    protected function processConvert($interceptor, \Closure $callback, $arguments)
    {
        $orderItem = $callback(...$arguments);

        $this->eventManager->dispatch(
            'ess_sales_convert_quote_item_to_order_item',
            [
                'order_item' => $orderItem,
                'item' => $arguments[0],
            ]
        );

        return $orderItem;
    }
    

Thursday, 20 July 2017

Kuldeep Singh Dagar: [SOLVED] Magento ver. 1.9.*.* Cant view product im...

Kuldeep Singh Dagar: [SOLVED] Magento ver. 1.9.*.* Cant view product im...: Problem Reasons: Wrong permissions set to uploaded files Solution: Open /lib/Varien/File/Uploader.php and make sure following permission...

[SOLVED] Magento ver. 1.9.*.* Cant view product images in admin after upload

Problem Reasons:

  • Wrong permissions set to uploaded files Solution: Open /lib/Varien/File/Uploader.php and make sure following permissions are set at chmod($destinationFile, 0640);. This code will be at around line 219.



  • Replace: line no 219 -  chmod($destinationFile, 0640); to chmod($destinationFile, 0644); or as per requirement.



  • Then rename .htaccess file to .htaccess.old in /media folder.


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

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,