Saturday, December 31, 2016

Top 10 Bollywood Movies of 2016 (Box Office Collection)

Every year Bollywood industry famous for new records in box office collection, and even if more screens for release movie and for that movie's budget also increase for best entitlement to an audience and also receive a good collection according to movie story and sometimes it's characters.
This year sultan is most successful movie of that year, which cross 300 crore in box office collection because of super hero 'Salman Khan'.
Here below list of top 10 Bollywood movies by box office collection.


10. Baaghi

 
RELEASE DATE 29th April
DIRECTOR Sabbir Khan
PRODUCER Sajid Nadiadwala
CAST Tiger Shroff, Shraddha Kapoor, Sudheer Babu
RUNNING TIME 133 Minutes
WORLDWIDE GROSS ₹ 112.87 Crore
INDIAN GROSS ₹ 76.34 Crore
BUDGET ₹ 47 Crore


9. Fan

 
RELEASE DATE 29th April
DIRECTOR Maneesh Sharma
PRODUCER Aditya Chopra
CAST Shah Rukh Khan
RUNNING TIME 138 Minutes
WORLDWIDE GROSS ₹ 185.4 Crore
INDIAN GROSS ₹ 85 Crore
BUDGET ₹ 105 Crore


8. Shivaay

 
RELEASE DATE 28th October
DIRECTOR Ajay Devgan
PRODUCER Ajay Devgan
CAST Ajay Devgan, Sayesha Saigal
RUNNING TIME 158 Minutes
WORLDWIDE GROSS ₹ 146.18 Crore
INDIAN GROSS ₹ 100.32 Crore
BUDGET ₹ 105 Crore


7. Housefull 3

 
RELEASE DATE 3rd June
DIRECTOR Sajid-Farhad
PRODUCER Sajid Nadiadwala
CAST Akshay Kumar, Riteish Deshmukh, Abhishek Bachchan, Jacqueline Fernandez
RUNNING TIME 134 Minutes
WORLDWIDE GROSS ₹ 187.95 Crore
INDIAN GROSS ₹ 109.14 Crore
BUDGET ₹ 85 Crore


6. Ae Dil Hai Mushkil

 
RELEASE DATE 28th October
DIRECTOR Karan Johar
PRODUCER Apoorva Mehta, Karan Johar
CAST Aishwarya Rai Bachchan, Ranbir Kapoor
RUNNING TIME 157 Minutes
WORLDWIDE GROSS ₹ 241.81 Crore
INDIAN GROSS ₹ 112.47 Crore
BUDGET ₹ 70 Crore


5. Rustom

 
RELEASE DATE 28th October
DIRECTOR Tinu Suresh Desai
PRODUCER Neeraj Pandey
CAST Akshay Kumar, Ileana D'Cruz, Esha Gupta
RUNNING TIME 150 Minutes
WORLDWIDE GROSS ₹ 218 Crore
INDIAN GROSS ₹ 128.10 Crore
BUDGET ₹ 65 Crore


4. Airlift

 
RELEASE DATE 22nd January
DIRECTOR Raja Krishna Menon
PRODUCER Nikhil Advani, Monisha Adwani, Aruna Bhatia
CAST Akshay Kumar, Nimrat Kaur
RUNNING TIME 125 Minutes
WORLDWIDE GROSS ₹ 231.60 Crore
INDIAN GROSS ₹ 129 Crore
BUDGET ₹ 30 Crore


3. M.S. Dhoni: The Untold Story

 
RELEASE DATE 30th September
DIRECTOR Neeraj Pandey
PRODUCER Arun Pandey
CAST Sushant Singh Rajput, Disha Patani
RUNNING TIME 190 Minutes
WORLDWIDE GROSS ₹ 216 Crore
INDIAN GROSS ₹ 133.04 Crore
BUDGET ₹ 104 Crore


2. Dangal*

 
RELEASE DATE 23th December
DIRECTOR Nitesh Tiwari
PRODUCER Aamir Khan, Kiran Rao
CAST Aamir Khan, Sakshi Tanwar, Fatima Sana Shaikh
RUNNING TIME 160 Minutes
WORLDWIDE GROSS ₹ 424.59 Crore*
INDIAN GROSS ₹ 216.12 Crore*
BUDGET ₹ 70 Crore


1. Sultan

 
RELEASE DATE 6th July
DIRECTOR Ali Abbas Zafar
PRODUCER Aditya Chopra
CAST Salman Khan, Anushka Sharma, Randeep Hooda
RUNNING TIME 170 Minutes
WORLDWIDE GROSS ₹ 589 Crore
INDIAN GROSS ₹ 300.45 Crore
BUDGET ₹ 90 Crore

Top 10 Bollywood Actress 2016

Bollywood industry 2016 gives many movies based on female characters in the leading role and based on women. Now a day, it's trend of item songs in which female actress played her glamorous role. For creating any type of romantic, comic, biopic or any other types movie actress is more important characters.
In current year, many movie releases with many new and old actresses. Every actress performs own best role and character according to movie theme so it's difficult to list out top 10. Here display list of the top 10 actresses of Bollywood in 2016 who is most famous for them movies and events. Here also display lists of actress movies according to release date.

10. Jacqueline Fernandez


Jacqueline Fernandez

Jacqueline Fernandez is a Bahraini born Sri Lankan actress, model, and the winner of the 2006 Miss Universe Sri Lanka. She starts her career in 2003 with flop movie. In 2016, she served as a judge to the ninth season of the dance show Jhalak Dikhhla Jaa and three movies as lead role.
  • Housefull 3 (2nd June)
  • Dishoom (28th July)
  • A Flying Jatt (25th August)

9. Kareena Kapoor


Kareena Kapoor

Kareena Kapoor starts her career in 2003 and till now gives many movies and reach at the top Bollywood actress. current her, she was in the news because of her baby and her husband said Ali Khan. In current year she gives only two hit movies.
  • Ki & Ka (1th April)
  • Udta Punjab (17th June)

8. Aishwarya Rai


Aishwarya Rai

Aishwarya Rai Bachchan is a famous Bollywood actress from long time for her looks and relation to the Bachchan family. current year her two movies with different roles.Here movies in current year as below.
  • Sarabjit (19th May)
  • Ae Dil Hai Mushkil (28th October)

7. Katrina Kaif


Katrina Kaif

Katrina Kaif is a British film actress and model. She starts her career in 2003 and then after she is listed in top 10 actresses and highest paid actress also. From the start in a Bollywood career, she was in the news because of her affairs in current year she is in relation with Ranbir Kapoor and break up also. Here movies in current year as below.
  • Fitoor (12th February)
  • Baar Baar Dekho (9th September)

6. Sonam Kapoor


Sonam Kapoor

Sonam Kapoor is the daughter of Anil Kapoor. she started her career in 2007 with Sanjay Bhansali. She is famous for her style and looks at media and current year she played best acting in only one movie Neerja.
  • Neerja (29th February)

5. Alia Bhatt


Alia Bhatt

Alia Bhatt is a British film actress and singer who works in Bollywood as a daughter of filmmaker Mahesh Bhatt.In 2016 she played the supporting role of a lively young girl with a buried past in 'Kapoor & Sons' and playes lead role with Shah Rukh Khan.Her movies in current year as below.
  • Kapoor and Sons (24th March)
  • Udta Punjab (17th June)
  • Dear Zindagi (25th November)

4. Shraddha Kapoor


Shraddha Kapoor

