How to Show Information from Product Inputs in the Shopp Order Receipt

Shopp allows your customers to enter information on the product page by using the Shopp product input API call. This information is then stored with the order in Shopp orders. It is also possible to show that information on the order receipt and we’ll show you how to do that in this guide.

Edit your Receipt.php Content Template File

Login to your WordPress root with your preferred SFTP or FTP client. If you are using a Mac, then recommend Transmit. If you are on another system, then try Cyberduck or FileZilla.

Next, browse to your Shopp content templates folder in this location:

/wp-content/themes/yourthemefolder/shopp

Now locate the receipt.php file and open it for editing.

At around line 78, you’ll see the following:

 <?php while ( shopp( 'purchase.items' ) ) : ?>
 <tr>
 <td>
 <?php shopp( 'purchase.item-name' ); ?><?php shopp( 'purchase.item-options', 'before= – ' ); ?><br />
 <?php shopp( 'purchase.item-sku' ); ?><br />
 <?php shopp( 'purchase.item-download' ); ?>
 <?php shopp( 'purchase.item-addons-list' ); ?>
 </td>
 <td><?php shopp( 'purchase.item-quantity' ); ?></td>
 <td class="money"><?php shopp( 'purchase.item-unitprice' ); ?></td>
 <td class="money"><?php shopp( 'purchase.item-total' ); ?></td>
 </tr>
 <?php endwhile; ?>

The coding above grabs certain parts of a Shopp order (i.e. a purchase). We can expand upon it to have it retrieve more information by adding Shopp purchase item inputs list. [Read more…]

How to set a Checkout Form Field to Required on the Shopp Checkout Page

By default, only certain form fields are required on the Shopp checkout page (e.g. example.com/shop/checkout/). For example, a name, email, and address is required. However, the other form fields such as company name and phone number fields are not.

In this tutorial, we’ll learn how to set form fields on that page to required.

Edit your Checkout.php Content Template File

Login to your WordPress root with your preferred SFTP or FTP client. If you are using a Mac, then recommend Transmit. If you are on another system, then try Cyberduck or FileZilla.

Next, browse to your Shopp content templates folder in this location:

/wp-content/themes/yourthemefolder/shopp

Now locate the checkout.php file and open it for editing.

At around line 39, you’ll see the following:

<span><label for="phone"><?php _e('Phone','Shopp'); ?></label><?php shopp('checkout','phone','format=phone&size=15&title='.__('Phone','Shopp')); ?></span>

The first part of the code snippet above includes a form field label of Phone. [Read more…]

Managed WordPress Hosting

Improve Delivery of Order Emails by using a Transactional Email Service

Having trouble with some order emails arriving in the junk or SPAM email folder? A transactional email service like Postmark app or Mandrill can help!

These services work by taking over sending emails from the native wp_mail() function on your site. This means that all emails from WordPress (e.g. password resets, new user notifications, comment notifications) will be handled of for you. An additional benefit is that emails will be received much quicker than before.

Step 1: Select a transactional email service

Postmark App and Mandrill are two popular transaction email services. Click on the links to learn more about each service. Then register with one of the services.

Learn more about Postmark App

Learn more about Mandrill

Step 2: Install and setup a WordPress plugin for your selected service

Now that you have picked a transactional email service, you’ll just need a plugin to connect the service to your WordPress site. Click on the link below for the service that you have selected. Then download your plugin and upload through WP-admin –> Plugins –> Add New –> Upload. [Read more…]

How to Remove Extra Fees and Order Handling Fees from Free Shipping Options

Extra fees are fees that are set on a per product basis through the Shopp Product Editor. A order handling fee applies once to an order and can be set through Shopp system –> Shipping settings. Currently these fees apply to all shipping options including paid and free shipping options.

In this tutorial, we’ll learn how to remove order handling fees and extra fees from a free shipping option in Shopp.

This will be done using the shopp_shipping_fees filter.

Here is an example of the filter:

It works by checking for a specific slug of the free shipping option that is setup in a store. If it finds it, then any associated shipping fees (e.g order handling fees or extra fees) are changed to zero. This is helpful if you are using a free shipping rate for an in store pickup option.

You can add this filter to your site by adding it to your child theme’s functions.php file or a site specific plugin.

A Checklist for Upgrading to Shopp 1.3.x

In this guide you’ll learn how to upgrade your site to Shopp 1.3.x. Lets begin by defining some terms that will be used throughout this article. It is okay if you are not familiar with all of the terms or phrases.

Upgrade Primer for Shopp

