How to Replace Theme() Function in Drupal 8

Have you already worked with Drupal 8? If yes, this post could be useful for you. Sooner or later almost any web developer faces the surprise: theme() function is not included in Drupal 8. And those who is going to try a new Drupal 8 platform should be ready for changes. Today we’ll cope with this and find another effective and useful way.

Let me introduce a bit of history.

Theme () Function

Drupal 7 includes the theme() function. It is responsible for wrapping fields and the other outputting data in some HTML. theme() is pretty useful in many cases: it can theme the output of standard tables, menus, fields, breadcrumbs, etc.

But what to do without it in Drupal 8? Now I’m going to share one useful way of how to act in this case and replace theme() in Drupal 8. Here we go!

 Let’s Look at Drupal 7 Theme() Function

In Drupal 7, we can override all theme() functions at the level of your module.

The function could be overridden by adding another function with similar input parameters but the changed name (usually module name instead of theme_) into your module code.

A name of the theme (for example, ‘socbutt_buttons’) and an associative array of variables for transferring to hook_theme() are transferred into this function as parameters.

Here is how it works in Drupal 7:

echo theme('socbutt_buttons', array('layout' => SOCBUTT_LAYOUT_VERTICAL));
/**
* Implements hook_theme().
*/
function socbutt_theme() {
 return array(
   'socbutt_buttons' => array(
     'variables' => array(
       'layout' => SOCBUTT_LAYOUT_VERTICAL,
     ),
   ),
 );
}
function theme_socbutt_buttons($variables) { 
	// Here is the code, which defines the look of things we want to display.

	// The array for displaying.
	return $output;
}

What About Drupal 8 Theme() Function?

The theme() function has been removed in Drupal 8. So you need to create a renderable array for theming required element. It is a data array which then is transmitted to the render() function.

Let’s do it in Drupal 8:

$items_array = array(
 '#theme' => 'theme_name',
 '#items' => $items;
);
echo Drupal::service('renderer')->render($items_array);

There you are! It’s an effective solution, which will help you to cope with your tasks without theme() and make the work with Drupal 8 more convenient.

Hope that this quick tip was useful for you and we’ll be glad to know your suggestions on this topic. Good luck to you! If you need any help, please contact us and we’ll do all these things on Drupal development.

WordPress Option Fields with Multiple Values

Many of you have already faced a question – “how to create a custom settings page in WP administration area?”, and Google is pleased to offer a dozen of good articles that clearly explain how to declare a list of custom fields on a separate (additional) page in admin area. But what if we need several different links. How to do this?

For example, these fields could be:

  • with the “copyright” text;
  • mailing address;
  • phone number;
  • text for you custom HTML-block;
  • social links.

And just by the example of the last item in the list a solution for the question in this article – additional options page with social links, will be considered.

The number of links may be a dozen or more. And placing the options page all the ten fields at once (facebook, google , twitter, Instagram, etc.) will be at least not rationally – because not all these fields are necessary for our website. And what if we need two different links on Facebook or more? jQuery WordPress Settings API will be used as the solution. The implementation will consist of the following things: from a list of known social networks you can select the desired option with the social network name and add an instance for referring to the settings form. It will look something like this:

Facebook field

Within this article we’ll not go into details of working with WP Settings API, you can read the official documentation and examples here. We used the example 2 of this source to build a page with social network URL fields.

A class for our page with social network URL fields looks the following way:

<?php
/**
* WP Theme Options
*
* @link http://codex.wordpress.org/Shortcode_API
*
* @package WordPress
* @subpackage WP-Theme
*/
/**
* Class WPThemeSettingsPage
*/
class WPThemeSettingsPage {
  /**
   * Holds Social profiles. You can add more in __construct() function.
   *
   * @var array
   */
  public $social = array();
  /**
   * Holds the values to be used in the fields callbacks
   *
   * @var $options
   */
  private $options;
  /**
   * Start up
   */
  public function __construct() {
     $this->social = array(
        'facebook' => __( 'Facebook' ),
        'twitter' => __( 'Twitter' ),
        'googleplus' => __( 'Google ' ),
        'instagram' => __( 'Instagram' ),
        'linkedin' => __( 'LinkedIn' ),
     );
     add_action( 'admin_menu', array( $this, 'add_plugin_page' ) );
     add_action( 'admin_init', array( $this, 'page_init' ) );
  }
  /**
   * Add options page
   */
  public function add_plugin_page() {
     // This page will be under "Settings".
     add_theme_page(
        __( 'Theme Options' ),
        __( 'Theme Options' ),
        'manage_options',
        'theme_options',
        array( $this, 'create_theme_options_page' )
     );
  }
  /**
   * Options page callback
   */
  public function create_theme_options_page() {
     // Set class property.
     $this->options = array( 'wp_social_profiles' => get_option( 'wp_social_profiles' ) ); ?>
     <div class="wrap">
        <!-- <h2>My Settings</h2> -->
        <form method="post" action="options.php">
           <?php
           // This prints out all hidden setting fields.
           settings_fields( 'wp_options_group' );
           do_settings_sections( 'theme_options' );
           submit_button();
           ?>
        </form>
     </div>
  <?php
  }
  /**
   * Register and add settings
   */
  public function page_init() {
     register_setting(
        'wp_options_group', /* Option group */
        'wp_social_profiles', /* Option name */
        array( $this, 'sanitize_profiles' ) /* Sanitize */
     );
     add_settings_section(
        'setting_section_id', /* ID */
        __( 'WP Theme Options' ), /* Title */
        array( $this, 'print_section_info' ), /* Callback */
        'theme_options' /* Page */
     );
     add_settings_field(
        'wp_social_profiles', /* ID */
        __( 'Social Profiles' ), /* Title */
        array( $this, 'social_profile_callback' ), /* Callback */
        'theme_options', /* Page */
        'setting_section_id' /* Section */
     );
  }
  /**
   *     /**
   * Sanitize each setting field as needed.
   *
   * @param array $input Contains all settings fields as array keys.
   * @return array
   */
  public function sanitize_profiles( $input ) {
     $new_input = array();
     // Sanitize Social Profiles values.
     foreach ( (array) $input as $name => $element ) {
        foreach ( $element as $index => $value ) {
           if ( ! empty( $value ) ) {
              $new_input[ $name ][ $index ] = esc_url( $value );
           }
        }
     }
     return $new_input;
  }
  /**
   * Print the Section text
   */
  public function print_section_info() {
     esc_html_e( 'Enter your settings below:' );
  }
  /**
   * Get the settings option array and print one of its values
   */
  public function social_profile_callback() {
     if ( ! empty( $this->options['wp_social_profiles'] ) ) {
        foreach ( (array) $this->options['wp_social_profiles'] as $name => $element ) {
           foreach ( $element as $index => $value ) { ?>
              <div class="wp-social-profile">
                 <label for="wp_social_profiles_<?php echo esc_attr( $name ); ?>_<?php echo esc_attr( $index ); ?>" class="wp-option-label">
                    <?php echo esc_html( $this->social[ $name ] ); ?>:
                 </label>
                 <input
                    type="text"
                    id="wp_social_profiles_<?php echo esc_attr( $name ); ?>_<?php echo esc_attr( $index ); ?>"
                    name="wp_social_profiles[<?php echo esc_attr( $name ); ?>][]"
                    class="<?php echo esc_attr( $name ); ?>"
                    value="<?php echo esc_attr( $value ); ?>"
                    placeholder="<?php esc_attr_e( 'http://' ); ?>"
                 />
                 <button class="button wp-social-remove"><b></b></button>
              </div>
              <?php
           }
        }
     } else { ?>
        <div class="wp-social-profile">
           <label for="wp_social_profiles_facebook_1" class="wp-option-label"><?php echo esc_html( $this->social['facebook'] ); ?>:</label>
           <input
              type="text"
              id="wp_social_profiles_facebook_1"
              name="wp_social_profiles[facebook][]"
              class="facebook"
              value=""
              placeholder="<?php esc_attr_e( 'http://' ); ?>"
           />
           <button class="button wp-social-remove">-</button>
        </div>
        <?php  } ?>
     <hr>
     <div class="wp-social-profile-selector-wrapper">
        <label for="social_profile_selector" class="wp-option-label"><?php esc_attr_e( 'Select profile: ' ); ?></label>
        <select id="social_profile_selector">
           <?php
           foreach ( $this->social as $name => $option ) { ?>
              <option <?php selected( $name, 'facebook' ); ?> value="<?php echo esc_attr( $name ); ?>"><?php echo esc_html( $option ); ?></option>
           <?php } ?>
        </select>
        <button id="social_profile_add" class="button">Add new...</button>
     </div>
     <?php
  }
}
if ( is_admin() ) {
  $settings_page = new WPThemeSettingsPage();
}
function load_option_page_style() {
  wp_register_script( 'wptheme-options-script', get_template_directory_uri() . '/inc/js/theme_options.js', array( 'jquery' ), '1.0.0', true );
  wp_enqueue_script( 'wptheme-options-script' );
}
add_action( 'admin_enqueue_scripts', 'load_option_page_style' );

