Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Chapter 1 - Introduction

1.1 Introduction to Internship


An internship is a hands-on educational opportunity aligned with a student's field of study or
career aspirations. It aims to bridge theory and practice, allowing students to apply classroom
knowledge in real-world scenarios. This experience fosters career exploration, skill acquisition,
and personal development. For employers, internships bring fresh perspectives, potential talent,
and the chance to groom future employees. Each internship is customized to suit students'
interests, and participants actively seek suitable placements. By linking coursework to practical
contexts, interns gain valuable skills, enhancing their employability upon graduation.

As I was assigned an internship for the partial fulfillment of the Bachelor of Science in
Computer Science and Information Technology (BSc. CSIT) degree awarded by Tribhuvan
University(TU), I successfully completed my internship at Magento360 from 8th May, 2023 to
8th Aug, 2023 as a Backend Developer.

1.2 Objectives of Internship


The BSc CSIT internship program is designed to develop professional skills among students and
help them become familiar with the working environment The main objectives of the internship
program can be listed as follows:
● To immerse in a professional setting
● To cultivate novel skills
● To construct a future-ready resume
● To gauge compatibility with a chosen career path
● To assimilate organizational norms and decorum
● To grasp the practical essence of a profession
● To foster connections with mentors
● To engage in a career trial run
● To foster a network within the industry

1
1.3 Introduction to Project
Online shopping is a web-based platform developed to cater to the specific needs of enhancing
the digital shopping experience. Online shopping systems empower users to manage their
shopping activities and transactions in a streamlined manner, ensuring efficiency and
convenience throughout the process. When considering the diverse facets of the online shopping
landscape, it becomes evident that a robust system is indispensable.
An online shopping system is a comprehensive solution that consolidates product listings,
customer interactions, and administrative tasks within a single software, automating various
aspects of the shopping journey. The entire spectrum of online shopping, from browsing products
to making purchases, is facilitated through this software. The core objective of employing an
online shopping system is to eliminate the need for physical paperwork, thereby enhancing the
entire shopping process.
Online shopping revolutionizes the retail experience by enabling customers to browse,
select, and purchase products from the comfort of their homes. It provides a vast array of
products and services, connecting consumers with a global marketplace. Online shopping
platforms offer personalized recommendations, secure payment gateways, and convenient
delivery options, enhancing customer satisfaction. This digital approach transcends geographical
barriers, allowing businesses to reach a wider audience and customers to access a diverse range
of goods. Ultimately, online shopping reshapes traditional commerce, offering efficiency, choice,
and convenience.

Fig 1: System Architecture of Online shopping

2
PHP
Hypertext preprocessor, an open source, server-side, HTML embedded scripting language
used to create dynamic Web pages. In an HTML document, PHP script (similar syntax to that
of Perl or C) is enclosed within special PHP tags. PHP is specially designed to develop
websites which are collections of different pages. The syntax of PHP is similar to syntax of
C. PHP is a widely-used, open source scripting language used for scripts that are executed on
the server and it is freeware. It is a server-side scripting language used to develop attractive
and dynamic web pages’ is a widely- used, free, and efficient alternative to competitors such
as Microsoft’s ASP. We make available a database used with PHP is MYSQL – which is also
an open source which is an added advantage.

HTML
The HTML stands for Hyper Text Markup Language. Firstly, html is short for hypertext
markup language that may sound scary, but it simple means it is a language for describing
web pages using ordinary text .html is not a complex programming language.HTML is used
to create a website which is a collection of different pages. HTML (Hyper Text Markup
Language) is a basic language that is used for defining web pages and consists of elements
(marked with tags) and the content. HTML is not a program language. HTML documents are
accessed using browsers like Mozilla Firefox, Google Chrome, and Safari etc.

3
CSS
Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to
simplify the process of making web pages presentable. CSS handles the look and feel part of a
web page. Using CSS, you can control the color of the text, the style of fonts, the spacing between
paragraphs, how columns are sized and laid out, what background images or colors are used,
layout designs, and variations in display for different devices and screen sizes as well as a variety
of other effects.

JavaScript
JavaScript, often abbreviated as JS, is a programming language that is one of the core
technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites
use JavaScript on the client side for webpage behavior, often incorporating third-party libraries.
All major web browsers have a dedicated JavaScript engine to execute the code on users' devices.