Shraddha Kapoor in famous because of her father in the Bollywood industry and her entry in Bollywood with hit movie 'Ashiqui 2'. Then after she plays a good role in many other movies and also noticeable to the audience. Her movies in current year as below.
  • Baaghi (29th April)
  • Rock On 2 (11th November)

3. Deepika Padukone


Deepika Padukone

She is always on top from the start of her career and gives many movies who makes records in Bollywood. She played many types of roles with best performance. In current year Deepika Padukone has completed filming for her first project in Hollywood movie 'xXx: The Return of Xander Cage' which is released on next year.

2. Anushka Sharma


Anushka Sharma

Anushka Sharma's acting debut was in 2008.she is in a relationship with cricketer Virat Kohli and their story substantial media coverage in India. in current year she plays lead role in two blockbuster movies in the current year.Her movies in current year as below.
  • Sultan (6th July)
  • Ae Dil Hai Mushkil (28th October)

1. Priyanka Chopra


Priyanka Chopra

Priyanka Chopra starting her career in 2002 and till now she is in the top 10 for any occasion or event and famous for her acting and looks in Bollywood. In current year she is in the news for her American television serial 'Quantico' and next version of it. also famous for her next 'Baywatch'. In 2016, she played as a police officer in Prakash Jha's social drama Jai Gangaajal.Her movies in current year.
  • Jai Gangaajal (4th March)

Top 10 Bollywood Actors 2016

Bollywood actor is a famous and important character of the movie. Now a days Bollywood box office collection and audience attraction based on movie actor and it's advertised as publicity.
This year, many movies coming with good acting by each actor in that. 2016 all most movies are based on actor with best performance and attract audience by getting good box office collection.
Here list of top most actor who are noted for their performance and in news because of some event or any social comments.

10. Shahid Kapoor


Shahid Kapoor

Shahid Kapoor has only one movie in current year 2016 but he is in the news because of his marriage life with Mira Rajput and daughter Misha. his fans also must waited his next movie Padmavati and Rangoon. List of his movies on current year.
  • Udta Punjab (17th June)

9. Ranbir Kapoor


Ranbir Kapoor

Ranbir Kapoor is famous for Kapoor's family and good looking actor, so current year he is in the highlight for his affairs with Kaitrina Kaif. and then after some intimate scenes with Aishwariya in ADHM movie. his fans much excite for his next movie Jagga Jasoos and biopic of Sanjay Dutt.
  • Ae Dil Hai Mushkil (28th October)

8. Ranveer Singh


Ranveer Singh

Ranveer Singh made his debut in 2010 with Aditya Chopra's and got an award than after he known for his best performance and awesome acting. Current year his only one movie famous for many kissing scenes and it's average in box office and also his friendship with Deepika was in the news.
  • Befikre (9th December)

7. Ajay Devgn


Ajay Devgn

Ajay Devgn is known for his acting in movie for any type of role. current year only one movie 'Shivaay' is most awaited movie in a year, but the box office collection is average according to cost. his next movie Baadshaho also awaited.
  • Shivaay (27th October)

6. Hrithik Roshan


Hrithik Roshan

Hrithik Roshan current year famous for the most handsome person in the world and also some legal battle with Kangana. his photo shoots and advertise also common in social and now a days his fans waiting for his next Kaabil in which he played the role as a blind man.
  • Mohenjo Daro (12th August)

5. Aamir Khan


Aamir Khan

Aamir Khan is Mr. Perfect in Bollywood and his all movies create new record in box office and most of people waited for his movie. current year he was in social for his movie Dangal and also for intolerance.
  • Dangal (23th December)

4. Amitabh Bachchan


Shraddha Kapoor

Amitabh Bachchan is known as King of Bollywood as Big B. he gives lots of movies with great acting till around 50 years. His movies of current year as above.
  • Wazir (14th January)
  • Te3n (10th June)
  • Pink (16th September)

3. Akshay Kumar


Akshay Kumar

Akshay Kumar is in film industry many years and nowadays he is much famous more than previously because of great acting in best movies in Bollywood. Because of that he listed in the top 10 in previews some years.
  • Airlift (22nd January)
  • Housefull 3 (2nd June)
  • Rustom (2nd August)

2. Shah Rukh Khan


Shah Rukh Khan

Shah Rukh Khan is active in social and huge fan of his around the world. Current year his two movies are awaited for all and from them Fan is average in Box office, but Dear Zindagi is heart touching for the audience. people also waited for his next movie reels.
  • Fan (14th April)
  • Dear Zindagi (25th November)

1. Salman Khan


Salman Khan

Salman Khan is a celebrity who has huge fans, so his all movies break new record in box office for any type of story. he also suited for all types of role. Current year he is highlighted for his movie Sultan's publicity and his sister Arpita Khan. So he is always listed as top 5 actors in Bollywood anywhere.
  • Sultan (6th July)

Top 10 Bollywood Songs 2016

Song is simple sets of words that manage according to lines with music and lyrics.In Indian movie song are most important and heart touching to peoples.Some songs are create for any special event or moment represent.
In Bollywood there are lots of songs.Each movie has minimum one songs or music for make more entertainment.Some movies also famous for it's songs.Songs comes in public before release of that movie.for each movie event first release it's music album.Movie and it's story in peoples mind in some times or some moments but it's songs always remember.
Here list of top 10 songs of 2016 according to movie release date.


SOCH NA SAKE - AIRLIFT

MOVIE AIRLIFT
DIRECTOR Raja Krishna Menon
RELEASE DATE 22nd January
CAST Akshay Kumar, Nimrat Kaur
SINGER Arijit Singh, Tulsi Kumar
MUSIC Armaan Malik
MUSIC PUBLISHER T-Series
LYRICS Kumaar



SANAM RE - TITLE

MOVIE SANAM RE
DIRECTOR Divya Khosla Kumar
RELEASE DATE 12nd February
CAST Pulkit Samrat, Urvashi Rautela, Yami Gautam
SINGER Arijit Singh
MUSIC Mithoon
MUSIC PUBLISHER T-Series
LYRICS Mithoon



JABRA - FAN

MOVIE FAN
DIRECTOR Maneesh Sharma
RELEASE DATE 15th April
CAST Shah Rukh Khan
SINGER Nakash Aziz
MUSIC Vishal-Shekhar
MUSIC PUBLISHER YRF
LYRICS Varun Grover



JAG GHOOMIYA - SULTAN

MOVIE SULTAN
DIRECTOR Ali Abbas Zafar
RELEASE DATE 6th July
CAST Salman Khan, Anushka Sharma, Randeep Hooda
SINGER Rahat Fateh Ali Khan
MUSIC Vishal-Shekhar
MUSIC PUBLISHER YRF
LYRICS Irshad Kamil



TERE SANG YAARA - RUSTOM

MOVIE RUSTOM
DIRECTOR Tinu Suresh Desai
RELEASE DATE 12th August
CAST Akshay Kumar, Ileana D'Cruz, Esha Gupta
SINGER Atif Aslam
MUSIC Arko Pravo Mukherjee
MUSIC PUBLISHER Zee Music Company
LYRICS Manoj Muntashir



TU HAI - MOHENJO DARO

MOVIE MOHENJO DARO
DIRECTOR Ashutosh Gowariker
RELEASE DATE 12th August
CAST Hrithik Roshan, Pooja Hegde
SINGER A. R. Rahman
MUSIC A. R. Rahman
MUSIC PUBLISHER T-Series
LYRICS Javed Akhtar



