Thursday, August 27, 2015

Easy AngularJS Carousel Example


Easy way to add Carousel with AngularJS. I share best example with code reference which definitely save your time!! Enjoy!!


Sunday, August 23, 2015

World's top 5 JavaScript Framework That drive you crazy.


I share World's top 5 JavaScript Framework base on my 4+ experience in frontend development. That's definitely drive you crazy. ;)






Saturday, August 22, 2015

Magento Controller Action pass fata tp phtml view.

You can pass data to phtml through controller using 'core/session' model.

Set data in controller action:

 public function yourAction() {
        $your_data = 'God is Great';
        Mage::getModel('core/session')->setYourdata($your_data);
        return $this->_redirectReferer();
     }

Retrive the data in view phtm file:

Mage::getModel('core/session')->getYourdata();

Unset the session value:

Mage::getSingleton('core/session')->unsYourdata();

Sunday, May 24, 2015

php Next week date range code



$monday = strtotime("next monday");
$monday = date('W', $monday)==date('W') ? $monday-7*86400 : $monday;

$sunday = strtotime(date("Y-m-d",$monday)." +6 days");
$this_week_sd = date("Y-m-d",$monday);
$this_week_ed = date("Y-m-d",$sunday);

echo "Next week range from $this_week_sd to $this_week_ed ";