MySQL
MySQL is a widely used relational database management system (RDBMS). MySQL is free and
open-source. MySQL is ideal for both small and large applications. A relational database
organizes data into one or more data tables in which data may be related to each other; these
relations help structure the data. SQL is a language programmers use to create, modify and extract
data from the relational database, as well as control user access to the database.

NGINX SERVER
Nginx is the next open source web server after Apache. It comprises IMAP/POP3 proxy server.
The significant features offered by Nginx are high performance, stability, simple configuration
and low resource usage. No threads are used to handle the requests by Nginx, instead a highly
scalable event-driven architecture that uses a small and predictable amount of memory under load
is utilized.

4
Magento 2
Magento 2 is a powerful and popular open-source e-commerce platform that serves as the successor
to Magento 1. It offers robust features and flexibility, enabling businesses to create and manage online
stores with ease. With an intuitive admin panel, customizable themes, and a vast extension
marketplace, Magento 2 empowers merchants to tailor their online presence to specific needs. Its
scalability ensures seamless growth for businesses of all sizes, while its modular architecture
enhances performance and loading speeds. As a leading e-commerce solution, M2 remains a top
choice for businesses seeking to establish a strong and reliable online presence.

User Interface
The user interface is the main window that appears in the application window and the user interacts
with the application through it when the project runs. It consists of various elements with which the
user can interact and control the application.
The first basic element of the user interface is the form. This is the window which acts as a
container for all the elements of the interface. The elements in the user interface are common to all
windows applications and are available within the tool box. They are listed below:

Element Description Examples

Checkboxes allow the user to select one or more


options from a set. It is usually best to present
checkboxes in a vertical list. More than one column is
Checkboxes
acceptable as well if the list is long enough that it might
require scrolling or if comparison of terms might be
necessary.

Radio buttons are used to allow users to select one item


Radio buttons
at a time.

Dropdown lists Dropdown lists allow users to select one item at a time,
similarly to radio buttons, but are more compact
allowing you to save space. Consider adding text to the
field, such as ‘Select one’ to help the user recognize the 

necessary action.

5
List boxes List boxes, like checkboxes, allow users to select
multiple items at a time, but are more compact and can
support a longer list of options if needed.

Buttons A button indicates an action upon touch and is typically


labeled using text, an icon, or both.

Dropdown Button The dropdown button consists of a button that when


clicked displays a drop-down list of mutually exclusive
items.

Element Description Examples

Text fields Text fields allow users to enter text. It can allow either
a single line or multiple lines of text.

Date and time A date picker allows users to select a date and/or time.
pickers
By using the picker, the information is consistently
formatted and input into the system.

1.4 Problem Statement


The current manual system involves extensive paperwork. Managing sales and services through
manual records is time-consuming. As databases grow, maintaining them manually becomes
increasingly challenging. It requires significant space due to bulky file cabinets, occupying
valuable office real estate meant for record storage. Retrieving records of past patients becomes
arduous. Security concerns arise, as the system lacks robust protection against unauthorized
alterations. The existing system also lacks comprehensive details about available doctors. Thus,
we present the "Online Shopping System," which tackles these challenges and streamlines the
entire shopping process, making record-keeping more efficient and accessible.

6
1.5 Objectives of project
The goal of this study is to create an Online Shopping System that addresses data-related
challenges. The project's objectives include:
● Managing comprehensive product information.
● Enhancing communication between buyers and the platform.
● Increasing operational efficiency and establishing a seamless process.
● Ensuring effortless access to product details.
● Implementing robust security measures.
● Tracking customer contact information.
● Managing order and delivery schedules.
● Safeguarding payment and transaction details.
● Allow esewa and khalti for digital payment

1.6 Scope and Limitation


1.6.1 Scope
● Powered by a robust database and a web-centric structure.
● Offers a user-friendly interface catering to diverse services.
● Enhances efficiency by minimizing human inaccuracies.
● Mitigates the potential for errors.
● Prioritizes data security and accurate retrieval.
● Cost-effective and effortlessly maintainable.
● Provides swift access to accurate patient records and histories.
● Elevates the quality of patient care.
● Streamlines documentation tasks.

1.6.2 Limitation
● Problems may occur in the system sometimes.
● Security is another limitation in this system.
● Occasional system glitches may arise.
● Our system is exclusively web-oriented.
● Security stands as another inherent constraint within the system.