SAU AASMAAN - BAAR BAAR DEKHO

MOVIE BAAR BAAR DEKHO
DIRECTOR Nitya Mehra
RELEASE DATE 9th September
CAST Katrina Kaif, Sidharth Malhotra
SINGER Armaan Malik, Neeti Mohan
MUSIC Abhijit Vaghani,Amaal Mallik
MUSIC PUBLISHER Zee Music Company
LYRICS Kumaar



KAUN TUJHE - MS DHONI THE UNTOLD STORY

MOVIE MS DHONI THE UNTOLD STORY
DIRECTOR Neeraj Pandey
RELEASE DATE 30th September
CAST Sushant Singh Rajput, Disha Patani
SINGER Palak Muchhal
MUSIC Amaal Mallik
MUSIC PUBLISHER T-Series
LYRICS Manoj Muntashir



AE DIL HAI MUSHKIL - TITLE

MOVIE AE DIL HAI MUSHKIL
DIRECTOR Karan Johar
RELEASE DATE 28th October
CAST Ranbir Kapoor, Aishwarya Rai Bachchan, Anushka Sharma
SINGER Arijit Singh
MUSIC Pritam
MUSIC PUBLISHER Sony Music India
LYRICS Amitabh Bhattacharya



NASHE SI CHADH GAYI - BEFIKRE

MOVIE BEFIKRE
DIRECTOR Aditya Chopra
RELEASE DATE 9th December
CAST Ranveer Singh, Vaani Kapoor
SINGER Arijit Singh, Caralisa Monteiro
MUSIC Vishal-Shekhar
MUSIC PUBLISHER YRF
LYRICS Jaideep Sahni


Top 10 Most Viewed Bollywood Movie Trailers of 2016

Current year 2016 is a good year in the Bollywood industry and gives many movies with action, thriller, drama, biopic and romance. Some of them are most viewed and some movie famous for its casts, music, adventure or any other reason.
For any movie trailer is a new trend in Bollywood and so every producer or director, release movie trailer before launch movie to attract people and will come them to the box office and make a new record of box office collection.
Here below list of top 10 movie trailer, which are most viewed and liked on YouTube. Have you missed seeing it then must watch here.

10. Dishoom

 
TRAILER RELEASE 1st June (Eros Now)
VIEWS 20,586,559
LIKES 75,087
DISLIKES 11,316
MOVIE RELEASE DATE 29th July 2016
CAST John Abraham, Varun Dhawan, Jacqueline Fernandez, Akshaye Khanna


9. Wajah Tum Ho

 
TRAILER RELEASE 13th October (T-Series)
VIEWS 23,114,532
LIKES 40,409
DISLIKES 6,534
MOVIE RELEASE DATE 16th December 2016
CAST Sana Khan, Sharman Joshi, Gurmeet Choudhary


8. Kaabil

 
TRAILER RELEASE 25th October (FilmKRAFT)
VIEWS 23,493,645
LIKES 174,387
DISLIKES 15,822
MOVIE RELEASE DATE 25th January 2017
CAST Hrithik Roshan, Yami Gautam, Ronit Roy


7. Fan

 
TRAILER RELEASE 29th February (YRF)
VIEWS 25,049,377
LIKES 181,094
DISLIKES 14,116
MOVIE RELEASE DATE 15th April 2016
CAST Shah Rukh Khan


6. M.S.Dhoni - The Untold Story

 
TRAILER RELEASE 11th August (FoxStarHindi)
VIEWS 26,538,799
LIKES 375,154
DISLIKES 10,179
MOVIE RELEASE DATE 30th September 2016
CAST Sushant Singh Rajput, Disha Patani, Kiara Advani


5. Shivaay

 
TRAILER RELEASE 7th August (Ajay Devgn)
VIEWS 29,619,452
LIKES 401,247
DISLIKES 16,487
MOVIE RELEASE DATE 28th October 2016
CAST Ajay Devgan, Sayesha Saigal, Erika Kaar


4. Sultan

 
TRAILER RELEASE 24th May (YRF)
VIEWS 35,103,575
LIKES 205,686
DISLIKES 19,690
MOVIE RELEASE DATE 6th July 2016
CAST Salman Khan, Anushka Sharma, Randeep Hooda


3. Raees

 
TRAILER RELEASE 6th December (Red Chillies Entertainment)
VIEWS 35,398,017
LIKES 441,858
DISLIKES 42,973
MOVIE RELEASE DATE 25th January 2017
CAST Shah Rukh Khan, Mahira Khan, Nawazuddin Siddiqui


2. Befikre

 
TRAILER RELEASE 10th October (YRF)
VIEWS 36,326,974
LIKES 123,086
DISLIKES 49,708
MOVIE RELEASE DATE 9th December 2016
CAST Ranveer Singh, Vaani Kapoor


1. Dangal

 
TRAILER RELEASE 19th October (UTV Motion Pictures)
VIEWS 43,998,969
LIKES 336,454
DISLIKES 29,661
MOVIE RELEASE DATE 23th December 2016
CAST Aamir Khan, Sakshi Tanwar, Fatima Sana Shaikh


Top 10 Bollywood Item Songs 2016

Item song is one type of dance with music as musical performance. now these days, many movies known for it's item songs and it's conman in a Bollywood movie. Currently, all top actress plays the role as item girl instead of the main role in the movie and become that song hits with her best performance. The concept of item song is old in Bollywood industry. This year 2016 Bollywood gives many item songs with any item girls in many movies here list of top 10 item songs of 2016.

JAWAANI LE DOOBI - KYAA KOOL HAIN HUM 3

ITEM GIRL Gauahar Khan
MOVIE KYAA KOOL HAIN HUM 3
DIRECTOR Umesh Ghadge
RELEASE DATE 22nd January
CAST Tusshar Kapoor, Aftab Shivdasani, Mandana Karimi
SINGER Kanika Kapoor, Uvie
MUSIC Sajid–Wajid
MUSIC PUBLISHER Zee Music Company
LYRICS Danish Sabri



ROM ROM ROMANTIC - MASTIZAADE

ITEM GIRL Sunny Leone
MOVIE MASTIZAADE
DIRECTOR Milap Milan Zaveri
RELEASE DATE 29th January
CAST Sunny Leone, Tusshar Kapoor, Vir Das
SINGER Armaan Malik, Mika Singh
MUSIC Amaal Mallik
MUSIC PUBLISHER T-Series
LYRICS Manoj Muntashir



HUMNE PEE RAKHI HAI - SANAM RE

ITEM GIRL Divya Khosla Kumar
MOVIE SANAM RE
DIRECTOR Divya Khosla Kumar
RELEASE DATE 12th February
CAST Pulkit Samrat, Urvashi Rautela, Yami Gautam
SINGER Neha Kakkar, Ikka Singh, Jaz Dhami
MUSIC Epic Bhangra
MUSIC PUBLISHER T-Series
LYRICS Ikka & Kumaar



ROCK THA PARTY - ROCKY HANDSOME

ITEM GIRL Nora Fatehi
MOVIE ROCKY HANDSOME
DIRECTOR Nishikant Kamat
RELEASE DATE 25th March
CAST John Abraham, Diya Chalwad
SINGER Navtej Singh Rehal, Thomas Sardorf, Janus Barnewitz
MUSIC Bombay Rockers
MUSIC PUBLISHER T-Series
LYRICS Bombay Rockers



OYE OYE - AZHAR

