CodeLet

Drupal: SCORM & HTML 5 course link on node page

This CodeLet allows you to upload SCORM & HTML5 packages. It extracts them, save under files directory and create a link on Node view page.

Drupal : Send Ubercart PayPal payment to node author

This CodeLet alter the 'uc_paypal_wps_email' variable when PayPal payment is enabled with Ubercart & sets to node author's PayPal account email address.
This requires creating a field on user's account with name 'PayPal Email' (field_paypal_email).

Drupal: Integrate A-frame & enable VR features

This CodeLet integrates Aframe libray & displays images using Aframe. With a VR enabled device, you can then view it in VR. It first displays a wall of images. When user clicks on one of them, on a new page, it displays the image using aframe library.

Drupal: Create Drupal7 node Programmatically

This CodeLet will read data from an external API, parse the JSON response & build a node of specific type. It imports taxonomies & images as well.
The fascinating thing about this CodeLet is, it can import data to multi - value node fields, including multi widget fields & different field types.

Drupal7: JSON, hook_form_alter & hook_menu

This CodeLet demonstrates the use of hook_form_alter & hook_menu.
Using hook_form_alter, a text field is added to site information page. Once a API key is saved, the button has value 'Update configuration'
Using JSON menu, one can pull a node of type page, as JSON string.

Drupal: Using #ajax on a form

This CodeLet will ajaxify the respective element and will trigger an event. Respective action will be taken by the code and displayed on the form within the specified wrapper

Drupal: Add products to cart programatically

This CodeLet allows to add products to cart from code. The current product uses an extra text field. The cart view has been modified to accomodate extra fields from the product

Drupal: Redirect user after login

This is just a two lines of CodeLet which allows you to redirect your users after they log in to your site. This not complex and super quick

Drupal: Change User account title

This CodeLet will change the title of the User account page. It will consider and set user's 'username' as the titlte of the account page. Drupal offers this by default. But this can be used when some other modules have already modified the title.

Pages