7
2.1 Introduction to Organization
Magento360 has the right experience, skills, and people that deliver high-class Magento &
eCommerce experiences. Magento360 aims to bring revolution in the tech-world by offering best
quality softwares at the lowest price range. It works on bringing your Business online ,
developing user-friendly customized ecommerce websites.

Table 1.1 Contact detail of company

Company Name Future Commerce Solutions(Magento360)

Address Sachin Tower, Jodhpur Ahmedabad, India

Pincode 380015

Contact +919636282862

Mail info@magento360.com

Website www.magento360.com

2.2 Organizational Hierarchy


Magento360 is a powerhouse of expertise, boasting a team equipped with unparalleled skills to
craft exceptional Magento and eCommerce solutions. With a laser focus on delivering top-tier
experiences, Magento360 stands poised to reshape the technological landscape. Rooted in its
vision for innovation, the company strives to democratize access to premium software, setting a
new benchmark for affordability. Specializing in ushering businesses into the digital realm,
Magento360 excels in tailoring user-centric, bespoke eCommerce platforms, cementing its role
as a trailblazer in the online business arena. It has different departments to facilitate the business
process that have good coordination among each other which is shown in figure below.

The CEO of Magento360 is responsible for directing over the operations and technology
teams to make sound decisions and achieve better outcomes for the business. CTO is responsible

8
for the technology vision and the development effort for delivering high quality and
cost-effective services and solutions. Similarly, COO is responsible for operational management.
Under the supervision of the Project manager there are different teams: developer team, designer
team, marketing team, content writer team, etc. I worked as an intern in the Web Development
Team.

Fig 2: Hierarchical structure of the company

2.3 Working Domains of Organization


Magento360 provides multiple services in the area of website design and best quality softwares
development. The areas of expertise of the organization are:
1) Software Development
a) MVC
b) PHP
c) Jquery
d) HTML
e) CSS
f) Magento 2
g) Wordpress

2) Database Management
a) MS SQL

9
3) IT Consulting
a) Network Consulting
b) Web Consulting
c) Software Consulting
4) Software Training / Support & Maintenance/ Hire magento developer

2.4 Description of Intern Department


During my internship at Magento360, which lasted for twelve weeks, I was engaged in diverse
tasks. This included assisting in e-commerce development, conducting data analysis, managing
content, and participating in quality assurance. The experience enriched my understanding of
web development, project management, and the e-commerce sector. I collaborated closely with
the team, learned from experts, and applied theoretical knowledge in practical scenarios. Overall,
the internship was a valuable journey of learning and growth. The details of my internship period
in the organization are summarized in the following table:

Table 1.2 Duration of the Internship

Start date May 08 2023

End date Aug 08 2023

Total Duration 12 weeks

Position Intern as Back-end Developer

Working Days Monday-Friday

Office Hour 10:00 AM – 7:30 PM

Mentor Vishal Nyati

10
3.1 Roles and Responsibilities
The Backend Development was the assigned role during my twelve weeks long internship
period. The mentor assigned to me, seamlessly understood my field of interest and my strongest
part. Most back-end tasks were assigned to me. The major roles and responsibilities of the intern
are enlisted as follows:
● Understand the working patterns of the organization.
● Undertake, manage and complete an individual project.
● Complete the tasks assigned by the supervisor.
● Update the supervisor on a regular basis.
● Develop self-learning capabilities and seek help from a mentor when needed.
● Focus on developing a professional solution compared to a working solution.
● Create Plugin.
● Create Theme.
● Create a Database.
● Create a Daily Report.

11
3.2 Weekly Logs
Table: Weekly Logs

Weeks Activities

1st Week Installation of PHP strom, Sublime Text, Revision of PHP, HTML, CSS

2nd Week Learned to Install Magento 2

3rd Week Learned about PHP,GIT,Javascript

4th Week Worked on CRUD operation (create, read, update, delete) using PHP

5th Week Worked on PHP Validation, Verification, Login, Signup

6th Week Learned Magento 2

7th Week Started working on web development

8th Week Developed Esewa, Khalti plugin

9th Week Worked on to develop a blog plugin.

10th Week Worked on to develop a sorting plugin, promo coupon code.

11th Week Worked on to develop a custom theme.

12th Week Created documentation of the intern report.

3.3 Description of the Project Involved During Internship