ITEM GIRL Nargis Fakhri
MOVIE AZHAR
DIRECTOR Tony D'Souza
RELEASE DATE 13th May
CAST Emraan Hashmi, Nargis Fakhri, Prachi Desai
SINGER Armaan Malik, Aditi Singh Sharma
MUSIC DJ Chetas
MUSIC PUBLISHER T-Series
LYRICS Anand Bakshi



OLIPSTICK LAGA KE - GREAT GRAND MASTI

ITEM GIRL Urvashi Rautela
MOVIE GREAT GRAND MASTI
DIRECTOR Indra Kumar
RELEASE DATE 15th July
CAST Ritesh Deshmukh, Vivek Oberoi, Aftab Shivdasani, Urvashi Rautela
SINGER Shaan, Payal Dev
MUSIC Superbia
MUSIC PUBLISHER Zee Music Company
LYRICS Sameer Anjaan



JAANEMAN AAH - DISHOOM

ITEM GIRL Parineeti Chopra
MOVIE DISHOOM
DIRECTOR Rohit Dhawan
RELEASE DATE 28th July
CAST John Abraham, Varun Dhawan, Jacqueline Fernandez, Akshaye Khanna
SINGER Antara Mitra, Aman Trikha
MUSIC Pritam
MUSIC PUBLISHER T-Series
LYRICS Mayur Puri



KALA CHASHMA - BAAR BAAR DEKHO

ITEM GIRL Katrina Kaif
MOVIE BAAR BAAR DEKHO
DIRECTOR Nitya Mehra
RELEASE DATE 9th September
CAST Sidharth Malhotra, Katrina Kaif
SINGER Neha Kakkar, Badshah, Amar Arshi
MUSIC Badshah
MUSIC PUBLISHER Zee Music Company
LYRICS Kumaar



O JANIYA - FORCE 2

ITEM GIRL Sonakshi Sinha
MOVIE FORCE 2
DIRECTOR Abhinay Deo
RELEASE DATE 18th November
CAST John Abraham, Sonakshi Sinha
SINGER Neha Kakkar
MUSIC Gourov Roshin
MUSIC PUBLISHER T-Series
LYRICS Kumaar



MAAHI VE - WAJAH TUM HO

ITEM GIRL Zareen Khan
MOVIE WAJAH TUM HO
DIRECTOR Vishal Pandya
RELEASE DATE 16th December
CAST Sana Khan, Sharman Joshi, Gurmeet Choudhary
SINGER Neha Kakkar
MUSIC Gourov Roshin
MUSIC PUBLISHER T-Series
LYRICS Kumaar


Monday, December 12, 2016

Make Bootable Pendrive Without Any Software

Whenever you want to install or upgrade any operating system, then you must need a Bootable CD for run installation process as a boot option in any laptop or desktop. Some of the many system CD-Row is not available or it's corrupted to read CD then you must look for a Bootable Pen drive which is easy to plug-in USB port and use it to install any operating system.
If you want to create a Bootable USB pen drive then there is many paid and free softwares available for that. Some uses not understand most of the software's installation and use or some user doesn't use any malicious programs. Here describe a simple way to make Bootable pen-drive with window command prompts.
For creating any operating system Bootable pen-drive must check window source size, which is less than your pen-drive space or not.

Here list of steps to make  Bootable Pen-drive using CMD
  • Go to search in from window Icon or search program.
  • Now find `CMD` and then open that program by right click on and click option Run as administrator
  • Window open CMD screen now Turn on your `CAPS LOCK.`
  • Type `DISKPART` and press enter.Wait for a while until the DISKPART program run.
  • Type `LIST DISK` and press enter. This will show all the drives available in your system. Find the Disk number of your pen drive Disk 0 for Hard Drive and Disk 1 for your USB Flash Drive with its total capacity. (Attach only one USB at the time)
  • Type `SELECT DISK 1` to determine that disk 1 would be processed in the next step then hit Enter
  • Type `CLEAN` and hit Enter to remove all of the data in the drive. 
  • Type `CREATE PARTITION PRIMARY` and press enter for creating a primary partition.
  • Type `SELECT PARTITION 1` and press enter for Choosing the PARTITION 1 for setting up it as an active partition.
  • Type `ACTIVE` and then press enter for activating current partition.
  • Type `FORMAT FS=NTFS` and press enter. Wait till the processing becomes 100% complete. Do not do anything until it becomes 100%.
  • Type `ASSIGN` and then press enter.
  • Type `EXIT` to remove from DISKPART and close CMD.
Your USB pen drive has successfully become Bootable and is now ready to use. You just need to copy and paste all the files of the operating system on your USB drive pen drive and use as a bootable pen drive.

Wednesday, November 30, 2016

Install Magento 2 on Localhost With PHP7

