Skip to main content
Home
Toggle menu
  • Home
  • Drupal Training
  • Login
  • Register

Drupal7

Drupal: SCORM & HTML 5 course link on node page

Drupal7

This Drupal 7 CodeLet creates a link to the SCORM or HTML 5 course from the uploaded zip file. This associates an SCORM or HTML course to a node in Drupal.

Drupal
Drupal 7
Copied to clipboard

Drupal : Send Ubercart PayPal payment to node author

Drupal7

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 ubercart
Drupal7
Copied to clipboard

Drupal: Integrate A-frame & enable VR features

Drupal7

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.

Aframe
Drupal7
Copied to clipboard

Drupal: Create Drupal7 node Programmatically

Drupal7

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.

Drupal Developer
Drupal7
Import node
Copied to clipboard

Drupal7: JSON, hook_form_alter & hook_menu

Drupal7

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.

Drupal7
Drupal hook
Copied to clipboard

Magento: Display related products block on the Onepage checkout

Drupal7

This CodeLet display related products of cart items on the Onepage Checkout at the bottom.

Follow steps to add related products on the Onepage checkout page.

  1. Edit the onepage.phtml file located at /app/design/frontend/default/your_template/template/checkout
  2. Add the following code end of the file:
     
Magento
Onepage checkout
checkout
Related Products
Copied to clipboard

Drupal: Commerce buy now

Drupal7

This CodeLet will redirect the user to checkout page when user clicks on 'Buy now' button on the product

Use the code and create a custom module

Make sure you keep the weight of the module high in "system" table
 

Drupal
Drupal commerce
Copied to clipboard

Drupal: Pass ids as arguments to page VBO action

Drupal7

This CodeLet add already implemented  "Pass ids as arguments to page" on VBO. 
Place this CodeLet to your custom module, you can see the customization on Bulk Operations field  on the image.

Views
VBO
Drupal
Copied to clipboard

Drupal: Using #ajax on a form

Drupal7

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
ajax
Drupal Developer
Copied to clipboard

Drupal: Add products to cart programatically

Drupal7

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
Drupal Developer
Drupal commerce
Copied to clipboard

Pagination

  • Next page ››
Subscribe to Drupal7
  • Home
  • Drupal Training
  • About
  • Contact

Claim your $200 hosting credit now!

sfy39587stp18