During my internship, I was deeply immersed in a dynamic project centered around developing
an innovative eCommerce website. My responsibilities encompassed a wide spectrum of tasks,
including market research to identify emerging trends, competitor analysis to pinpoint strategic
differentiators, and user behavior studies to optimize the website's usability. In the development
phase, I delved into coding using relevant technologies such as HTML, CSS, JavaScript, and
possibly frameworks like React or Angular. I was involved in building responsive and engaging

12
web pages, implementing essential features like product catalog displays, search functionalities,
and secure payment gateways. The internship also provided a valuable learning opportunity to
optimize the website for performance, focusing on factors like page load speed and mobile
responsiveness. I worked alongside the team to conduct rigorous testing and troubleshooting,
ensuring that the website operated flawlessly across various devices and browsers.
Throughout the project, I collaborated closely with cross-functional teams, participated in
regular project reviews, and honed my problem-solving skills by addressing real-time challenges.
This immersive experience not only deepened my technical skills but also heightened my
understanding of the intricate interplay between design, development, and user experience in the
realm of eCommerce.
I have worked on the following feature.
● Online shopping
● Homepage, contact us page, about us page, term & condition page.
● Product create and update
● Product listing and detail page
● Product add to cart
● Online Payment system : Esewa, Khalti, ConnectIps, Bank transfer, cash on delivery
● Shipping cost based on address

13
3.3.1 Er-diagram

Fig 3: Er diagram

14
3.3.2 Use case diagram

Fig 4: Use case diagram

15
3.3.3 Database diagram

Fig 5: Database diagram

3.5 Tasks/Activities Performed


As per the academic requirement of BSc.CSIT eighth semester, I worked as a Back-end Web
Developer at Magento360 Mr. Navin D Bhudhiya was the mentor for this internship and tasks
were decided upon consultation with him. The part of the internship was completed in twelve
weeks and as per the task performed, other tasks were assigned after discussion with the mentor.
Major activities which I performed in twelve weeks are given below:
I learned about the installation of PHPStorm, and Sublime Text. I learned about HTML,
CSS, Bootstrap, JavaScript, Symphony Framework, Github, and MySQL Databases. I worked on

16
the CRUD operation (create, read, update, delete). I started to work on website template design. I
worked on JavaScript login, validation, verification, database management. I worked on web
developing for the project we were assigned by the mentor. I worked in a group for a project and
learned many things about group work and coordination between the members in the group. I
created documentation of the internship report.

17
CHAPTER 4: CONCLUSION AND LEARNING
OUTCOMES
4.1 Conclusion
The internship in Magento360 has provided a great opportunity to enhance my knowledge and
skills. It helped me to gain the experience of working in a real and practical field and most
importantly working in a team. Moreover, it presented an opportunity to work on a project
related to my interest and specialization. The main objective of the internship is learning the
things that are necessary to get myself into the real field of work. It has given me the opportunity
to understand this industry and how the work is actually done.
To conclude, I found that the internship was very beneficial as a part of the development
of my career and the experience gained through this would be helpful and beneficial for my
future opportunities. Besides designing a project, other lessons are also learnt. The importance of
communication to coordinate the tasks. How important it is to work in a team and the way to
work in a team. How to bring ideas into the implementation. How to work within the time
constraints. The process of gathering the information that is required to develop a software.
Overall, the internship program helped me develop skills such as handling real-world problems,
working under the rules and regulations of an organization, working under a deadline and under
pressure. It helped me gain technical knowledge as well as professional experience which will be
very helpful throughout my professional career.

4.2 Learning Outcome


My three-month internship at Magento360 was a transformative experience that enriched my
professional journey. Immersed in a dynamic work environment, I gained invaluable insights into
effective time management and the art of multitasking, vital skills for meeting stringent
deadlines. The experience honed my critical thinking and nurtured my ability to work
independently, fostering personal growth.
Transitioning into a new team and workspace was a pivotal lesson in adapting and
building relationships. By proactively engaging with colleagues and comprehending their
motivations, I cultivated strong communication skills early in my career. Collaborating with

18
mentors to outline project workflows and establish priorities proved instrumental in channeling
my efforts strategically.
A fundamental realization was the stark contrast between theoretical concepts and
practical application, highlighting the true essence of hands-on learning. Recognizing that the
triumphs of my superiors and team translate into personal success underscored the significance
of synergy within an organization. This immersive internship fundamentally bridged the gap
between academic knowledge and real-world execution, shaping me into a more adept and
insightful professional.

19
References

