Drupal 7

Calculate Shipping Based on Subtotal Drupal 7

  • Posted on: 15 August 2017
  • By: jmu

Recently, I am struggling how to calculate a shipping fee based on the subtotal instead of the total (total might include tax, default shipping fee and so on). I found a sandbox module called Commerce Order Sub-total. The rule condition part works perfectly for me. However, this module only provides one rule action which returns "NUMBER" instead of "DECIMAL". In order to implement "calculate a shipping fee based on the subtotal", I need to use the result from "Commerce Order Sub-total" rule action in "Calculate a Value" action.

How to create custom commerce order state programmatically Drupal 7

  • Posted on: 27 April 2017
  • By: jmu

Right now, I am working on the e-commerce website, and trying to add some "ORDER STATE" that drupal doesn't provide by default. In this tutorial, I will provide the code and some samples. It is very simple to create custom states. Let do it!

If you have never created a custom module, please briefly read the official tutorial first. You can find it here.

Feeds API Examples on Drupal 7 (developer guide)

  • Posted on: 21 September 2016
  • By: jmu

For the production web, importing large data is very important. When using Drupal, Feeds Module is the best choice for importing data. They released a very stable version for 7.x, but version 8 is not ready yet. If you are using Drupal 8, you can contact them to tell them your usage and help them improve their work.

Allow class and id attributes in the CKEditor

  • Posted on: 20 September 2016
  • By: jmu

  When I first configured my website, I used WYSIWYG module as my editor. It allows me to integrate several different types of editor library. But right now, I decided to use CKEditor Module as my only editor. Don't get me wrong. Wysiwyg module is powerful. However, I am a lazy guy and using CKEditor Module is a better choice for me.

Apache Solr Setting on Drupal 7 (With error info)

  • Posted on: 7 September 2016
  • By: jmu

  In this blog, I will give a tutorial that how to set up apache solr on Drupal 7, and share some solutions for common problems such as the error message: 'An error occurred while indexing: "500" Status: Internal Server Error: Internal Server Error HTTP Status 500 - /var/solr/example/solr/data/index/_0.fdt (Permission denied) java.io.FileNotFoundException: /var/solr/example/solr/data/index/_0.fdt (Permission denied)'