And JS, which allows us to add/ remove fields:

// Remap jQuery to $.
(function ($) {
  // Re-index profiles.
  function RefreshProfilesIndex(selector) {
     $(document).find("[id^=social_profile_"   selector   "]").each(function (index) {
        $(this).attr('id', 'social_profile_'   selector   '_'   (index));
        $(this).closest('div').find('label').attr('for', 'social_profile_'   selector   '_'   (index));
     });
  }
  // Capitalize first letter on string.
  function toTitleCase(str) {
     return str.replace(/wS*/g, function (txt) {
        return txt.charAt(0).toUpperCase()   txt.substr(1).toLowerCase();
     });
  }
  // Update Events.
  function RefreshEventListener() {
     // Remove handler from existing elements
     $("button.wp-social-remove").off();
     // Re-add event handler for all matching elements
     $("button.wp-social-remove").on("click", function (event) {
        event.preventDefault();
        var selected = $(event.target).parent('div').find('input').attr('class');
        $(event.target).parents('div.wp-social-profile').css('visibility', 'hidden').slideUp("normal", function () {
           $(this).remove();
           RefreshProfilesIndex(selected);
        });
     });
  }
  // Select options toggle refresh.
  function RefreshSelectOptions(target_id) {
     if (target_id === undefined) {
        var $target = $(document).find("select.select-toggle option");
     } else {
        var $target = $(document).find("#"   target_id).closest("form").find("select.select-toggle option");
     }
     $target.on("mousedown", function () {
        var $self = $(this);
        if ($self.prop("selected"))
           $self.prop("selected", false);
        else
           $self.prop("selected", true);
        return false;
     });
  }
  /* trigger when page is ready */
  $(document).ready(function () {
     RefreshEventListener();

     $("#social_profile_add").on("click", function (event) {
        event.preventDefault();

        var selected = $("#social_profile_selector").val();
        var count = parseInt($(document).find("[id^=wp_social_profiles_"   selected   "]").length);
        var $clone = $(document).find(".wp-social-profile").first().clone();

        $clone = $('<div>').addClass("wp-social-profile");
        $clone.html(
           '<label for="wp_social_profiles_'   selected   '_1" class="wp-option-label">'   toTitleCase(selected)   ':</label>'  
           '<input '  
              'type="text" id="wp_social_profiles_'   selected   '_1" '  
              'name="wp_social_profiles['   selected   '][]" '  
              'class="'   selected   '" '  
              'value="" '  
              'placeholder="http://" />'  
           '<button class="button wp-social-remove"><b>-</b></button>');
        $clone.insertBefore($(document).find(".wp-social-profile-selector-wrapper").prev()).hide().css({visibility: 'hidden'}).slideDown("normal", function () {
           $(this).css('visibility', 'visible');
        });
        RefreshEventListener();
     });
     RefreshSelectOptions();
  });
  $(".widget-control-save").on("click", function (event) {
     setTimeout(function () {
        RefreshSelectOptions(event.target.id)
     }, 500);
  });
}(window.jQuery || window.$));

Let’s consider the code shown above.

As you can see, the fields are stored as an associative array where the links are grouped by social network title. To let the WP Settings API preserve values from input in the form as array, you should specify the attribute name using the following format:

<input name=wp_social_profiles[facebook][] value=”http://facebook.com/” />
<input name=wp_social_profiles[twitter][] value=”http://twitter.com/” />
<input name=wp_social_profiles[twitter][] value=”http://twitter.com/helloworld” />
<input name=wp_social_profiles[googleplus][] value=”http://googleplus.com/” />
<input name=wp_social_profiles[linkedin][] value=”http://linkedin.com/” />

The key point is the suffix [] in the attribute name. After submitting the form setting with fields in the format, as above, we get an associative array from function get_options( “wp_social_profiles”), such as in the picture above.