[1] Bootstrap. "Introduction." BootstrapCDN. [Online]. Available:


https://getbootstrap.com/docs/4.3/getting-started/introduction/. [Accessed: July 2,
2023].
​ [2] Font Awesome. "Icons." [Online]. Available: https://fontawesome.com/icons.
[Accessed: July 20, 2023].
​ [3] W3Schools. "HTML, CSS, JavaScript, and Bootstrap tutorials." [Online].
Available: https://www.w3schools.com/. [Accessed: July 28, 2023].
​ [4] GeeksforGeeks. "10 Best JavaScript Books for Beginners & Advanced
Developers." [Online]. Available:
https://www.geeksforgeeks.org/10-best-javascript-books-for-beginners-advanced
-developers/. [Accessed: July 25, 2023].
​ [5] TutorialsPoint. "AngularJS Tutorial." [Online]. Available:
https://www.tutorialspoint.com/angularjs/index.htm. [Accessed: July 28, 2023].
​ [6] Code With Chris. "Swift Tutorial for Beginners: Getting Started (Part 1)."
YouTube, Feb. 12, 2018. [Online]. Available:
https://www.youtube.com/watch?v=0LhBvp8qpro&t=4458s. [Accessed: July 28,
2023].

20
Appendix-I

Table: Weekly Logs

Weeks Activities

1st Week Installation of PHP strom, Sublime Text, Revision of PHP, HTML, CSS

2nd Week Learned to Install Magento 2

3rd Week Learned about PHP,GIT,Javascript

4th Week Worked on CRUD operation (create, read, update, delete) using PHP

5th Week Worked on PHP Validation, Verification, Login, Signup

6th Week Learned Magento 2

7th Week Started working on web development

8th Week Developed Esewa, Khalti plugin

9th Week Worked on to develop a blog plugin.

10th Week Worked on to develop a sorting plugin, promo coupon code.

11th Week Worked on to develop a custom theme.

12th Week Created documentation of the intern report.

21
Appendix-II
Coding
Index.php
<?php
use Magento\Framework\App\Bootstrap;
try {
require __DIR__ . '/../app/bootstrap.php';
} catch (\Exception $e) {
echo <<<HTML
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
<div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;">
<h3
style="margin:0;font-size:1.7em;font-weight:normal;text-transform:none;tex
t-align:left;color:#2f2f2f;">
Autoload error</h3>
</div>
<p>{$e->getMessage()}</p>
</div>
HTML;
exit(1);
}

22
$bootstrap = Bootstrap::create(BP, $_SERVER);
/** @var \Magento\Framework\App\Http $app */
$app =
$bootstrap->createApplication(\Magento\Framework\App\Http::class);
$bootstrap->run($app);
Theme.xml
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/the
me.xsd">
<title>BabyOnline Theme</title>
<parent>Magento/luma</parent>
</theme>

Registration.php
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
use Magento\Framework\Component\ComponentRegistrar;

23
ComponentRegistrar::register(ComponentRegistrar::THEME,
'frontend/Babyonline/theme', __DIR__);