New version of Magento changed with a new structure and design that improves features which are convenient. You can also check all changes and features on the Magento official website and you can also download latest version from there.
If you are using Magento 2.0.X than its support in PHP 5 but when you use latest Magento 2.1.x than it's supported in PHP 7 & MySQL 5.7 and it's also support Elasticsearch 1.0. Here I describe you to install Magento 2 using EasyPHP DevServer v16. 1 including Apache 2.4.17, PHPv7.0.1, MySQL v5.7.9 and PhpMyAdmin v4.5.2.
For installing Magento using an EasyPhp server without installing Wamp or xamp you must download EasyPhp for your system and install it.
Than download composer and install in system with `php.exe` path from EasyPhp installation.
Here below describe the steps for run Magento 2 on the local server.

  • Start EasyPHP DevServer by clicking on EasyPHP DevServer -> Open Dashboard (If it's display msvcr100.dll error than download "Microsoft Visual Studio C++ 2015 & 2013" according to EasyPhp installation folder(84x or 64x) not window system)
  • Click on HTTP Server -> Apache -> PHP v7.0.1 and Port 8888 -> start
  • Click on DB Server -> MySQL -> start.
  • Back to Dashboard again and click on the Portable Direction link to detect the directory, then extract Magento 2 files which we just download before. This is ‘ROOT’ Directory of your local hosting.
  • Extract all files from the Magento 2 zip file to directory.
  • Create new database from Dashboard -> PhpMyAdmin.
  • Before install Magento first check your `php.ini` file in EasyPHP_FOLDER/eds-binaries/php/PHP_VERSION and remove ";" for active below extensions.
    • mcrypt
    • mhash
    • mbstring
    • Curl
    • simpleXML
    • gd
    • xsl
    • soap
    • openssl
    For example change ";extension=php_curl.dll" to "extension=php_curl.dll"
  •  Now open magento 2 directory folder in your browser "http://127.0.0.1:8888/MAGENTO2/"(server Url according to you set in EasyPHP dashboard)
  • Start Magento Installation and check 'Readiness'. If you got any error then check `php. ini` file PHP version and restart the Apache serve.
    • If you got Curl starting Error than copy `libssh2.dll` from php directory to `Window/system` directory
    • Copy all `icu*.dll` files from eds-binaries/php/PHP_VERSION` to `eds-binaries/httpserver/APACHEVERSION`
    • If you got any other extension error than copy related dll file from `eds-binaries/php/PHP_VERSION` to `eds-binaries/httpserver/APACHEVERSION`
  • Than set database details and store configuration and complete installation process.
  • Now open command prompt using window+R or search `cmd`.
  • Enter Magento installation directory in CMD and run below code `composer install`
  • Perform installing static content to deploy on you Magento shop by typing `php bin/magento setup:static-content:deploy` (Or you can use `php -dmemory_limit=6G bin/magento setup:static-content:deploy`)
  • Clean Magento 2 cache by typing ‘php bin/magento cache:flush’ in the CMD
  • Re-index Magento Static Blocks by typing `php bin/magento indexer:reindex`.

Now your magento 2 working complete on your installation URL http://127.0.0.1:8888/MAGENTO2/
If you got any error or fetch any problem during installation than you can re-install it using below process.

Sunday, October 23, 2016

Add Order Details Column in Customer Grid Magento


Many Magento website used for e-commerce website and for store owner customers are most important for any website. so they check all customer details who is online and who purchase maximum orders from the website. So store admin analysis stores customer for any offers or selling orders.
So here display basic code that you can overwrite exiting core block grid using new extension or you can directly customize admin customer grid using some code display here.
First open 'app/code/core/Mage/Adminhtml/Block/Customer/Grid.php' file or you can copy that file on local pool and than customize it. find function `_prepareCollection()` change code as below.

protected function _prepareCollection()
{
        $collection = Mage::getResourceModel('customer/customer_collection')
            ->addNameToSelect()
            ->addAttributeToSelect('email')
            ->addAttributeToSelect('created_at')
            ->addAttributeToSelect('group_id')
            ->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
            ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
            ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
            ->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
            ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');
  //Add below code for last order date
        $sql ='SELECT MAX(o.created_at) FROM '.Mage::getSingleton('core/resource')->getTableName('sales/order').' AS o WHERE o.customer_id = e.entity_id';
  $expr = new Zend_Db_Expr('(' . $sql . ')');
  $collection->getSelect()->from(null, array('last_order_date'=>$expr));
  //Add below code for count total orders
  $sql ='SELECT COUNT(*) FROM '.Mage::getSingleton('core/resource')->getTableName('sales/order').' AS o WHERE o.customer_id = e.entity_id';
  $expr = new Zend_Db_Expr('(' . $sql . ')');
  $collection->getSelect()->from(null, array('orders_count'=>$expr));
  $this->setCollection($collection);
        return parent::_prepareCollection();
}

As below code you get the last order date and total customers orders from order table. In Magento `sales_flat_order` there is column for `customer_id` which is stored register customer id of that store.
Add below two fields in function `_prepareColumns ()` where you want to display fields.

$this->addColumn('last_order_date', array(
 'header'    => Mage::helper('customer')->__('Last Order Date'),
 'type'      => 'datetime',
 'align'     => 'center',
 'index'     => 'last_order_date',
 'filter'    => false, //For remove search column
 'sortable'  => false, //For remove sorting column
));
$this->addColumn('orders_count', array(
 'header'    => Mage::helper('customer')->__('Orders Count'),
 'index'     => 'orders_count',
 'type'  => 'number',
));
In below code you can use any `type` for show in grid and if you remove sorting and filtering functionality for this column than it's OK but if you want to short and filter of below column than you must create custom grid filter as below.

$this->addColumn('last_order_date', array(
 'header'    => Mage::helper('customer')->__('Last Order Date'),
 'type'      => 'datetime',
 'align'     => 'center',
 'index'     => 'last_order_date',
 'filter_condition_callback' => array($this, '_orderfiltersearch')
));
Than create new function on same file for search call callback function as below.

public function _orderfiltersearch($collection, $column)
{
 if (!$value = $column->getFilter()->getValue()){
  return $this;
 }
 if($value['orig_from'] == '' || $value['orig_to'] == ''){
  return $this;
 }
 $fromDate = date('Y-m-d H:i:s', strtotime($value['orig_from']));
 $toDate = date('Y-m-d H:i:s', strtotime($value['orig_to']));
 $orders = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('created_at', array('from'=>$fromDate, 'to'=>$toDate));
 foreach($orders as $order)
 {
  $customerids[] = $order->getCustomerId();
 }
 $customerids = array_unique($customerids);
 $this->getCollection()->addFieldToFilter('entity_id', array('in' => $customerids));
 return;
}
You can use same search callback function for, finding others with getting order collection from the database according to customer id and use that id in `addFieldToFilter` for filter Magento collection.

Thursday, October 13, 2016

Remove Review Page in Magento PayPal Express Checkout


Magento is most used PHP based e-commerce platform which is used for create shopping website and for that payment system is most important part of any e-commerce system. Magento also provide some most used payment methods like PayPal, Authorized, COD, Check payment also also many extensions available for easy implement new payment method in website.
When you use the PayPal payment method than mostly used 'PayPal Express Checkout' for fast, secure and easy checkout. but after complete PayPal checkout it's redirecting to Magento payment review page.
If you use 'PayPal standard checkout' them after complete payment from PayPal, it's redirecting to a checkout success page and if your Magento version is greater than 1.9 than you can skin review page from the admin panel by set `Skip Order Review Step` YES.
If your Magento version is less than 1.9 than you can skin that page after changes on below files.
First open `app\code\core\Mage\Paypal\Model\Config.php` file and changes below in getExpressCheckoutStartUrl function from

public function getExpressCheckoutStartUrl($token)
{
    return $this->getPaypalUrl(array(
        'cmd'   => '_express-checkout',
        'token' => $token,
    ));
}
to
public function getExpressCheckoutStartUrl($token)
{
    return $this->getPaypalUrl(array(
        'cmd'   => '_express-checkout',
        'useraction' => 'commit',
        'token' => $token,
    ));
}
 
Than create observe event in global scope as below in any custom extension's `confix.xml` file or create own.
 
<controller_action_predispatch_paypal_express_review>
  <observers>
    <newsinfo_removepaypalexpressreview>
      <type>singleton</type>
      <class>Newsinfo_Modulename_Model_Observer</class>
      <method>controllerPaypalExpressReview</method>
    </newsinfo_removepaypalexpressreview>
  </observers>
</controller_action_predispatch_paypal_express_review>
<controller_action_predispatch_paypal_express_placeOrder>
  <observers>
    <newsinfo_removepaypalexpressreview>
      <type>singleton</type>
      <class>Newsinfo_Modulename_Model_Observer</class>
      <method>controllerPaypalExpressPlaceOrder</method>
    </newsinfo_removepaypalexpressreview>
  </observers>
</controller_action_predispatch_paypal_express_placeOrder>

Than create 'Observer.php' file in Model folder and add below code(You put below functions in exiting Observe.php file)

class Newsinfo_Modulename_Model_Observer //Set Class According to Your Extension
{
 public function controllerPaypalExpressReview(Varien_Event_Observer $observer)
 {
  Mage::app()->getResponse()->setRedirect(Mage::getUrl('*/*/placeOrder'));
 }
 public function controllerPaypalExpressPlaceOrder(Varien_Event_Observer $observer)
 {
  $agreements = Mage::helper('checkout')->getRequiredAgreementIds();
  $postagreements = array_fill_keys($agreements, 1);
  Mage::app()->getRequest()->setPost('agreement', $postagreements);
 }
}

Sunday, August 21, 2016

Solve WIFI Problem in Windows 10

Many users fetch WI-Fi problem in window 10 after upgrade from window to older version or install new window 10.So here describe some steps for solve WI-Fi problem on window 10.
If you are looking for any solution from below
  • No WiFi is available on my computer after Windows 10 update.
  • Windows 10 WI-Fi is not working.
  • How to connect Window 10 laptop with WI-Fi.
  • WI-Fi working solve after updating window 10.
  • Window 10 WI-Fi limited connectivity.
  • No WiFi adapter found after Windows 10 upgrade.

First why this occurs after updating window 10. It's because of WiFi driver not installed on window or old driver not compatible with Windows 10

Here below describe some steps for all users so apply any steps and than restart your PC and check again if not solve than check next step.
  1.  There are many software available in site like as "Driver Talent" to find missing driver in system but all software are paid for installed driver.
  2.  Run command prompt as administrator from Window+R key and write following command
    reg delete HKCR\CLSID\{988248f3-a1ad-49bf-9170-676cbbc36ba3} /va /f
    and than press YES and enter netcfg -v -u dni_dne command.
  3.  Press "Windows Key + S" and choose "Power Options". Locate the current plan of your computer ("Balanced") and click "Change plan settings"
    Click "Change advanced power settings"click "Apply", and then click "OK" choose "Maximum Performance" under "Wireless Adapter settings".
  4.  Open command prompt with admin rights and open below command
    netsh int ip reset 
  5. Open Network and Sharing Center from Control Panel than click on change adapter settings.Right click on WiFi and click properties than click on Configure Button.
    Navigate to last tab Power Management and select checkbox Allow the computer to turn off this device to save power click on OK
  6. Resetting Tcp/Ip Auto-tuning.Open command prompt as administrator from Window+R key.Type below commands one by one
    netsh int tcp set heuristics disabled
    netsh int tcp set global autotuninglevel=disabled
    netsh int tcp set global rss=enabled
  7. Open Device Manager from control panel or directly search from task bar.than click on Network Adapters and find your wireless driver
    Right click on it and choose first option Update Driver Software. Find driver from internet and install it.
  8. Find your laptop model driver from online and install it on PC.Open Device Manager and choose WiFi Driver from Network Adapter than click on "Browse my computer for driver software"
    than click on Let me pick from my computer.check show compatible hardware.select driver and click on next

Saturday, May 14, 2016

Delete all Sample Data in Magento 1.x

Magento used ORM structure for developing e-commerce website so it's faster and easier to fetch and manage data from database. so Magento also stores some unnecessary data which is not much useful for store so you can remove that from the database. Here to display the SQL queries that run in your mysql database. It's only remove junk data not effects on the site..
Here below also provide some other SQL queries for deleting products, orders and users. In below all examples use Magento database without any table prefix.If your database table has any prefix than writes table query as prefix..

Remove Magento junk and unnecessary data from Database

SET FOREIGN_KEY_CHECKS = 0; //Use for ignore foreign key if any.
-- Compare
TRUNCATE `catalog_compare_item`;

-- Wishlist
TRUNCATE `wishlist_item_option`;
TRUNCATE `wishlist_item`;
TRUNCATE `wishlist`;

-- Admin notification
TRUNCATE `adminnotification_inbox`;

-- Dataflow
TRUNCATE `dataflow_batch_export`;
TRUNCATE `dataflow_batch_import`;

-- Report
TRUNCATE `report_event`;
TRUNCATE `report_viewed_product_index`;
TRUNCATE `report_compared_product_index`;

-- Search
TRUNCATE `catalogsearch_fulltext`;
TRUNCATE `catalogsearch_query`;
TRUNCATE `catalogsearch_result`;

-- FLAT CATALOG (EDIT TABLE NAMES)
TRUNCATE `catalog_category_flat_store_1`;
TRUNCATE `catalog_product_flat_1`;

-- Logs
TRUNCATE `log_customer`;
TRUNCATE `log_quote`;
TRUNCATE `log_summary`;
TRUNCATE `log_summary_type`;
TRUNCATE `log_url`;
TRUNCATE `log_url_info`;
TRUNCATE `log_visitor`;
TRUNCATE `log_visitor_info`;
TRUNCATE `log_visitor_online`;

-- Session
TRUNCATE `core_session`;
TRUNCATE `api_session`;

-- Cache
TRUNCATE `core_cache`;
TRUNCATE `core_cache_option`;
TRUNCATE `core_cache_tag`;

-- Index
TRUNCATE `index_event`;
TRUNCATE `index_process_event`;

-- Captcha
TRUNCATE `captcha_log`;

-- Sent to friend
TRUNCATE `sendfriend_log`;

-- Temp and index tables
TRUNCATE `catalog_category_anc_categs_index_tmp`;
TRUNCATE `catalog_category_anc_products_index_tmp`;
TRUNCATE `catalog_category_product_index_enbl_tmp`;
TRUNCATE `catalog_product_index_eav_decimal_tmp`;
TRUNCATE `catalog_product_index_eav_tmp`;
TRUNCATE `catalog_product_index_price_bundle_opt_tmp`;
TRUNCATE `catalog_product_index_price_bundle_sel_tmp`;
TRUNCATE `catalog_product_index_price_bundle_tmp`;
TRUNCATE `catalog_product_index_price_cfg_opt_agr_tmp`;
TRUNCATE `catalog_product_index_price_cfg_opt_tmp`;
TRUNCATE `catalog_product_index_price_downlod_tmp`;
TRUNCATE `catalog_product_index_price_final_tmp`;
TRUNCATE `catalog_product_index_price_opt_agr_tmp`;
TRUNCATE `catalog_product_index_price_opt_tmp`;
TRUNCATE `catalog_product_index_price_tmp`;
TRUNCATE `cataloginventory_stock_status_tmp`;
TRUNCATE `catalog_category_anc_categs_index_idx`;
TRUNCATE `catalog_category_anc_products_index_idx`;
TRUNCATE `catalog_category_product_index_enbl_idx`;
TRUNCATE `catalog_category_product_index_idx`;
TRUNCATE `catalog_product_index_eav_decimal_idx`;
TRUNCATE `catalog_product_index_eav_idx`;
TRUNCATE `catalog_product_index_price_bundle_idx`;
TRUNCATE `catalog_product_index_price_bundle_opt_idx`;
TRUNCATE `catalog_product_index_price_bundle_sel_idx`;
TRUNCATE `catalog_product_index_price_cfg_opt_agr_idx`;
TRUNCATE `catalog_product_index_price_cfg_opt_idx`;
TRUNCATE `catalog_product_index_price_downlod_idx`;
TRUNCATE `catalog_product_index_price_final_idx`;
TRUNCATE `catalog_product_index_price_idx`;
TRUNCATE `catalog_product_index_price_opt_agr_idx`;
TRUNCATE `catalog_product_index_price_opt_idx`;
TRUNCATE `cataloginventory_stock_status_idx`;
 
SET FOREIGN_KEY_CHECKS = 1; 

Remove Magento all 'Products' from Database


SET FOREIGN_KEY_CHECKS = 0; 

TRUNCATE TABLE `catalog_product_bundle_option`;
TRUNCATE TABLE `catalog_product_bundle_option_value`;
TRUNCATE TABLE `catalog_product_bundle_selection`;
TRUNCATE TABLE `catalog_product_entity_datetime`;
TRUNCATE TABLE `catalog_product_entity_decimal`;
TRUNCATE TABLE `catalog_product_entity_gallery`;
TRUNCATE TABLE `catalog_product_entity_int`;
TRUNCATE TABLE `catalog_product_entity_media_gallery`;
TRUNCATE TABLE `catalog_product_entity_media_gallery_value`;
TRUNCATE TABLE `catalog_product_entity_text`;
TRUNCATE TABLE `catalog_product_entity_tier_price`;
TRUNCATE TABLE `catalog_product_entity_varchar`;
TRUNCATE TABLE `catalog_product_link`;
TRUNCATE TABLE `catalog_product_link_attribute`;
TRUNCATE TABLE `catalog_product_link_attribute_decimal`;
TRUNCATE TABLE `catalog_product_link_attribute_int`;
TRUNCATE TABLE `catalog_product_link_attribute_varchar`;
TRUNCATE TABLE `catalog_product_link_type`;
TRUNCATE TABLE `catalog_product_option`;
TRUNCATE TABLE `catalog_product_option_price`;
TRUNCATE TABLE `catalog_product_option_title`;
TRUNCATE TABLE `catalog_product_option_type_price`;
TRUNCATE TABLE `catalog_product_option_type_title`;
TRUNCATE TABLE `catalog_product_option_type_value`;
TRUNCATE TABLE `catalog_product_super_attribute_label`;
TRUNCATE TABLE `catalog_product_super_attribute_pricing`;
TRUNCATE TABLE `catalog_product_super_attribute`;
TRUNCATE TABLE `catalog_product_super_link`;
TRUNCATE TABLE `catalog_product_enabled_index`;
TRUNCATE TABLE `catalog_product_website`;
TRUNCATE TABLE `catalog_category_product_index`;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `cataloginventory_stock_item`;
TRUNCATE TABLE `cataloginventory_stock_status`;
TRUNCATE TABLE `cataloginventory_stock`;
TRUNCATE TABLE `rating_option_vote`; 
TRUNCATE TABLE `rating_option_vote_aggregated`;
TRUNCATE TABLE `review`; 
TRUNCATE TABLE `review_detail`; 
TRUNCATE TABLE `review_entity_summary`; 
TRUNCATE TABLE `review_store`;

INSERT  INTO `catalog_product_link_type`(`link_type_id`,`code`) VALUES (1,'relation'),(2,'bundle'),(3,'super'),(4,'up_sell'),(5,'cross_sell');
INSERT  INTO `catalog_product_link_attribute`(`product_link_attribute_id`,`link_type_id`,`product_link_attribute_code`,`data_type`) VALUES (1,2,'qty','decimal'),(2,1,'position','int'),(3,4,'position','int'),(4,5,'position','int'),(6,1,'qty','decimal'),(7,3,'position','int'),(8,3,'qty','decimal');
INSERT  INTO `cataloginventory_stock`(`stock_id`,`stock_name`) VALUES (1,'Default');
TRUNCATE TABLE `catalog_product_entity`;

SET FOREIGN_KEY_CHECKS = 1;

Remove Magento all 'Categories' from Database

SET FOREIGN_KEY_CHECKS = 0; 

TRUNCATE TABLE `catalog_category_entity`;
TRUNCATE TABLE `catalog_category_entity_datetime`;
TRUNCATE TABLE `catalog_category_entity_decimal`;
TRUNCATE TABLE `catalog_category_entity_int`;
TRUNCATE TABLE `catalog_category_entity_text`;
TRUNCATE TABLE `catalog_category_entity_varchar`;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `catalog_category_product_index`;

INSERT  INTO `catalog_category_entity`(`entity_id`,`entity_type_id`,`attribute_set_id`,`parent_id`,`created_at`,`updated_at`,`path`,`POSITION`,`level`,`children_count`) VALUES (1,3,0,0,'0000-00-00 00:00:00','2009-02-20 00:25:34','1',1,0,1),(2,3,3,0,'2009-02-20 00:25:34','2009-02-20 00:25:34','1/2',1,1,0);
INSERT  INTO `catalog_category_entity_int`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) VALUES (1,3,32,0,2,1),(2,3,32,1,2,1);
INSERT  INTO `catalog_category_entity_varchar`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) VALUES (1,3,31,0,1,'Root Catalog'),(2,3,33,0,1,'root-catalog'),(3,3,31,0,2,'Default Category'),(4,3,39,0,2,'PRODUCTS'),(5,3,33,0,2,'default-category');

SET FOREIGN_KEY_CHECKS = 1;

Remove Magento all 'Customers' from Database

SET FOREIGN_KEY_CHECKS = 0; 

TRUNCATE `customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;
TRUNCATE `customer_address_entity_decimal`;
TRUNCATE `customer_address_entity_int`;
TRUNCATE `customer_address_entity_text`;
TRUNCATE `customer_address_entity_varchar`;
TRUNCATE `customer_entity`;
TRUNCATE `customer_entity_datetime`;
TRUNCATE `customer_entity_decimal`;
TRUNCATE `customer_entity_int`;
TRUNCATE `customer_entity_text`;
TRUNCATE `customer_entity_varchar`;

SET FOREIGN_KEY_CHECKS = 1;

Remove Magento all 'Orders' from Database

SET FOREIGN_KEY_CHECKS = 0; 

TRUNCATE `sales_order`;
TRUNCATE `sales_order_datetime`;
TRUNCATE `sales_order_decimal`;
TRUNCATE `sales_order_entity`;
TRUNCATE `sales_order_entity_datetime`;
TRUNCATE `sales_order_entity_decimal`;
TRUNCATE `sales_order_entity_int`;
TRUNCATE `sales_order_entity_text`;
TRUNCATE `sales_order_entity_varchar`;
TRUNCATE `sales_order_int`;
TRUNCATE `sales_order_text`;
TRUNCATE `sales_order_varchar`;
TRUNCATE `sales_flat_quote`;
TRUNCATE `sales_flat_quote_address`;
TRUNCATE `sales_flat_quote_address_item`;
TRUNCATE `sales_flat_quote_item`;
TRUNCATE `sales_flat_quote_item_option`;
TRUNCATE `sales_flat_order_item`;

SET FOREIGN_KEY_CHECKS = 1;

Tuesday, May 10, 2016

Install ElasticSearch on Window(wamp) Server

Elasticsearch is an open-source search server based on Lucene. It provides a broadly-distributed, readily-scalable, multitenant-capable full-text search engine with an HTTP web interface as JSON schema documents. Elasticsearch can power extremely fast searches that support your data discovery applications.
ElasticSearch  is mostly use for searching functionality implementation first it's store huge data as local storage and than after give data according to our search as JSON format.It's easy to use so mostly people use this for faster search functionality.
For installation of ElasticSearch with PHP based application than it's some complicated for installation in window server. Here describe simple and basic steps of the installation process of ElasticSearch.
  • First download ElasticSearch latest version from Here
  • Than after download Zip or Tar file package.
  • First check in your system java is installed or not.for that open cmd and write `java -version` that display version if installed.
  • If not installed than find latest version of Java from Here and install into your system.
  • Set new "Environment Variables" path as 'JAVA_HOME' and path 'C:\Program Files\Java\jre1.8.0_77' (Where you install java).
  • Extract all files of ElasticSearch downloaded from site to system drive.
  • Now open 'elasticsearch.bat' file in 'C:\elasticsearch-2.3.2\bin\' directory.
  • If there is any error than it's display otherwise it's execute all process. 
  • After complete all process don't close it.Now open http://localhost:9200
  • It's display  ElasticSearch information.
For use ElasticSearch in PHP based application download from Here and follow steps describe there and also describe basic exampled for how to use.Install elastic search in PHP through Composer.
If you want to install  ElasticSearch on live server than follow Here.and must set `elasticsearch.yml` file(in C:\elasticsearch-2.3.2\config\ folder) variable according to server.

Saturday, May 7, 2016

Set Custom Order Increment id in Magento

Magento is most uses PHP based platform for e-commerce website. In Magento website adds products from admin panel and in front any user buy that product and after complete payment method or check out it's generated new order in the Magento database with unique order id.In default Magento order id(as increment id) starts from '100000001' and then after increment one for the next order.
Magento all orders saves in sales_flat_order table with unique entity_id as primary key. so you can get order information by order entity id or increment value. In order table entity_id is the primary key so you can't modify it. but you can change the order increment id that displays also in fronted.
When you want to develop a website and want to change the increment id that from a database you can change the order increment id prefix only. for that use below SQL query in your MySql command.


UPDATE `eav_entity_store` SET `increment_prefix` = 'NEWS-' WHERE `entity_store_id` = '1' AND `entity_type_id` = '5'

Here you can add own prefix in `increment_prefix` column.`entity_store_id` is your store id and `entity_type_id` is order type(different for invoice,shipment).
Sometimes you want to change the order increment id not only prefix or want to add a different prefix using some condition then you must change in core Magento files with creating a simple module as below.
First create new Newsinfo_Order.xml file in app/etc/modules/ as below.

<config>
  <modules>
    <newsinfo_order>
      <active>true</active>
      <codepool>local</codepool>
    </newsinfo_order>
  </modules>
</config>
 
Than create new config.xml file in app/code/local/Newsinfo/Order/etc/ as below.

<?xml version="1.0"?>
<config>
  <modules>
    <Newsinfo_Order>
      <version>1.0.0</version>
    </Newsinfo_Order>
  </modules>
  <global>
    <models>
      <sales>
        <rewrite>
          <order>Newsinfo_Order_Model_Order</order>
        </rewrite>
      </sales>
    </models>
  </global>
</config>
 
Here in below file just rewrite magento 'Mage_Sales_Model_Order' model with custom extension or you can directly changes in core file from app/code/core/Mage/Sales/Model/Order.php
Than after create new model file in app\code\local\Newsinfo\Order\Model named Order.php with below code. 

class Newsinfo_Order_Model_Order extends Mage_Sales_Model_Order 
{
 protected function _beforeSave()
 {
  parent::_beforeSave();
  $this->_checkState();
  $this->setIncrementId('NEWSINFO-'.$this->getIncrementId());
  return $this;
 }
}
Here below function you can change your order prefix and also add some condition for different prefix or dynamic prefix or order increment id.order increment id is unique value so here must use unique value otherwise order not created.

Add Layered Navigation to Advance Search Result Page in Magento


Magento Layered Navigation is used for search products according to categorize, price or different attribute which are assigned from Magento admin panel. So when users want to product by color, size than they can using Layered Navigation.
In Magento Layered Navigation display in left side of each category listing page if there are some products in category. It's also display in the left side column in search results page. Layered Navigation is auto generated according to a listing of products. if all products on listings attribute price and category are same then it's not displayed.
You can call layer navigation block on category listing page using catalog.xml file with below code.

<reference name="left">
  <block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"/>
</reference>

That's define according to anchor and non anchor category in Magento.But it's not display in advance search results.so here describe simple way for display Layered Navigation in advance search result page by modifying core Magento file or you can rewrite that using custom module.
Change prepareProductCollection function as below in app/code/core/Mage/CatalogSearch/Model/Layer.php file.

public function prepareProductCollection($collection)
{
    if(Mage::helper('catalogsearch')->getQuery()->getQueryText())
    {
        $collection->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
        ->addSearchFilter(Mage::helper('catalogsearch')->getQuery()->getQueryText())
        ->setStore(Mage::app()->getStore())
        ->addMinimalPrice()
        ->addFinalPrice()
        ->addTaxPercents()
        ->addStoreFilter()
        ->addUrlRewrite();
    }
    else
    {
        $collection->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes());
        $attributes = Mage::getSingleton('catalog/product')->getAttributes();
        foreach($attributes as $attribute)
        {
            $attribute_code = $attribute->getAttributeCode();
            if($attribute_code == "price")
            continue;
            if (empty($_REQUEST[$attribute_code])){continue;}
            if(!empty($_REQUEST[$attribute_code]) && is_array($_REQUEST[$attribute_code]))
                $collection->addAttributeToFilter($attribute_code, array('in' => $_REQUEST[$attribute_code]));
            else
            if(!empty($_REQUEST[$attribute_code]))
            $collection->addAttributeToFilter($attribute_code, array('like' => "%" . $_REQUEST[$attribute_code] . "%"));
        }
        $collection->setStore(Mage::app()->getStore())
        ->addMinimalPrice()
        ->addFinalPrice()
        ->addTaxPercents()
        ->addStoreFilter()
        ->addUrlRewrite();
        Mage::getSingleton('catalogsearch/advanced')->prepareProductCollection($collection);    
    }
    Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
    Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
    return $this;
}

