The Commerce Card on File module provides an API with a user interface for storing and reusing credit card data on subsequent orders. This module didn't hold full card numbers locally. Instead of this it stores the remote ID of the full card data from the payment gateway that is used to validate and process your credit card transactions.
Technical Blog
drupal_add_js() function is mainly used to add JavaScript to the page, either as reference to an existing file or as in-line code (by writing the code directly in the page). But it also add settings to Drupal's global storage of JavaScript settings. These settings can access using Drupal.settings variable in JavaScript file.
We can create custom rules programmatically using the function hook_rules_action_info(). hook_rules_action_info() is a useful hook provided by rules API to create custom rules programmatically. We can use our custom functions to perform the actions that we require.
Following is a sample of the hook_rules_action_info implementation:
The Paragraphs module is a new way of content creation. Instead of putting all contents through WYSIWYG body field, including videos and images, end-users can now choose on-the-fly between pre-defined Paragraph Types independent from one another.
In Drupal 7, when we do customizations we would want the custom module to create content in the form of a render array. We know that a page callback should return a render array which allows the custom module to handle the content as long as possible in the page generation process. Sometimes, wrapping two render array elements together could be an easy way out while dealing with render array manipulations. Here is how we can achieve that.
In Drupal 7, a theme function is a PHP function that is used to wrap the output variables with HTML. For adding a theme function in our custom Drupal 7 module, we need to implement hook_theme(). A theme function is prefixed with 'theme_'. However, they can't override existing theme functions. Such functions are invoked using theme() rather than being directly called. Also, they are faster compared to the template (.tpl) file implementations.
In one of my Drupal projects, I had a requirement to submit data from a webform to an external application. hook_webform_submission_insert() helps to meet my requirement. In your custom module, call the hook function hook_webform_submission_insert().
The last release of Drupal was about three years back and Drupal lovers - site builders, developers and administrators - are more than excited to get their hands on the hottest addition to the Drupal Web Development family, Drupal 8. With over 1700 contributors working diligently at building the latest version of Drupal, it comes as no surprise that Drupal 8 has exceeded the expectations of its loyal users and arrived with a bang.
While working on a Drupal 6 project, I came across the requirement to send some mails. Interestingly, I couldn't find any good articles or procedures on the same. So, here, I am going to explain how to send mails in Drupal 6 with attachments. If you need any business support, get in touch immediately.
The purpose of implementing hook_theme either in a custom module or theme is to register it's theme implementations which specify how a particular render array is to be rendered as HTML.
As the name suggests, a preprocess function is a precursor to a theme function. It runs first, irrespective of the fact that the theme function can also be implemented as a template (.tpl file) rather than a function. Preprocess functions can be implemented in both modules and themes. However, the preprocess implementations from modules run first, and those by themes run only last.
In one of my project, I want to display a hierarchical structure of an array by using D3 JS, which should be collapsible. Lets checkout how we can implement, D3 JS in Drupal 7 with collapsible concept. Do you want the implementation like this, get a quote and make use of our expertise.
Drupal has grown to be recognized as the most powerful and practical modular framework used by numerous website developers and business owners. The CMS community has adapted to the versatile and extremely functional structure of Drupal very quickly and Drupal modules have risen high on the must-have charts of web developers.
The drupal_write_record function is used to insert or update a record in the database based on the schema of the table. It helps in executing less database query. Let's take a look at the function given below.
While working on a Drupal project, I had to draw three concentric circles. Each circle was supposed to display the currently entered data in three text areas, called a golden circle. Using Raphael's JavaScript vector graphics library in Drupal 7 makes your work really simple. Please go through the following steps:
View is the one of the popular Drupal module. Views are used to display a list of data, table of data etc. This article will guide you in recreating a view in Drupal 7. Its very easy to recreate a view.
Now all themes are in responsive manner. Bootstrap is the one of the best responsive theme. Its the good starter theme for Drupal 7. It has a lots of specific styles for every designs and we can create a subtheme from Bootstrap theme. It also become a good responsive theme.
Here I am listing some methods to clear Drupal caches. Drupal caching is done to improve and enhance overall performances of the site. Its always recommended to enable the page caching and block caching in Drupal.
Rules are very important and most common using thing in Drupal. We can create custom rules programmatically using the hook_rules_action_info. There is a useful hook hook_rules_action_info() provided by rules api to create custom rules programmatically. Using this We can use our custom functions to perform the actions that we require.
The drupal_static() function provides a temporary storage for data that should stick around even after execution. It also provides the central static variable storage. It preserves the data within a page request as well.