Login.php
<?php
namespace Magento\Customer\Controller\Account;
use Magento\Framework\App\Action\HttpPostActionInterface as
HttpPostActionInterface;
use Magento\Customer\Model\Account\Redirect as AccountRedirect;
use Magento\Framework\App\Action\Context;
use Magento\Customer\Model\Session;
use Magento\Customer\Api\AccountManagementInterface;
use Magento\Customer\Model\Url as CustomerUrl;
use Magento\Framework\App\CsrfAwareActionInterface;
use Magento\Framework\App\Request\InvalidRequestException;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\Controller\Result\Redirect;
use Magento\Framework\Exception\EmailNotConfirmedException;
use Magento\Framework\Exception\AuthenticationException;
use Magento\Framework\Data\Form\FormKey\Validator;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\State\UserLockedException;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Customer\Controller\AbstractAccount;
use Magento\Framework\Phrase;
class LoginPost extends AbstractAccount implements CsrfAwareActionInterface,
HttpPostActionInterface
{
public function __construct(

24
Context $context,
Session $customerSession,
AccountManagementInterface $customerAccountManagement,
CustomerUrl $customerHelperData,
Validator $formKeyValidator,
AccountRedirect $accountRedirect
){
$this->session = $customerSession;
$this->customerAccountManagement = $customerAccountManagement;
$this->customerUrl = $customerHelperData;
$this->formKeyValidator = $formKeyValidator;
$this->accountRedirect = $accountRedirect;
parent::__construct($context);
}
private function getScopeConfig()
{
if (!($this->scopeConfig instanceof
\Magento\Framework\App\Config\ScopeConfigInterface)) {
return \Magento\Framework\App\ObjectManager::getInstance()->get(
\Magento\Framework\App\Config\ScopeConfigInterface::class
);
} else {
return $this->scopeConfig;
}
}

private function getCookieManager()


{
if (!$this->cookieMetadataManager) {
$this->cookieMetadataManager =
\Magento\Framework\App\ObjectManager::getInstance()->get(

25
\Magento\Framework\Stdlib\Cookie\PhpCookieManager::class
);
}
return $this->cookieMetadataManager;
}

/**
* Retrieve cookie metadata factory
*
* @deprecated 100.1.0
* @return \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory
*/
private function getCookieMetadataFactory()
{
if (!$this->cookieMetadataFactory) {
$this->cookieMetadataFactory =
\Magento\Framework\App\ObjectManager::getInstance()->get(
\Magento\Framework\Stdlib\Cookie\CookieMetadataFactory::class
);
}
return $this->cookieMetadataFactory;
}

/**
* @inheritDoc
*/
public function createCsrfValidationException(
RequestInterface $request
): ?InvalidRequestException {
/** @var Redirect $resultRedirect */
$resultRedirect = $this->resultRedirectFactory->create();

26
$resultRedirect->setPath('*/*/');

return new InvalidRequestException(


$resultRedirect,
[new Phrase('Invalid Form Key. Please refresh the page.')]
);
}

/**
* @inheritDoc
*/
public function validateForCsrf(RequestInterface $request): ?bool
{
return null;
}

/**
* Login post action
*
* @return \Magento\Framework\Controller\Result\Redirect
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
public function execute()
{
if ($this->session->isLoggedIn() ||
!$this->formKeyValidator->validate($this->getRequest())) {
/** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
$resultRedirect = $this->resultRedirectFactory->create();
$resultRedirect->setPath('*/*/');
return $resultRedirect;
}

27
if ($this->getRequest()->isPost()) {
$login = $this->getRequest()->getPost('login');
if (!empty($login['username']) && !empty($login['password'])) {
try {
$customer =
$this->customerAccountManagement->authenticate($login['username'],
$login['password']);
$this->session->setCustomerDataAsLoggedIn($customer);
if ($this->getCookieManager()->getCookie('mage-cache-sessid')) {
$metadata =
$this->getCookieMetadataFactory()->createCookieMetadata();
$metadata->setPath('/');
$this->getCookieManager()->deleteCookie('mage-cache-sessid',
$metadata);
}
$redirectUrl = $this->accountRedirect->getRedirectCookie();
if
(!$this->getScopeConfig()->getValue('customer/startup/redirect_dashboard') &&
$redirectUrl) {
$this->accountRedirect->clearRedirectCookie();
$resultRedirect = $this->resultRedirectFactory->create();
// URL is checked to be internal in $this->_redirect->success()
$resultRedirect->setUrl($this->_redirect->success($redirectUrl));
return $resultRedirect;
}
} catch (EmailNotConfirmedException $e) {
$this->messageManager->addComplexErrorMessage(
'confirmAccountErrorMessage',
['url' =>
$this->customerUrl->getEmailConfirmationUrl($login['username'])]

28
);
$this->session->setUsername($login['username']);
} catch (AuthenticationException $e) {
$message = __(
'The account sign-in was incorrect or your account is disabled temporarily.
'
. 'Please wait and try again later.'
);
} catch (LocalizedException $e) {
$message = $e->getMessage();
} catch (\Exception $e) {
// PA DSS violation: throwing or logging an exception here can disclose
customer password
$this->messageManager->addErrorMessage(
__('An unspecified error occurred. Please contact us for assistance.')
);
} finally {
if (isset($message)) {
$this->messageManager->addErrorMessage($message);
$this->session->setUsername($login['username']);
}
}
} else {
$this->messageManager->addErrorMessage(__('A login and a password are
required.'));
}
}
return $this->accountRedirect->getRedirect();
}
}

29
Appendix-III
Screenshots of Project
a. Admin login

30
b. Admin panel

c. Product grid

31
d. Sales order

32

You might also like