If we consider our settings page class more carefully, we declare a “social” array in the construct method:

$this->social = array(
  'facebook' => __( 'Facebook' ),
  'twitter' => __( 'Twitter' ),
  'googleplus' => __( 'Google ' ),
  'instagram' => __( 'Instagram' ),
  'linkedin' => __( 'LinkedIn' ),
);

We’ll route the array with a frontage circle that’s why it could be added among the other social networks. The format is the following: the key of the array element is something like a slug of the social network, and the element value is a header field which we use to display the Preferences page:

Preferences Page

JS-script shown in the example above implements the events: delete, and create a new DOM-element on the form, and recalculates the id and for attributes for label and input elements.

It was a quick tip, and we’ll be happy if it’s useful for you. If you have any difficultness with it, contact us and we’ll make it work. Save your time and trust us your WordPress based website!

How to Create Custom TWIG-Filter in Drupal 8

In Drupal 8 templating passed from commonly-used PHP Template to a new and progressive Twig templating engine long ago. Let’s learn how to create custom Twig-filters in Drupal 8.

In Twig templates, we can’t use traditional PHP-functions, and the syntax is also generally different. In Twig templates filters are used as a replacement for the functions. Filters are designated with a “pipe” symbol – “|”:

{{ data|filter() }}

or with additional arguments:

{{ data|filter(arg2, arg3) }}

Where “data” variable is the first argument of the filter, and the arguments in brackets are the second, the third, etc.

Twig Filters

Twig has a standard set of filters. You can familiarize yourself with them in the official documentation – http://twig.sensiolabs.org/doc/filters/index.html

But what if we need our own Twig-filter in Drupal 8, or in PHP language – a custom function? To do this, we need our custom module to declare the service – “twig_service” and prepare class which describes its functionality.

As an example, let’s set the task: create Twig-filter with currency conversion. Google Currency Converter API will be used for the conversion. We will send a request with required amount and currency. In response, we will get the result of the conversion according to the latest exchange rates.

Thus, we need to transfer three parameters to the filter:

  • the sum (amount);
  • original currency (curr_from);
  • target currency (curr_to).

That’s how the filter call will look:

{{ amount|filter(curr_from, curr_to) }}

Let’s define what we need to prepare for the demonstration of twig-filter creation. First of all, we need to create a custom module. How to do this can be found here. I have prepared a module called twig_filter. The module defines route and page controller, also defines twig-pattern and transfers the required for the filter parameters to the template.

Module file list

The module’s declaration file twig_filter.info.yml:

name: Twig Filter Test
type: module
description: 'Twig Filter Demonstration'
package: customs
version: '8.x'
core: '8.x'
project: 'twig_filter'

Route declaration file twig_filter.routing.yml:

twig_filter.result:
path: '/twig-filter/{curr_from}/{curr_to}/{amount}'
defaults:
  _controller: 'Drupaltwig_filterControllerTwigFilterController::testTwigPage'
  _title: 'Twig filter Page'
requirements:
  _permission: 'access content'

Controller Class file TwigFilterController.php:

<?php
/**
* @file
* Contains Drupaltwig_filterControllerTwigFilterController.
*/
namespace Drupaltwig_filterController;
use DrupalCoreControllerControllerBase;
/**
* Class TwigFilterController.
*
* @package Drupaltwig_filterController
*/
class TwigFilterController extends ControllerBase {
/**
 * {@inheritdoc}
 */
public function testTwigPage($curr_from, $curr_to, $amount) {
  // Construct element and it's data.
  $element = array(
    '#theme' => 'twig_filter_test_page',
    '#curr_from' => $curr_from,
    '#curr_to' => $curr_to,
    '#amount' => $amount,
  );
  return $element;
}
      }

Twig-template file twig-filter-test-page.html.twig  

(Explanation of the filter use):

<div>
  <h4>{% trans %}Google Currency API response results: {% endtrans %}</h4>
  {{ amount|currency(curr_from, curr_to) }}
</div>

Module functions File twig filter.module:

<?php
/**
* Implements hook_theme().
*/
function twig_filter_theme($existing, $type, $theme, $path) {
return [
  'twig_filter_test_page' => [
    'render element' => 'twig_filter_test_page',
    'path' => $path . '/templates',
    'template' => 'twig-filter-test-page',
    'variables' => [
      'curr_from' => NULL,
      'curr_to' => NULL,
      'amount' => NULL,
    ],
  ],
];
      }

Next, when we already have a module that defines a new route and page controller, we need to realize the following tasks:

  • declare twig_service module service;
  • create a class, which will describe the implementation of the functional Twig-filter.

To declare a service in the module, you need to create a file [module_name].services.yml. In my case, it will be twig_filter.services.yml:

Twig_filter.services

Write the following in the twig filter.services.yml file:

services:
  twig_filter.twig.twig_extension:
      class: Drupaltwig_filterTwigCurrencyTwigExtention
      public: false
      tags:
- { name: twig.extension }

Where we specify the file with twig-filter functionality class.

Now you should only create a class file that specifies the service.
In the “src” folder, which should be located in the root directory of the module, create “Twig” folder, and then create a file named CurrencyTwigExtention.php. We have the following structure of the module file:

structure of the module file

We make CurrencyTwigExtension.php file:

/**
* Class CurrencyTwigExtention.
*
* @package Drupaltwig_filterTwig
*/
class CurrencyTwigExtention extends Twig_Extension {
/**
 * Filter call.
 *
 * @return array|Twig_SimpleFilter[]
 */
public function getFilters() {
  return array(
    new Twig_SimpleFilter('currency', array($this, 'currencyCalcFilter')),
  );
}
/**
 * Use Google Currency Converter API.
 *
 * @param int $amount
 *    Amount.
 * @param string $curr_from
 *    From currency.
 * @param string $curr_to
 *    To currency.
 *
 * @return mixed
 *    API response.
 */
public function currencyCalcFilter($amount, $curr_from = 'USD', $curr_to = 'EUR') {
  $url = "http://www.google.com/finance/converter?a={$amount}&from={$curr_from}&to={$curr_to}";
  $request = curl_init();
  $timeOut = 100;
  curl_setopt($request, CURLOPT_URL, $url);
  curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($request, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)");
  curl_setopt($request, CURLOPT_CONNECTTIMEOUT, $timeOut);
  $response = curl_exec($request);
  curl_close($request);
  preg_match("/<div id=currency_converter_result>(.*)<span class=bld>(.*)</span>/", $response, $converted);
  $output = array(
    '#type' => 'markup',
    '#markup' => sprintf("<div>%s</div>", implode('', [$converted[1], $converted[2]])),
  );
  return $output;
}
/**
 * Get filter name.
 *
 * @return string
 *    Filter name.
 */
public function getName() {
  return 'twig_filter.twig_extension';
}
        }

