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.
I was working on the address form these days. Here are the US states in JSON format which includes the full state name and the Abbreviation.
Recently, I am working on Angular 2. When I tried to send the description by POST request, I found that the '+'(plus) sign cannot be passed to my backend. Then, I read the official document here, and found the reason.
These are the characters that are not encoded:
! $ \' ( ) * + , ; A 9 - . _ ~ ? /
But they also provide a solution if you have to use these characters. I will give an example in this blog.
Here is a quick guide about how to use a different theme for the mobile device in Drupal 7.
How to find duplicate value in MySql.
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.
This note is about to find file's location by using file name on a Linux terminal.
Get the current node id or get the current page argument from the URL. EG. Whether it is a cart page...