Taking a look at them now will make following this tutorial for upgrading Shopp much easier.

  • Backup your WordPress – this is really important as it allows you to restore your data should something go wrong. This is a good practice!
  • WordPress dashboard – this is the WP-admin or the backend of your WordPress site where you log in with your username and password
  • SFTP/FTP client – this software allows you to login to your remote WordPress site so you can view folders and files and make changes as needed
  • Shopp templates – these are the theme and content templates that handle the layout and styling of your store
  • Shopp add-ons – these are your payment gateways and your live shipping rate calculators

Now that we have defined those terms, lets now talk briefly about expectations.

The first version of Shopp (1.0) was released six years ago in December 2008. The Shopp 1.1.x platform was released four years ago in August of 2010. The Shopp 1.2.x platform was released in February of 2012.

During this time WordPress has changed and so has the Shopp ecommerce plugin.

Custom coding and/or Shopp templates that were created several years ago will not work out of the box with the current version of Shopp. These will need to be updated. This also applies for Shopp add-ons. A payment gateway written several years ago will not be compatible with the latest version of Shopp. Here are some other changes to be aware of if you are upgrading from Shopp 1.1.x or older:

  • The Shopp menu has been expanded into Shopp and Catalog respectively
  • Shopp information is now stored in the dbprefix_shopp_ tables (wp_shopp_) with supporting information in native WordPress database tables
  • Your product IDs will change as these are now stored in the dbprefix_posts (wp_posts) table
  • Shopp pages are now virtual and no longer use the four WordPress pages with shortcodes
  • Taxonomies such as product categories are handled differently. A link like this example.com/shop/category/my-parent-category/my-child-category will become example.com/shop/my-child-category/
  • Shopp add-ons are stored in /wp-content/shopp-addons

Have the changes above made you nervous about upgrading? [Read more…]

How to Add a Terms and Conditions Option to your Shopp Checkout Page

In this post, we’ll learn how to add a terms and conditions option to the checkout page for Shopp 1.3.x and up. This will be done by editing the checkout.php content template file and using the shopp checkout clickwrap API call.

Shopp content templates will be needed. These templates files will ensure that your customizations are not lost on a software update and they can be setup through WP-admin –> Shopp setup –> Presentation.

Add a Terms and Conditions Checkbox to the Checkout page for Shopp

Login to your WordPress root with your preferred SFTP or FTP client. If you are using a Mac, then recommend Transmit. If you are on another system, then try Cyberduck or FileZilla.

Next, browse to your Shopp content templates folder in this location:

/wp-content/themes/yourthemefolder/shopp

Now locate the checkout.php file and open it for editing.

At around line 2, you will see the following:

<form action="<?php shopp( 'checkout.url' ); ?>" method="post" class="shopp validate" id="checkout">

Add the validation-alerts class to the form. The resulting code will be:

<form action="<?php shopp( 'checkout.url' ); ?>" method="post" class="shopp validate validation-alerts" id="checkout">

This step will enable pop up validation alerts for required fields on the checkout page. [Read more…]

How to Add Pop Up Validation Alerts to your Shopp Checkout Page

Today we will show you how to set up pop up validations alerts for your checkout page in Shopp. By default Shopp uses validation alerts on the individual form fields. Here is an example:

shopp-validation-alerts

The form fields “First,” “Last,” and “Email” have all changed to a red color (order was submitted) because those are required fields and no information has been entered and therefore is invalid.

Here is what pop up validation looks like:

shopp-pop-up-validation-alerts

It provides a notice on the first field of the form that is empty or has an invalid value. If we were to enter a first name and a last name and try to submit the order, then the next pop up validation would be for the email address. [Read more…]

How to Add the Customer Phone Number and Email to Order Receipt

In this article, we’ll show you how to add the customer phone number and email to the email receipt that is sent out after a purchase. This will be done using the receipt.php content template from Shopp 1.3.x and the API calls for shopp purchase email and shopp purchase phone.

Shopp content templates will need to be running. You can check if the are active by logging into your WordPress dashboard and going to Shopp –> Setup –> Presentation. Once on that page, you should see a checkmark next to Enable theme content templates. If you do not see a checkmark, then please follow the instructions on the page to setup your Shopp content templates.

These templates will ensure that your customizations are not lost on a software update.

Customize the Receipt.php content template

Login to your WordPress root with your favorite SFTP/FTP client. We use Transmit which is available for Mac. Some free options are Cyberduck and FileZilla.

Now browse to the location of your Shopp templates folder. They are located in a subfolder within your theme’s folder:

/wp-content/themes/yourthemefolder/shopp

Now locate the receipt.php file and open it for editing. Now browse the code of the receipt.php file so you can familiarize yourself with it. The file is organized like so: basic information such as order number and date appears at top, the billing and shipping address appears next, and the order information appears last. [Read more…]