Wednesday, April 25, 2018

Tuesday, August 1, 2017

Run stored procedure when inout parameter

mysql> SET @increment = 10;
mysql> CALL p(@increment);
more info click here

Thursday, August 18, 2016

Warning!symlink(): Cannot create symlink, error code(1314) magento 2

I faced this problem and try to figure out. I agree with Chris O'Toole. I will add extra step. My steps are,

  1. Open app/etc/di.xml and search Symlink. Check it is in following section. 
Replace Symlink with Copy word. Save.
  1. Delete all folders in pub/static. Don't delete .htaccess and other files.
  2. Run xampp as administrator. Run command line as administrator. 
 Run grunt exec:<theme name>.
You will see it is running fine. 




Then you can run grunt less:<theme name>




Finally you can run grunt watch



When you do any changes in less files(_theme.less or _extend.less) it will automatically create style-l and style-m css files in pub/static folder.

I'm running magento 2.1 in windows 10. 


--
Thanks & Regards,
Chamath Gunasekara

Sunday, July 31, 2016

Magento 2 : Less variable issue

If you get variable issue when running 

grunt exec:themename 
or
when deploying theme using
php bin/magento setup:static-content:deploy

First delete var/* 
Then run following commands

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

If doesn't solve your problem check your parent theme name in your theme.xml. If it is not luma then change back to luma and run following commands again.

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

--
Thanks & Regards,
Chamath Gunasekara

Thursday, June 2, 2016

How to do date addition in PHP

$sub_user_time_logged_in = "05:02:04";
$user_time_logged_in = "04:07:15";
$total_user_time_logged_in = strtotime($sub_user_time_logged_in) + strtotime($user_time_logged_in);
$total_user_time_logged_in = date("H:i:s", $total_user_time_logged_in);

enjoy....