If you are offering multiple coupons it can be useful to know which of them was used in an order. This code adds the coupon code to the order details and displays them in a separate row in the emails sent to the customer and admin.
If your preferred currency is not included with Classic Commerce you can easily add it (and a custom currency symbol) using this code.
It’s possible to add extra custom fields to the checkout process if you want to collect more information from the customer. In this example, extra fields for “student name” and “student year” are being added. There are a number of steps involved. First, the fields need to be created; then the data entry fields are … Read moreAdd extra fields to checkout process
This snippet adds a shortcode that can be used to quickly insert a link to any individual product page. The product is specified by id, for example [product_url id=”428″] and the title of the product is used as the link text.
To make it easier for customers to get back to the shop page from an individual product page use this code to add a button.
Payment gateways such as PayPal and Stripe charge a small amount for processing a transaction. This code adds a credit card surcharge as a percentage of the cart total to cover that amount. Examples are shown for PayPal and Stripe, adding 3% for each.
Use this code to attach a suffix to all prices. For example, you might sell wine only by the mixed case, so you could add ” in any mixed dozen” after the bottle price.
You can add a prefix to all prices with this code. For example, you could add “Only” before the price.
This code will another row to the order email table to add in some regularly recurring information about the order. In this example we are including a line about the standard one year warranty.