Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

351.

List the steps to install OpenCart?

Answer»
  • Go to DOWNLOAD page and download the latest version.
  • Extract the downloaded file in your and then navigate to the "upload" directory.
  • Rename the these files which ids placed in upload directory.
    • Rename "config-dist.php" to "config.php"
    • Also rename "admin/config-dist.php" to "admin/config.php"
  • Make the writable PERMISSION to these given files and directories.
    • system/storage/ COMPLETE folder
    • image complete folder
    • config.php and admin/config.php
    • Now configure your database connections in config file in upload folder.
    • Now it has been ALMOST INSTALLED
352.

What is the latest version of OpenCart and when did it released?

Answer»

The LATEST VERSION of OpenCart is 3.0.3.0. This version was RELEASED in JAN 2019.

353.

How to change featured products in OpenCart?Explain step by step.

Answer»
  • Goto LOGIN dashboard and login your OpenCart admin panel
  • Go to Products section.
  • Search the product that you WOULD like to be set as featured. Edit this by Edit link.
  • Now please Choose Special tab.
  • Special PRICES can be change the VALUE of the product’s price to the new price.
  • Now CLICK on Save Buttons to save these changes.
354.

What are the key features of OpenCart? Explain

Answer»
  • Simplicity & LIGHT weight
  • Fast & EASY to learn
  • Responsive DESIGN & Multilingual Support
  • In built User management
  • Discount, OFFERS, Coupons and Options and Properties
  • Having different payment options
  • Review and Ratings
  • Parallax Effect & Lazy Load etc
355.

Who & when developed OpenCart?

Answer»

It was DEVELOPED by CHRISTOPHER G. Mann in YEAR 1998. It was PUBLICALLY released in May 1999.

356.

What is OpenCart?

Answer»

OpenCart is an online SHOPPING cart system that ALLOWS designers to CREATE feature RICH, search engine friendly and with an appealing website. It is because of its user-friendly interface and simple installation; it does not TAKE time to configure a new store with this platform.

357.

Is it possible to create a request object in Symfony, then how?

Answer»

YES, it’s POSSIBLE to CREATE a request OBJECT in Symfony by DEVELOPERS. Use the

createFromGlobals() methods to simply create the request object.

358.

Mention the form helper functions in Symfony.

Answer»

SYMFONY has following form helper FUNCTIONS for developers:

  • Checkbox
  • Form_start
  • Form_end
  • Textarea
  • Input_password_tag
359.

Explain the session set and get methods in Symfony2.

Answer»

Symfony2 USES a SessionInterface object set and get method to get and set sessions.

Following syntax can be referred as an example:

Example

public function sessionAction(SessionInterface $session)

{

// store an attribute for reuse during a LATER user REQUEST

$session->set('user_id', 5);

// get the attribute set by another controller in another request

 $user_id = $session->get('user_id');

}

360.

Is it possible to create a Symfony application using composer? Then, how?

Answer»

Yes, it’s POSSIBLE to CREATE a Symfony APPLICATION using composer. The DEVELOPER needs to RUN the following command in the console to install Symfony using composer:

Example

composer create-project symphony/framework-standard-edition my_project_name

361.

Explain the case of user access denies in Symfony.

Answer»

When an unauthorized individual tries to access the web APPLICATION, SYMFONY SHOWS a 403 HTTP STATUS and throws an error page denying the user access request.

362.

Explain Serializer in Symfony.

Answer»

Serializer is a component present is SYMFONY that OFFERS developers an option to convert a PHP object into a specific FORMAT such as JSON, Binary, XML, ETC.

363.

What are the innovations used in Symfony2 compared to Symfony1?

Answer»

Few CRUCIAL innovations that implemented with SYMFONY2 are as following:

  • Use of the Dependency Injection Pattern
  • Complete BUNDLE setup
  • Packed as Distributions
  • Ease of DEBUGGING an application
  • Improved security additions
364.

Explain the tasks performed by a Symfony controller.

Answer»

A Symfony controller can do virtually ANYTHING inside this FRAMEWORK. From redirecting and FORWARDING to accessing core services to rendering templates; a controller in Symfony can be USED for various basic tasks.

