Our custom software solutions will let you experience the next level of digital transformation. Laravel / Drupal / WordPress / ReactJS / TailwindCSS

Blog

  • Load Taxonomy Terms In Alphabetical Order In Drupal 7

    Load Taxonomy Terms In Alphabetical Order In Drupal 7

    Managing taxonomy terms efficiently is crucial for maintaining a well-organized content structure in Drupal 7. By default, it may not be ordered alphabetically, which can be a challenge for content editors and users who rely on an intuitive structure. The code below demonstrates how to load taxonomy terms in alphabetical order in Drupal 7, ensuring…

  • Braintree Payment gateway Integration in MEAN Stack

    Braintree Payment gateway Integration in MEAN Stack

    Integrating the Braintree payment gateway in a MEAN (MongoDB, Express, Angular, Node.js) stack involves several steps. Below is the method to Integrate the Braintree Payment gateway in MEAN Stack while developing software. The Braintree Node.js library with Braintree’s servers.Prerequisite:Install Braintree node package:For more information or help with this step, see our API Credentials support article. In…

  • Drupal 7 | Delete Field Collection Data In A Particular Content Type.

    Drupal 7 | Delete Field Collection Data In A Particular Content Type.

    We have a content-type basic page in Drupal that has a date field. We use this code in a custom module to delete field collection data in Drupal 7. At Sreyas, we are well-resourced with Drupal developers who have vast experience in developing an application in the latest version of Drupal. Apart from Drupal 7…

  • How to render taxonomy in page template in Drupal 7

    How to render taxonomy in page template in Drupal 7

    Display taxonomy terms in a page template in Drupal using multiple methods. The easiest way to solve an issue is to let it deal with by experts. We can provide a wide range of web services. Get in touch with us to know more. $vocabulary= taxonomy_vocabulary_machine_name_load(‘vocobulary_name’); if ($terms = taxonomy_get_tree($vocabulary->vid)) { foreach ($terms as $term) { $term_name =…

  • Add fields to WordPress user profile

    Add fields to WordPress user profile

    The following snippet will add fields to the WordPress user profile in your profile section. In this code, we provide two fields, Sales Partner and Address. You can add any number of fields. These fields are saved in a user profile. So need to create an extra table to store this data in WordPress. function…

  • How Contact Form submitted data into a table in WordPress(WPCF7)

    How Contact Form submitted data into a table in WordPress(WPCF7)

    The code below demonstrates how to insert data from a Contact Form 7 submission into a custom table in WordPress. This code should be placed in your theme’s functions.php file. First, ensure you have created a custom table in your WordPress database. Explanation of the Code: Additional Notes: This setup allows you to efficiently capture…

  • Creation and Remove custom form fields using ajax in Drupal 8

    Creation and Remove custom form fields using ajax in Drupal 8

    Below given is the code for the creation and removal of the custom form field using Ajax in Drupal 8. public function buildForm(array $form, FormStateInterface $form_state) { $form[‘#tree’] = true; $form[‘#prefix’] = ‘ ‘; $form[‘#suffix’] = ”; $form[‘#cache’] = [‘max-age’ => 0]; $nb_sponsee = $form_state->get(‘nb_sponsee’); $form[‘sponsees’] = [ ‘#type’ => ‘container’, ‘#prefix’ => ‘ ‘,…

  • Code For PHP File For Saving The Graph As An Image Inside Your Folder

    Code For PHP File For Saving The Graph As An Image Inside Your Folder

    Given below is the PHP code for saving a graph as an image inside the folder. At Sreyas, experienced PHP developers are available for customizing the requirements of clients. This script captures image data from a POST request, processes it, and saves it as a PNG file in a specified directory. php $img_data = $_POST[‘data’];…

  • Stripe Integration In Drupal 8

    Stripe Integration In Drupal 8

    Stripe is a commonly used payment gateway. Stripe integration in Drupal 8 requires a stripe library. We can install the stripe library using Composer. Use the following command to install the stripe library using which Stripe integration in Drupal 8 is possible. public function buildForm(array $form, FormStateInterface $form_state) { $stripe=array(“secret_key”=> “********************”, //Give your api keys…

  • Programmatically login a user in Drupal 7

    Programmatically login a user in Drupal 7

    There are scenarios where you may need to programmatically log in a user in your Drupal site, such as during a custom registration process, single sign-on implementations, or for testing purposes. Below is the to programmatically log a user in Drupal 7. //Auto login new user $account = user_load($uid);// $uid is the user id $user_account…

  • How to add a “Buy Now” button along with the “Add To Cart” button in Drupal Commerce ?

    How to add a “Buy Now” button along with the “Add To Cart” button in Drupal Commerce ?

    If you want to add a “Buy Now” button and an “Add To Cart” button to your Drupal eCommerce site, follow the code below. This implementation modifies the add-to-cart form to include a “Buy Now” button that directs the user straight to the checkout process. function custom_module_form_alter(&$form, &$form_state, $form_id) { if (strpos($form_id, ‘commerce_cart_add_to_cart_form’) !== false)…

  • C tools Modal Popup and Theming in Drupal 7

    C tools Modal Popup and Theming in Drupal 7

    Using the power of the Ctools Modal Popup and Theming in Drupal 7 we can create our own custom popups. Theming of popups can be done with the help of a js file, which we can alter accordingly. Here is an example of how to use Ctools to create a popup up to Update Profile…

Explore The Technology Used

Learn about the cutting-edge technology and techniques we use to create innovative software solutions.