When using |currency Twig-filter, currencyCalcFilter() the method tethered to it is called, in which we make HTTP-request to Google currency converter API with the required parameters. And then we cut out the useful text from the reply with a regular expression and give the results via a build-container for rendering content.

If you did everything right, when after navigating /twig-filter/USD/UAH/1500 page, we get the following result:

Twig filter page

Don’t forget to clear the cache after changes in the twig templates or module code.
We hope this article was useful for you, and you are ready to create a custom filter. But if you need some help, feel free to contact us and we’ll solve your issues related to Drupal development.

Make Friends with Your Customers via Emails

Before we start talking about email marketing, let’s decide what we want from our customers. Maybe every business owner aims to grow sales and wants his customers to buy more. But what if someone buys an expensive product at once, drastically grows your daily sales, goes away and doesn’t come back? Is it exactly what you need? – I think, no. We want our customers to return to our shop again and again, tell their friends about our store and bring them too. But people have a deal with someone they can trust. And whom do we trust more? – Of course, our friends. So, our task is to turn the customers into our friends for building long-term relationships and growing their love to our brand. And here email marketing is the best helper.

How to Make Friends with a Customer?

Get Acquainted

All of us start the friendship with an acquaintance and the first meet. So to leave a positive impression, use a beautiful, clear and modern design for your newsletter. Also, it should be responsive and suit any mobile device. By the way, we have several good email templates that can help you to build wonderful newsletters. View them on ThemForest.

And the thing you should take into consideration is the following: never send newsletters without the agreement. It’s much better to introduce yourself to the customers and familiarize themselves with the content they will get in future. How to do this? – Very simple. Send the first letter to approve the subscription, where you’ll announce your newsletter, the topics you will cover, offers, and the schedule of your visits (like once a week or two times a month).

Give your customer an opportunity to unsubscribe, if you don’t want to get into spam. If he likes you from the first view, everything will be okay. So, continue on.

Find the Touch Points

What unites us with our friends? – Shared hobbies and interests. The best way to become interesting to your subscribers is to know them better and segment your base.

For example, you see that some lady buys the cosmetic product for skin in your online store. So the topic of modern cosmetics, skin care, and beauty advice could be interesting for her. But at the same time, some man bought an expensive perfume in your shop. Of course, he interests in other topics, such as new man perfumes, some modern accessories and other. That’s why we need segmentation.

Lifehack. Send the survey in your first letter where you ask for an agreement for the subscription. With its help, you’ll learn which of suggested topics can be interesting for each client. This way you’ll segment your base and will be interesting for everyone.

Be Positive

Be positive with customers

Remember, everything you send to your friends should brighten their day. Am I right? Avoid the negative thoughts and words in your letter, such as problem, pain, awful, suffering, etc. Did you feel comfortable while reading this list? I didn’t. So, turn on the happiness in your readers’ subconscious, and then they will wait for communication with you with great pleasure.

Be Honest

Never. Yes, never trick your friend. If it happens once, the trust reached for a very long time of your communication will be lost. Here we should consider this topic a bit more.

Now everybody talks about Open Rate and how drastically it depends on the email subject. This everything is great, except a little detail. In pursuit of the high results, sometimes we forget about the fact that alive and sensitive person is sitting in front of us on the further side of the monitor. And perhaps, this person likes to read our newsletter. He (or she) opens the mailbox and sees the teaser and promising subject, opens the letter, and then sees not those things he (she) expected. Your friend feels cheated. We can’t be having that.Email subject is not a straight road to the success and high sales. It’s a good way to attract an attention of the subscriber to something even more interesting inside your letter. It’s like a teaser trailer for some new movie. You must admit that it’s pretty pity when the teaser is much better than the film.

Be Generous

Never stint useful content for your friends. The higher quality of our newsletter is, the more chances it has to become the favorite one. Say, why the large online store of technical devices can’t send their customers weekly or monthly digest of interesting articles from the world of gadgets and, of course, show their new products with it? What if your friend wants to buy something useful? 🙂

And how about sending the preview for some new interesting books at the online book shop to your subscriber? You’ll do him a great serve explaining the books’ content. Why should he search it by himself, if you can save his time and help with it? – The readers will be interested if you’ll share your opinion. So, always share the best information with friends.

Be Tactful

You have some newsletter schedule. For example, once a week. It’s not a good idea to flood your friend with letters. It’s tactless. Anyone needs some personal space and has some business. The subscribers’ time is invaluable. And they won’t want to waste it for removing emails they don’t ready to read (or send them to spam).

As for advertisement, here is the same thing. Advertising is a too aggressive approach. But there is nothing to do without it. We can just dress it in something more interesting or hide. It should be invisible and readable between the rows. You don’t like showing up and obtrusive, don’t you? – So do your friends – they also hate ads.

Give the links to product and landing pages carefully, don’t impose your subscribers the necessity of buying and paying money. Our task is to interest the reader. We should show our product and its advantages, answer all questions our customer could have, ground the usefulness of our product. And only then our client can be confident and ready to buy.

Give Presents

Give presents to customers

Everybody likes presents. You must admit that it’s always pleasant to get the surprise. And email marketing is a perfect tool for gifting. Sometimes give your customers the discounts and bonuses in the newsletter. Gifts for order motivate people to shop and leave a positive impression. By the way, in this case, your friends feel their exclusivity: a bonus is a priority only for your subscribers and only in your newsletter. You can set up the automated emails with bonuses for some actions and save your time.

Be Friends

“Don’t walk behind me; I may not lead. Don’t walk in front of me; I may not follow. Just walk beside me and be my friend.”

— Albert Camus

A wise person said these words, and they are completely true. Write your emails to no customer or a person who has and influence on your business. Write to your friend. The polite tone of your emails engages people to communicate and trust you. Talk with your reader on the same wavelength and learn to explain your ideas in a friendly way. Don’t sell, but tell, share, and convince. And smile 🙂

Let’s Summarize