Than after change getProductCollection and getSearchCriterias function as below in app/code/core/Mage/CatalogSearch/Model/Advanced.php file.

public function getProductCollection()
{
    if (is_null($this->_productCollection)) {
        $this->_productCollection = Mage::getResourceModel('catalogsearch/advanced_collection')
        ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
        ->addMinimalPrice()
        ->addStoreFilter();
        Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($this->_productCollection);
        Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($this->_productCollection);
        if(isset($_GET['cat']) && is_numeric($_GET['cat']))
        $this->_productCollection->addCategoryFilter(Mage::getModel('catalog/category')->load($_GET['cat']),true);
    }
    return $this->_productCollection;
}
public function getSearchCriterias()
{
    $search = $this->_searchCriterias;
    if(isset($_GET['cat']) && is_numeric($_GET['cat'])){
        $category = Mage::getModel('catalog/category')->load($_GET['cat']);
        $search[] = array('name'=>'Category','value'=>$category->getName());
    }
    return $search;
}

Here in below layer navigation is prepared for advance search product collection now must display that layer navigation using theme xml file so edit your theme's catalogsearch.xml file and add below code in <catalogsearch_advanced_result> tag.
 
<reference name="left">
  <block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"/>
</reference>
 
here add that navigation in left sidebar you can put in content or right side according to theme content or template.