365.

Mention few web servers supported by Symfony.

Answer»

Symfony framework supports VARIOUS user popular web servers. For example, few of the best web servers compatible with Symfony are LAMP, WAMP, XAMP, MAMP, Microsoft IIS, NGINX, and PHP’s built-in web server.

366.

Explain an Environment in Symfony.

Answer»

A group of CONFIGURATIONS used to run an application is BASICALLY DESCRIBED as an Environment in Symfony.

This framework has two DEFAULT environments:

  • Prod: Optimized for executing an application on production
  • Dev: Used when an application is DEVELOPED locally.
367.

What is a Symfony controller?

Answer»

Symfony controller is a PHP FUNCTION that OBTAINS information from the HTTP request to construct and return an HTTP response. The response can vary and could be an XML DOCUMENT, an HTML page, a REDIRECT, a 404 error, a serialized JSON array, or any other request.

368.

What is Symfony?

Answer»

Symfony is a leading, reliable and ONE of the most USED PHP FRAMEWORK combined with a set of highly featureful and reusable PHP components to create WEBSITES, dynamic web applications, web services and microservices. It is an OPEN source framework and supports the MVC design pattern.

369.

How to get the request / query parameters in Symfony?

Answer»

In Symfony, DEVELOPERS can get the REQUEST parameter by USING the following SYNTAX:

  • $this->container->get('request');
  • $name=$request->query->get('name');
370.

Mention the cache adapters present in Symfony.

Answer»

Symfony has FIVE CACHE ADAPTERS available inside it. The available cache adapters are as following:

  • File system cache adapter
  • Array cache adapter
  • APCu cache adapter
  • PHP files cache adapter
  • Redis cache adapter
371.

What are the benefits of using Symfony?

Answer»

Using SYMFONY has a number of its UNIQUE benefits, such as:

  • Fast development
  • Unlimited user flexibility
  • MVC pattern
  • The STABLE and sustainable framework
  • Better user control & EASE of use
  • Expandable
372.

In which technology Symfony routing configuration files are written?

Answer»

The Symfony routing CONFIGURATION FILES are WRITTEN with YAML, XML and PHP technology. The DEFAULT routing configuration file in Symfony is: app/config/routing.yml

373.

Explain the bundles in Symfony.

Answer»

BUNDLES in Symfony are similar to packages or plugins in other CMS or frameworks. In Symfony, bundles provide the developers with the FLEXIBILITY to use pre-built features consisted of third-party bundles or to create and DISTRIBUTE their own bundles.

Symfony has TWO types of bundles:

  • Application specific bundles
  • Reusable bundles
374.

How can we set a flash message in Yii2?

Answer»

A FLASH MESSAGE in Yii 2 is used to keep a message in session through requests of the same user. By default, a flash message is removed from the session after it has been shown to the user. You can set the Flash messages through setFlash() METHOD

375.

How we can change the url for Yii::app()->homeUrl in Yii2?

Answer» 19. How does a SEARCH() in SearchModel WORK in YII2?
376.

Explain the difference between homeUrl and baseUrl in Yii2?

Answer»
377.

How can we get all root directory path in yii2?

Answer» YII2 BASIC App
  • @app: It uses to get the application root directory
  • @vendor: It uses to get vendor directory on your root app install directory
  • @runtime: It uses to get application files runtime storage folder
  • @web: It uses to get application BASE URL path
  • @webroot: It uses to get application web root
  • @tests: It uses to get console tests directory
Yii2 Advanced App
  • @app: It uses to get application root directory frontend or backend
  • @vendor: It uses to get vendor directory on root app install directory
  • @runtime: It uses to get application files runtime storage folder
  • @web: It uses to get application base URL
  • @webroot: It uses to get application web root path
  • @tests: It uses to get console tests directory
  • @common: It uses to get Alias of common root folder on root app install directory
  • @frontend: It uses to get Alias of frontend root folder on root app install directory
  • @backend: It uses to get Alias of backend root folder on root app install directory
  • @console: It uses to get Alias of console root folder on root app install directory
378.

How to pass parameters from controller to layout in YII2?