How to become friends with your customers and sell more using email marketing?

  • Get acquainted and ask for agreement to visit their mailbox;
  • Look stylish and beautiful in your newsletters. Modern design of the email template plays an important role;
  • Choose interesting but honest subject for your email;
  • Specify correct From email address and From name, if you want to communicate with customers;
  • Send only useful content and information;
  • Communicate friendly, grammatically correct and respectfully;
  • Advertise your products carefully. Prove their value, tell more about them;
  • Often make pleasant surprises, such as discounts, bonuses, and presents;
  • Be interesting and fond of your subscribers’ hobbies;
  • Always stay with your readers, even if they buy nothing but open your newsletter – try to find something they need;
  • Clean your base regularly – if someone doesn’t open your newsletters during several months, remove this contact. Don’t waste your and his (her) time.

And remember that your Friend is a value. And while you have a friend, give him only qualitative products, useful content, and honest offers.

There were the base principles of the real friendship between a customer and business. Winning the customers’ confidence, we can be friends with them for a very long time, or even forever.

Write interesting letters and make friends!

And a bit later, we’ll talk about how to create such successful emails.

How to Code Display Suite Fields in Drupal

Display Suite module is a useful method of markup development in Drupal. It provides you with the full control on the way of displaying your content via dragging and dropping the fields on the admin panel. This module allows you to create the own fields, which are not “fields” in common understanding. They will appear and be acceptable only on the page of management of displayed content. Using these fields, you can display anything on the content page, moving it in the admin panel with the help of a mouse.

Display Suite Fields in Drupal 7

In Drupal 7, this everything is realized with hook_ds_fields_info().

function hook_ds_fields_info($entity_type) {
 $fields = array();

 // Field definition, in this case, using technical name “title”.
 // They should be unique only within the limits of one entity and among//
 the other DS fields. So, the title here won't overlap title from the entity
 $fields['title'] = array(
   // title:  The title of the field, which will be displayed on the page of management of displayed content.// 
   'title' => t('Title'),
   // field_type: Field type
   // - DS_FIELD_TYPE_THEME      : requests theme() function.
   // - DS_FIELD_TYPE_FUNCTION   : the field result terurns as a function.
   'field_type' => DS_FIELD_TYPE_FUNCTION,
   // ui_limit: Allows you to specify in which variants of display within the entity limits the field is defined for // field will be accessible for use in the following format: $bundle|$view_mode.  You can replace some parts with *, this way
   // specifying what will be accessible in all variants. 
   'ui_limit' => array('article|full', '*|teaser'),
   // file: The path to a file which contents the code is specified here. It's used only
  //for DS_FIELD_TYPE_FUNCTION  type. The path should be full, for example:
   // drupal_get_path('module', 'MYMODULE') . '/inc/file.inc',
   'file' => 'optional_filename',
   // function: The function name which will return the result for
   //  a field. Only for DS_FIELD_TYPE_FUNCTION type.
   'function' => 'theme_ds_title_field',
   // properties: Additional field settings.
   'properties' => array(
     // formatters: optionally for the function and required for
     // DS_FIELD_TYPE_THEME. By the way, for the second one, you should also // // //register the theming function via hook_theme()
//if it’s not present. It will be requested as  theme('function');
     //In this array, the key is a function of theme(), and the value is only a tag for something in// the admin panel. It will be a select where you can choose the output format.      'formatters' => array(
       'node_title_nolink_h1' => t('H1 title'),
       'node_title_link_h1' => t('H1 title, linked to node'),
     ),
     // settings & default: Optionally, used only if you want
     // to add some field settings which will be present in UI.
     'settings' => array(
       'wrapper' => array(
         'type' => 'textfield',
         'description' => t('Eg: h1, h2, p'),
       ),
       'link' => array(
         'type' => 'select',
         'options' => array('yes', 'no'),
       ),
     ),
     'default' => array(
       'wrapper' => 'h2',
       'link' => 0,
     ),
   ),
 );

 return array('node' => $fields);
}

Field Type: DS_FIELD_TYPE_THEME

This field requests the specified function and transfers there all necessary data, field settings, and entity object (if it’s present), to let you get all entity data and a lot of useful information. The function should return the value of this field (row).

Example of Realization in Drupal 7

Let’s imagine that we need to output the number of words from the body field for the article material.

/**
* Implements hook_ds_fields_info().
*/
function mymodule_ds_fields_info($entity_type) {
 $fields = array();

 if ($entity_type == 'node') {
   $fields['word_count'] = array(
     'title' => 'DS: The number of words in the text',
     'field_type' => DS_FIELD_TYPE_FUNCTION,
     //  We need this field only in a full format of displaying article material
     'ui_limit' => array('article|full'),
     // The function name
     'function' => 'mymodule_ds_field_word_count',
   );

   return array($entity_type => $fields);
 }
 return;
}
/**
* The function which will be requested and return the result to the field. 
* If the function returns nothing, false or null, it's 
*considered as an empty field, and it won't be rendered.
*
* @param $field
*  It contains all necessary information for us.
*/
function mymodule_ds_field_word_count($field) {
 // The entity object, which this field was requested for, is contained in
 // $field['entity']. For simplicity and clearness of code we use EMW.
 $entity_wrapper = entity_metadata_wrapper('node', $field['entity']);

 if ($body_value = $entity_wrapper->body->value->value()) {
   // Returning of result.
   return format_string(
     '<strong>The number of worts in the text:</strong> @word_count',
     array(
       '@word_count' => str_word_count(strip_tags($body_value))
     )
   );
 }
}

Field Type: DS_FIELD_TYPE_THEME

This field type requests theme() function, allowing us to transfer values to tpl.php file. It’s useful when we need to enter much wrapping. Also, it helps in case of field ability to change depending on some values. Building HTML right in PHP basing on the conditions through the function will be just unreadable. But the template is pretty helpful here.

Display Suite Fields in Drupal 8

In Drupal 8 hook_ds_fields_info() is replaced with the system of plugins. Display Suite comes with two plugin types DsField and DsFieldTemplate. You can use only DsField for creating fields. Now all fields are specified via one plugin. Drupal 8 has a new feature. Here is the difference: in Drupal 7 the field returned a row with a value, but in Drupal 8 the field must return the render array. So, if you want to return a row, you have to return the render array with markup.

Example of Realization in Drupal 8

Let’s imagine that we need to output the number of words from the body field for the article materials.

namespace DrupalmymodulePluginDsField;