Friday, April 22, 2016

Solve 'Numeric value out of range: 1690' Error in Magento

Magento is mostly used e-commerce platform based on PHP. So when you work on this platform as a developer or site owner than it's hard to fetch some complicated error occur in Magento admin panel or front.
In Magento admin panel when you try to delete any product, customer or order than some times it's display 'SQLSTATE [22003]: Numeric value out of range: 1690' and product or customer not deleted.This error because of table attributes not supported data value in MySql database. This error because of table attribute not supported data value in MySql database. This error because of some big value store in databases and that structure not support that value.
So here is a simple way for solving this error. In Magento all table connect to each other with foreign key relation so this error, mostly on the order table so you just change as below or order table.
  • Login to your database using PhpMyadmin in localhost or via cPanel.
  • Select Magento database (If you don't know than find in `local.xml` file in app/etc/).
  • First tack backup of complete database before change anything(using export functionality) so revert back in case of any problem.
  • Select `sales_flat_quote` table.(If your db have prefix than find table according to that)
  • Click on `Structure` tab from top.
  • Click on Change/Edit row `items_count`
  • In `Attributes` drop down change value from `UNSIGNED` to the very top value which is blank ‘(no value)’
  • Click on save for change table structure.
  • Now clear all Magento caches and try to delete it's worked.