Answer»
379.

How to use DateTimePicker in YII2?

Answer»

DateTimePicker is a widget in the Yii2 wrapper for Bootstrap DateTimePicker plugin. This plugin is specially STYLED for Yii 2.0 and is SIMILAR to DatePicker widget except that it adds time functionality. This widget also ALLOWS degradation to an HTML text INPUT if your browser is not supporting JQuery.

380.

How to use delete(), insert() and save() methods in YII2?

Answer»

1. delete()

$connection->createCommand()->delete('tbl_user', 'status = 1') ->EXECUTE();

2. SAVE()

$model = NEW Admin;
$model->name = 'YII2';
$model->email = '[email PROTECTED]';
$model->save(); // this is equivalent to $model->insert();

3. insert()

$connection->createCommand()->insert('tbl_user',
[
'name' => 'yii',
'status' => 1,
])
->execute();

 

381.

How to use find() and findAll () in YII2?

Answer»

findAll(): It gives US a list of active RECORD models that MATCH the SPECIFIED conditions.

Admin::findAll(['type' => 'client', 'status' => 1]);

find(): It returns a single record using the primary key.

Admin::find(['id' => 1]);

382.

How to get current action & controller name in YII2?

Answer»

Developers can get the controller NAME in Yii2 throigh this method -

//Controller Name
ECHO Yii::$app->controller->id;

We can also get CURRENT action through this method:
echo Yii::$app->controller->action->id;

383.

What do you mean by Active Record in yii?

Answer»

Active Record offers an object-oriented interface that HELPS the developers access and manipulate DATA stored in the DATABASES. This is associated with a database table and corresponds to a ROW of the same table. This is one of the common Yii2 interview questions.

384.

What do you mean by Yii Helpers?

Answer»

Yii offers different classes that can SIMPLIFY common coding tasks, including STRING and array manipulations or HTML code generation. These classes are called helper classes and are PLACED under the yii\helpers namespace. They are STATIC, which means they only CONTAIN static properties and methods and you must never instantiate them.

385.

What is the purpose of “GII” in Yii2?

Answer»

It is a code-generator, web-based MODULE in YII 2, which helps the developers in creating and generating fully customized MODELS, forms, and CRUD for databases.

386.

What are the system requirements to install YII2?

Answer»

Yii 2.0 NEEDS PHP 5.4.0 or HIGHER. HOWEVER, it will RUN best with the latest version, PHP 7.

387.

What are the steps to install YII2?

Answer»

You can INSTALL YII2 with COMPOSER by this command
composer create-project --prefer-dist yiisoft/yii2-app-basic YOUR_DIRECTORY_NAME

388.

What is the difference between YII & YII2?

Answer»
S.noYII 1Yii 2
1.Server PHP 5.2Server PHP 5.4
2.Prefix C used. Classes were global namespaces.C prefix not used in namespaces. Classes based on directory structure.
3.Uses PHP as a PRIMARY template languageEquipped with PHP, TWIG, and SMARTY
5. What are the advantages of YII2?
  • Yii 2 is based on WRITING simpler and elegant code
  • Highly extensible
  • Developers can customize almost EVERY PIECE of their code
  • High performance
  • Biggest online community
389.

What are the new features acquired in YII2?

Answer»

Some of the new features of Yii 2:

 

  • A new set of PHP Namespaces for encapsulating objects
  • New traits for reusing methods in various CLASSES
  • Anonymous functions
  • SPL classes, interfaces, and LATE STATIC bindings
  • Use of ARRAY syntax [elements] instead of array [elements]
  • Code GENERATED automatically
  • Automatic handling and logging of errors
390.

What is YII2?

Answer»

It is a GENERIC programming framework and can be used for producing all kinds of web apps using the PHP framework.Yii is based on the approach that code must be written in the most simple way possible. It is a full-stack framework that offers proven features, such as query builders, multi-tier caching support; RESTful API development support; etc.

2. What is the directory structure of YII2?