use DrupaldsPluginDsFieldDsFieldBase;
use DrupalComponentRenderFormattableMarkup;
/**
* The field which outputs the number of words in the content.
*
* @DsField(
*   id = "word_count",
*   title = @Translation("DS: Word count"),
*   provider = "mymodule",
*   entity_type = "node",
*   ui_limit = {"article|full"}
* )
*/
class WordCount extends DsFieldBase {
 /**
  * {@inheritdoc}
  *
  * The method which should return the result to the field.
  */
 public function build() {
   // Writing the object of the current entity into a variable for the convenience
   $entity = $this->entity();
   // Check if there is a value in a body field. If the field returnes nothing
   // it takes like empty field and it isn't outputed. 
   if ($body_value = $entity->body->value) {
     return [
       '#type' => 'markup',
       '#markup' => new FormattableMarkup(
         '<strong>?????????? ???? ? ??????:</strong> @word_count',
         [
           '@word_count' => str_word_count(strip_tags($body_value))
         ]
       )
     ];
   }
 }
}

So, this was a quick tip on how to implement your own Display Suite modules in Drupal, no matter what version you use. Hope that it was helpful. If you want to save your time, trust us these works on Drupal, and we’ll do everything you need.

Marketing Kit: New Branding Approach

Perhaps, you own some business and even have the website. If your answer is “No”, it’s a good idea to think about creating a website. Surely, it will help you to extend your brand. But is you answered “Yes”, it’s great, you are doing well! If you have a modern website, you may follow your unique style and idea. And what if to move on and make something different for your branding? Something that can help you stand out from the crowd and present your brand in the best way. Feel the benefits of Marketing kit.

What Is Marketing kit?

Marketing kit is a personalized commercial proposal, an advertising presentation, performed like a beautiful paper- or e-book. It is a bit similar to the website but has another format and logical structure.

The main requirements for these materials: a very attractive modern cover and powerful texts with qualitative images and infographics.

How It Works

Imagine that you are sitting in the comfortable armchair and looking through a beautifully designed photo album. Your visual sensors are doing a great job: you are gathering the information, memorize it better, and even make up your mind following the most powerful impressions. And our visual memory works great with beautiful images and short but powerful texts.

This type of book is like a whole story about the company and its products: it leads the reader step by step, page by page, convincing him in choosing your brand, and then he makes up his mind.

The main task of marketing kit is to leave a positive impression about your business, show all your benefits and opportunities for 3 minutes. And, as a result, you are memorable, and the customer is confident.

The Benefits of Marketing Kit

  • It boosts your sales;
  • Helps to find new clients and partners;
  • Wins the rivals;
  • Creates the positive brand image;
  • Increases the customer loyalty and confidence.

How to Create Your Marketing Kit

First of all, you should consider the main idea of your brand, point out the priorities, mission, differences from the others, and benefits of your product. The following milestones can help you to create a good marketing kit that has the influence on your goal audience.

Brainstorm and Research

When we do something new, at first we generate ideas. And now it’s time to think out the philosophy of your business. Just gather the information, all possible things you can find. Now you should look at your website and note the most important things about your business, answering the following questions:

What is your brand motto?
Who are your customers? What do they need?
Which customer problems can you solve?
What are your brand colors and design style?
Do you know the product you want to sale and its benefits?
Who are your rivals? What makes you different from them?
What do your customers think about your business?
How can you help a client reach the success?

Perhaps, you’ll find the answers to these questions while thinking carefully and looking at your website. Perhaps, you have even done it before. But now the main task is to organize such useful things and conduct the research. Don’t forget to learn more about your competitors. You can use the method of Sherlock for these purposes.

Building Structure and Answering the Questions

It is the most crucial point. You should create a logic of your book and write powerful texts. It should answer the client’s questions page by page. Each page for each question. Here is an important moment: don’t accuse a customer of his hidden problems. You should just show them and then give an effective solution at the end.

A marketing kit has the following structure:

  • beautiful cover with a powerful motto and your brand name;
  • the hidden client problems and wishes, some story or your main idea;
  • the presentation of your product and how it works;
  • for whom it will be useful and suitable;
  • the benefits of your product;
  • product additional possibilities;
  • why you? (here you can show some differences from the rivals);
  • portfolio of your best works;
  • the clients’ feedbacks;
  • how you work;
  • some powerful motto and call to action.

At the end of the trip across your book, the client should be completely confident in your brand and want to buy your product. – The successful marketing kit acts in this way.

Creative Design for the Best First Impression

And here is the sweetest part of your preparation. Now you have many ideas, even much more information, the structure, and powerful texts. It’s time to dress this up and make it look just amazing. Do you remember the question about your brand colors and style? – Take them into consideration, while creating your cover and book look.

The design could be different, but remember that it should be focused on your main thoughts and powerful texts. It’s better to use clean and modern design, add qualitative infographics and pictures to each page. And follow the rule: one page for one item of the plan above. Focus on details is our everything.


If you’ve done all discussed things, congratulations! Now you can celebrate the release of your first marketing kit! Send it like e-book to your clients via email, or print it and show at the business meetings, conferences, exhibitions, and of course, on the life meetings with customers. And let it bring you success and boost your sales drastically!

Wish you inspiration and a lot of great ideas!

10 Great Magento Benefits for Your Website

Everyone who is going to launch the online business sooner or later faces the choice of engine for the online store. The variety of eCommerce platforms is quite huge, but today we’ll talk about the most popular eCommerce CMS, the leader of choice and great Magento® benefits.

Focus on eCommerce

Magento is a perfect solution for eCommerce. The opportunities of this powerful platform can satisfy virtually all online store owner wishes and requirements. Magento development is a good well-thought-out solution because you can get the most necessary features and functionalities right out-of-box. The product management is automated here. Such features, as stepped filtration, grouping into sets, last viewed and added products, modules of shipping, cart, payments, feedbacks, and recommendations are accessible by default.

SEO

The search engines play ball with Magento. That’s why it’s not very difficult to lead your website to Top search positions, using the right approach and SEO tools. Automatic settings create XLS website map, which is necessary for the search robots. It has a positive influence on the website traffic and sales.

Simplicity in Management

This CMS is quite complicated, but with a qualitative web development result, the website management won’t be hard. The admin panel is user-friendly and convenient. All its elements are organized clearly and logically. So, editing the website pages and content is pretty easy. It has a great chance to become your favorite way of spending leisure time.

Advanced Catalog Features