/
    backend/
    common/
        components/
        CONFIG/
            params.php
            params-local.php *
        lib/
            Pear/
            yii/
            Zend/
        migrations/
        MODELS/
            Comment.php
            Extension.php
            ...
    console/
        commands/
            SitemapCommand.php
            ...
        config/
            main.php
            main-local.php *
            params.php
            params-local.php *
        runtime/
        yiic.php *
    frontend/
        components/
        config/
            main.php
            main-local.php *
            params.php
            params-local.php *
        CONTROLLERS/
            SiteController.php
        lib/
        models/    
            ContactForm.php
            SearchForm.php        
        runtime/
        views/
            layouts/
            site/
        www/
            ASSETS/
            css/
            js/
            index.php *
    yiic
    yiic.bat

391.

List the advantages of magento 2.2.3.

Answer»

Here are the advantages of MAGENTO 2.2.3

  • Improved performance and scalability
  • Better CHECKOUT process
  • More MOBILE friendly
  • Easy to upgrade
  • Best extension integration
  • Instant purchase facility
  • Automation for email MARKETING
392.

Explain the Installation process of Magento 2.2 Manually?

Answer»
393.

What are the difference between magento 1 & 2?

Answer»
S.noMagento 1Magento 2
1.API ADDED RetroactivelyCore to the TECHNOLOGY API
2.Flexible ArchitectureFast Architecture
3.No Front-end LibraryShips with LESS
4.Available for LEGACY PHPAvailable for only PHP5.6+ / 7.0
5.External PAYPALIn-Site PayPal EXPERIENCE
394.

Is Magento the best eCommerce platform? Explain

Answer»

We just can’t say Magento is the best eCommerce platform available GLOBALLY, but it’s undoubtedly one of the best available eCommerce platforms available today due to its outstanding support, features, and security.

23. How to UPGRADE Magento?

To upgrade our Magento, we have to follow these steps:

Via content manager
  • Log on to Magento backend
  • Go to System >>Magento Connect >>Magento Connect Manager
  • Fill the credentials
For Magento 1.5 and 1.6 to Magento 1.9.x
  • Under “Install New Extensions”, paste connect20.magentocommerce.com/community/Mage_All_Latest
  • Then install and proceed
For Magento 1.7, 1.8 and 1.9 to Magento 1.9.x
  • Go to MANAGE Existing Extensions”
  • Click on “Check for Updates”
  • Click dropdown MENU behind the extensions
  • Click on Commit changes
  • Magento is updated now
395.

How to check Magento version?

Answer»

To check the Magento version of a WEBSITE, just add /magento_versionafter the DOMAIN URL and go searching. This will give you the Magento version and edition that our website is running on.

If you are searching for the most interviewers ASKED Magento INTERVIEW questions, then here they are.

396.

How we can format price in Magento?

Answer»

To format price in MAGENTO, DEVELOPERS USE the below givensyntax.
$formattedPrice = MAGE::helper('core')->currency($finalPrice, true, FALSE);

397.

What is the concept of Fieldsets in Magento?

Answer»

In Magento, the <fieldsets> * is found in config.xml files. It is used to DEFINE which attributes or FIELDS are to be copied to where while converting objects, that is in a quote to ORDER conversion.

398.

How we can get current url in Magento?

Answer»

To retrieve the CURRENT URL PATH in Magento, use the below-given syntax at first.Example

$currentUrl = Mage::helper('core/url')->getCurrentUrl();
$url = Mage::getSingleton('core/url')->parseUrl($currentUrl);
$path = $url->getPath();

399.

Explain the differnce between Catalog price Rules and Shopping cart Price Rules in Magento?

Answer»
S.noCatalog Price RULESShopping Cart Price Rules
1.It applicable when the user display product in product or category pages itself.The Shopping cart Price Rules are discounts which GET applicable after the product gets added to the cart.
2.These are the discounts valid before products get added to the cart.Example: FREE shipping, coupon code, discount in the order total, etc.
400.

What is codePool in Magento? Explain

Answer»

In Magento, the codebook is an XML file tag.

There are three types of code pool in Magneto.
  • Core: Developed by the core DEVELOPERS of Magento
  • Community: Open for all developers
  • Local: EXTENSIONS will be present in local if you have Magento SITE