Magento is a flexible CMS that allows the website to be user-friendly and easily customized. Comparison, reviews, ratings, and multilevel navigation help the customers to find the product they are looking for very quickly. System catalog management includes:

  • approving, editing and removing product tags;
  • virtual products;
  • personalized products – uploading texts for monograms;
  • graphic image management with the opportunity of automated resize;
  • the opportunity of redirect for search results.

High Level of Security

Magento based websites are stable, secure, and high-speed. They are resistant to hacker attacks. And the greatest thing is that Magento has a massive community of web developers, who improve it day by day.

Ready Solutions

There are numerous free themes and modules for Magento that can help you to create a cool online store with minimum costs. And thanks to its extensibility, you can order any Magento custom solution, which suits exactly your goals and wishes.

High-Level Analytics and Reports

Magento has all the necessary tools for reporting and detailed analytics, which allows you to manage the website effectively based on the customers’ behavior:

  • RSS feed for new orders;
  • tax report;
  • report on the products in the cart, which were not bought;
  • report on the most viewed products;
  • report on feedbacks;
  • report on the best clients, who gathered more points by the number of orders;
  • report on discount coupons.

Great Marketing Tools

Magento will be your reliable partner in your effective marketing strategy. If you need something for boosting your sales, customer loyalty, and the number of clients, discounts, coupons, bestsellers, novelties and other promotional things will do their best for you.

Professional Support

Magento community is developed quite well. The best experts work on this powerful CMS, and it becomes more and more flexible. There you can get an answer to almost any question. Forums, databases, wiki-resources provide you with helpful knowledge.

Grow Sales via Automated Emails

If you are an owner of the online store or just thinking about how to create the online the shop, this article is for you. Everyone will say that he would like to sell more and get more benefits. But have you ever thought about building long-term relationships with a customer? Today we’ll talk about the first step of eCommerce marketing – automated emails.

Online shops are built on the B2C model when a customer buys some product of some company. In this case, there is a very important question: how to build the relationships between one person and the whole company, especially when the number of customers is large, and you need to communicate with everyone?

The great solution is email marketing.

Email marketing is more to relationships than just sales. It’s a way of communication between the company and a customer. Using the good approach, you can build the high level of credibility and interest to your brand. You can implement it in different ways, and if you go right, it will bring many benefits. Let’s look how it works in eCommerce. And the first step you can do is to set up automated emails.

Automated Emails

“Say Hello!” Emails

The first case for automated emails is a customer’s registration in your store or blog. Maybe, you want to say hello. – Just do it! Set up automated emails, which will congratulate the customer with the signing up to your store and announce interesting things you will send him monthly or weekly. It will be the first step towards your long-term communication. And more: you do it with all your customers. It’s like the first meeting when we try to leave a good impression. And here is the first benefit:

You always keep in touch and build a long-term communication.

“Returning to a Store” Emails

Let’s imagine that you have an online bookstore based on Magento®. You get new books and have many customers. Someone views your products, chooses the book, and adds it to the shopping cart. But suddenly he stops, decides to think a bit, and goes away. Then a customer forgets about the book, and you loose him. What can you do with this?

You can send him a short reminding email, that he’s left a product in a cart, and maybe he would like to buy it. And even more: you can also promote some books, which can interest the customer. As the result, you can return the customer to your website and let him do shopping. So now are you thinking about the number of the customers who left their carts? You get a great advantage:

You return the customers to your store, and they can do shopping.

How to do this with such a large number of people? – Set up your automated emails, which the customer gets when he makes some action on the website (in this case, he adds a product to a cart and goes away). If you trust Magento, and it’s a platform of your web store, try our Abandoned cart free module.

“Thanks for the Order” Emails

thankful emails

Have you ever got thankful emails in some online shop? – If yes, how do you think, what the goal of such emails is? – Maybe, when you make an order or buy something in the online store, you want to be sure that your payment is accepted, and everything’s alright.

And what if we say even more? Such emails can thank, clarify the details of the order, and also show the store’s products, which can be interesting for a customer.- Yes, it really works. Your emails could be customizable. You can adjust them according to your needs and goals: send a customer something valuable, like the useful article from your blog, or a discount for the next order, or show him the most popular products from the category related to his ordered product.

But don’t forget to thank 🙂

Also, in several days after the product delivery, you can send the email with an ask to leave the feedback for your products. In such way you gather the feedback, get more traffic to your website and make the customers remember you.The main task is to make a client confident, happy, and satisfied. If the customer gets all necessary information and even some pleasantness, some other time he will return to your store again.

Let the customers be confident – they will feel your care and like your store.

The Main Idea

We have just got acquainted with automated emails and what they can do for your business. They simplify the mailing process but don’t do everything themselves. We should think out such letters carefully and make them completely friendly and valuable.

The main advantages for a customer are the following:

  • such emails make him (her) confident and summarize the details;
  • they create communication between a customer and a store;
  • they can give exclusive opportunities (discounts, useful articles, interesting products).

As for the store owners, the benefits are evident:

  • such emails simplify the communication between the whole online store a large number of customers;
  • you return your customers to the store;
  • you get the feedbacks and additional sales;
  • the level of customer loyalty grows.

And here is the main thought: when a customer gives you an email, you get a very valuable thing. It’s like a friend who gives you a phone number. That’s why, we should appreciate this and send only qualitative content, friendly texts, and valuable information. Then we can make a step to a new level of relationships: a customer newsletter. – Let’s talk about how to become friends with a customer in the next release.

Magento 2 Improvements: Meet the Future

The future is coming. An online store becomes more and more powerful. Today we’ll look at one of the best eCommerce platforms, loved all over the world, and it’s a welcome version. Ladies and gentlemen meet Magento® 2, the open-source, innovative, and modern solution! What are the leading Magento 2 improvements, which we face while using and testing it? Let’s look at the benefits of Magento 2!

Top 5 Magento 2 Improvements

Innovative Architecture

The file structure is entirely different from the previous version. Now everything is placed right under the construction of the app. Every module has its own Views directory, which gives you the access to elements and files of any specific module.

What does it mean for you? – It allows the qualitative Magento 2 modules to be compatible with each other and core. It decreases the chance of problems and errors on the website because of the new module installation. This fact allows an administrator to upgrade the online store with minimum risk.

The new structure is a giant step forward. There is no other technology on the market now like this one. So, it happens again: Magento 2 is a market leader like Magento several years ago.

Simplified Web Development Process

With the release of Magento 2.0, the platform becomes more flexible and powerful. Magento framework is improved. Module base code makes the process of website customization more straightforward and convenient. Frontend development becomes more comfortable with Blank Theme. It provides the web developers with a stripped down version of the theme. So they need to add some features and customize their project.

Blank Theme among Magento 2 advantages

One of the best Magento 2 improvements is that web development process became open. The community uses GitHub as a public development platform. So you’ll get the qualitative support from the developers if you have any issues or need a piece of advice while moving to Magento 2.

Easier Website Management and Update

Magento 2 user experience is excellent. That’s why any experienced user of Magento will be pleased with a new look of the admin panel. Backend UI now is much more comfortable and user-friendly. Users can see the statistic of each store view with the help of the Scope Filter.

A useful feature of Magento 2 is an approach to a menus system. It is grouped into two primary functions: eCommerce and System. That’s why all your menus are organized logically, more user-friendly, and you can see them in a Flat menu type. An updating process also became much easier. Now you can use Composer software to get updates directly.

Website Performance Improvements

One of the significant Magento 2 improvements is that website performance based on Magento 2 increased by 40%. The reason for such significant changes is an improvement of indexers, implementation of the own testing system, that allows creating test environments and test code changes. Also, Varnish caching technology helps to reduce the server load time. All these factors lead to the speed of growth. By the way, the high website performance can increase the conversion rate of your online store. Learn more about page loading speed and conversion.

But also it requires more server resources than Magento. The system requirements are:

  • PHP 5.6
  • MySQL 5.6

Magento 2 is a new release of Magento with changed architecture, better speed, and more user-friendly management process.

Shopping Cart with Ajax

A handy feature is related to a shopping cart and checkout process. In Magento 2, adding products to the cart feature is implemented with Ajax technology, so this process goes without the page reloading. One of new Magento benefits is that you can edit the cart data in a drop-down block. Also, both Magento Community and Enterprise Editions support a lot of popular payment methods and the needed ones can be added with a use of modules.

Responsive Design vs Mobile Version vs App

How many times do you ask yourself the question about the difference between responsive design and mobile version or app? If you thought about it at least once, you are on the right way! Let’s face it.

It’s really important nowadays to have one of these things. The huge amount of website visitors look through the content, surf the Internet, and even shop online. If your website is not convenient to use on mobile devices, you lose 30% of potential customers on a daily basis. But you can always overcome this situation and choose the most effective solution. Now we are here to do it. Let’s go.

Responsive Design

Responsive web design is a method of markup development, which allows web page adjustment to the screen resolution. Then it looks good on any device.

responsive design

Pros of Responsive Design

  • A website displays correctly on any device.
  • It is one website with only one URL, so it’s convenient for users.
  • All beautiful design elements are saved and displayed on any device.
  • Meets Google’s requirements of usability.
  • The price of development is lower than for mobile versions or apps.

Cons of Responsive Design

  • Large web pages can slow down the website speed.
  • It gives no choice for the user. Whether he likes the responsive design or not, he can’t switch the version.
  • Every web page needs changes to become responsive.
  • It is not so interactive, as the mobile version. And it couldn’t solve the different tasks for users. Desktop visitors need full features, but mobile users sometimes just want to buy something, look through the contact information, or check the bill.

For Whom

The responsive design suits small projects, like business card websites, and blogs, where it doesn’t require a lot of interaction with the user. Why? – For example, let’s look at the banking system. On a desktop, you need to read the information about the company, search for the bank in your location, check the statement of account, and order a credit card. On a mobile phone, you’ll more likely need to check and top-up an account or look through the bank contacts. The other website items and pages are unnecessary in this case. But the interaction links, menus, and buttons should be better. Here the mobile version wins.

Mobile Version

The mobile version is the other website that is created specifically for a mobile user. It is interactive and user-friendly and developed exactly for the convenient interaction with a website via the hand fingers.

mobile devices

Pros of Mobile Version

  • The simplicity of changes. A developer doesn’t need to change each web page. It requires the development of a new website version from scratch.
  • High level of usability. It is often the simplified version of the desktop website with necessary features for mobile users. Everything there meets the criteria of convenient use on mobile devices and interaction with a user.
  • Page loading speed. As the website is simplified and optimized for mobile devices, there is less content and pages inside. Note, the user is not ready to wait more than 3 seconds for page loading. Learn more about page loading speed and conversion.
  • An opportunity of choice. The user can always switch to the desktop website if he doesn’t like the mobile version.
  • Meets Google requirements for convenient usage on mobile devices.
  • Talking about online stores, it provides the user with the opportunity to buy products with minimum actions (1-3 clicks).
  • Entering the market is free.
  • Open and accessible for everyone who has an internet connection.
  • It doesn’t require downloading and installation.
  • It is competitive among the other websites and SEO is useful in this case.

Cons of Mobile Version

  • It doesn’t play well with too large images.
  • A level of personalization is not high because the mobile version is more focused on services than on a user.
  • Not all mobile devices support their offline use.
  • It doesn’t access all mobile phone functionalities.
  • The price for web development is higher than for responsive web design, and usually, equals to the price for mobile app development.
  • Additional costs for maintenance and support.
  • A part of the content could be cut out.
  • You’ll have several web addresses.

For whom

The mobile version is suitable for the owners of complicated websites, such as online shops, social networks, portals, and mail services. It is useful for those who want to realize the whole spectrum of mobile features and feel their advantages.

Mobile App

A mobile app (or mobile application) is designed only for mobile users, who have access to the App Store.

Pros of Mobile App

  • High level of usability and interactivity.
  • Access to all device functionalities.
  • Ability to use offline.
  • Suitable for use on a daily basis.
  • It creates an icon on the mobile interface.
  • High level of personalization and user orientation.
  • Displayed well on any mobile device.
  • Supports high-quality graphics.

Cons of Mobile App

  • Requires development for several operation systems (Android, iOS, and Windows).
  • It can be used only on smartphones and tablets.
  • Entering the market is not free. You’ll have to pay for the license to AppStore, Android Market, Market Place.
  • It’s accessible only for those who accepted a license agreement.
  • Needs, costs, and resources for aiming the top positions are in search. It is competitive on AppStore, Market Place, Android Market, Ovi.
  • It requires constant updating and maintenance;
  • Most free apps leave up to 30 days, then the interest to them reduces.
  • The user should take more action to get access to the app.
  • The price of web development is higher than for responsive design.

For Whom

A mobile app is a great solution for large and complicated websites and portals. It makes the user experience very convenient. But before he starts, he should download and install the app. That’s why it’s more suitable for a popular and trusted project. In this case, the users will download a mobile app more likely.