In this part of the series we're going to dive in to setting up payment, shipping and coupons for your Exchange eCommerce store.
When taking payments on a website, regardless of whether that payment is taken on your website or on a third party website, it's a good idea to have an SSL certificate. You can read more about setting up SSL in WordPress in this Tutsplus tutorial.
iThemes Exchange ships only with PayPal as a payment gateway, with others available as premium plugins. However, Stripe is also currently free, but does not come bundled with the plugin and is not in the WordPress repository - in order to get it, you need to sign up to the iThemes website as explained below.
You may have enabled PayPal whilst setting up your Exchange site, depending on what options you chose. You can check if the PayPal add-on is installed by going to Exchange > Add-ons and scrolling down until you see the PayPal add-on. There's actually two PayPal add-ons included within Exchange:
PayPal Standard Basic
Exchange describes this as:
This is the simple and fast version to get PayPal setup for your store. You might use this version just to get your store going, but we highly suggest you switch to the PayPal Standard Secure option.
Paypal Standard Secure
Exchange describes this as:
Although this PayPal version for iThemes Exchange takes more effort and time, it is well worth it for the security options for your store.
In this tutorial, I'm going to show you only the PayPal Standard Secure setup, as it really doesn't take much longer to implement and is the recommended way. Please note, that you will need either a business or premier PayPal account in order to set this up.
- Make sure PayPal is enabled. From the WordPress dashboard go to Exchange > Add-ons and scroll down to "PayPal Standard - Secure"
- If it's disabled, click on the disabled button to enable the add-on and be taken to the settings page. If the add-on is already enabled then click on the cog icon.
- Fill in your PayPal email address
- Get your API credentials. As PayPal change their interface relatively frequently, it's best to get these using their official guide.
- Next, we need to setup an auto return in PayPal, this ensures that customers are redirected to your site when their transaction is complete. To find this section in your PayPal account, it's best to refer to their official documentation. Once you are in a position to enter your auto return URL, paste in the URL provided by Exchange.
- Finally, PayPal payment data transfer (PDT) needs to be enabled. At time of writing this is on the same screen as the auto return setting. This setting needs to be changed to "on".
- Click the "Save Changes" button.
There's also a couple of optional settings here that may be useful.
- The Purchase Button Label is the text that appears on the PayPal payment button. The default for this is "Pay with PayPal", simply edit with your own text if you wish to change this.
- The enable PayPal Sandbox Mode options brings up some additional settings where you can enter some PayPal sandbox data. The PayPal sandbox allows you to test payments without having to actually spend money. To create a sandbox account, head over to the PayPal developer website. Remember to disable this setting when your website goes live.
To get the Stripe add-on, do the following:
- From the WordPress dashboard go to Exchange > Add-ons
- From the add-ons screen, click the "Get More" tab
- Scroll down to Stripe (it should say $0) and click "Buy Now"
- You will now be taken to the iThemes website where you will need to fill out some details and make an account. Once you have an account, you can download the Stripe add-on as a zip file.
- Once you have the zip file, from the WordPress dashboard go to Plugins > Add new.
- Click the "Upload Plugin" button near the top of the screen.
- Click the "Choose File" button, navigate to where you saved the file and click "Install Now".
- Finally, click "Activate Plugin".
Now that the Stripe plugin has been activated, we need to enter some settings. From the WordPress dashboard, go to Exchange > Add-ons and then scroll down to "Stripe". The plugin should already be marked as "Enabled" by Exchange. To change the settings, click the cog icon next to the "Enabled" button.
The Stripe settings page has two mandatory settings, and three optional ones.
Step one is your API keys. These are found by logging in to your Stripe account, clicking the "Your Account" menu and then finally clicking "Account Settings". From your account settings, click the "API Keys" tab - you should see four boxes here with API keys in. At the moment, we're only interested in the "Live" secret and publishable keys. Copy the live secret key and publishable key from the Stripe dashboard in to the correct box on the Stripe settings page.
Step two is to set up a webhook. Webhooks allow Stripe to send messages to Exchange, for example a successful charge is made. From the Stripe settings within Exchange, copy the webhook URL that it gives you. Now head in to the Stripe dashboard again and click the "Webhooks" tab. Click the "Add URL" button, paste the URL in to the field and click the "Create webhook URL" button. Be sure to save these settings.
That's all of the mandatory settings for Stripe set up, but there's also some important optional settings that you may want to change.
The first optional setting is to edit the purchase button label (by default it's "Purchase") - this is the text in the button that people will click in order to purchase with Stripe.
Next, there's an image upload field for a checkout image. This should be a 128px x 128px image which will appear on the Stripe checkout.
The final setting here is to "Enable Stripe Test Mode" - checking this box will bring up a further form which allows you to enter a "Test Secret Key" and a "Test Publishable Key". These are found on the same form within the Stripe dashboard as explained above. Follow the same instructions, but copy over the test keys instead.
Test mode allows you to checkout using Stripe without having to use real money and is a great way of going through your checkout process prior to launching a website. Stripe provide some great testing documentation, including card numbers which can be used in test mode. Remember to un-check the "Enable test mode" setting before you push the website live.
Exchange is still a relatively young eCommerce platform and some areas are not yet quite up to par with its competitors.
Exchange comes with a shipping add-on called "Simple Shipping" which can be enabled by going to Exchange > Add-ons and then scroll down to "Simple Shipping". You may find the add-on is already enabled deepening on which settings you chose in the basic setup covered earlier in the series.
Once enabled, go to Exchange > Add-ons and then click the "Shipping Tab". The shipping tab has two sub tabs; general and simple shipping.
The general section has just one setting: "Can individual products override the global Shipping Methods setting?" - you have two options here, yes or no (default). If you set this to "yes" then it means you can remove a shipping method for an individual product.
For example, you can remove the "free shipping" option for a specific product. To do this, from the edit product screen (for more about editing products please refer to part four of this series) head down to the "Shipping" section and check the "Override available shipping methods for this product?" checkbox.
Next, uncheck any shipping methods that you want to disable for this product. You can also override the standard flat rate shipping cost from this area.
The "Simple Shipping" section allows for flat rate shipping and free shipping. Flat rate shipping is a single rate of shipping that applies to all products (unless overridden as explain above).
It has three settings:
- Enable? yes/no
- Shipping Label: This is the title of the shipping method for your customers. The default is "Standard Shipping (3 - 5 days)".
- Define Shipping Amount: This is the amount charged for shipping each product, not the total order. So, if you sell five products with a shipping rate of $1, the total shipping charged to the customer would be $5.
Free shipping does just what it says - allows you to offer your customers shipping at no charge. This has jus two settings:
- Enable? yes/no
- Shipping Label: What your customers see. The default is "Free Shipping (3-5 days)".
Remember to hit the "Save Changes" button once you are finished here.
Coupons are an important part of a lot of eCommerce website; they provide an easy way of offering your customers discounts and can form an important part of a marketing strategy.
To have coupons available you will need to have the coupon core add-on enabled. This can be achieved my going to Exchange > Add-ons from the WordPress dashboard. For more information about add-ons please refer to dedicated add-ons article earlier in the series.
Adding a New Coupon
From the WordPress dashboard, go to Exchange > Coupons and then click the "Add New" button. When adding a new coupon the following options are available to you:
- Name is just for your reference to make it something obvious
- The code is what you want people to type in at checkout. The dice button next to this field will generate a random coupon code for you.
- Amount allows you to enter the amount (or select from a dropdown) to set either a percentage discount or total money off discount.
- Start/End date allow you to set a start and end date with the date pickers so you don't have to worry about them being used too early or after their cut off.
- Limit number of coupons dictates how many times a coupon can be used. Once ticked a number field displays.
- Limit to a specific product allows you to limit a coupon to a single product - very handy. Once ticket a dropdown list appears populated with your products, simply choose the one you would like the coupon to be used for.
- Limit frequency of use per customer allows you to change the frequency in which a customer can use a specific coupon. For example, limit the coupon to one use per customer every 30 days.
Remember to hit the "Save" button when you are finished.
Editing a Coupon
There's a few reasons you may want to edit a coupon. For example, perhaps you may have made an error, or you may want to extend a promotion and change the end date. To do this, from the WordPress dashboard, go to Exchange > Coupons. This page lists all of your coupons - to edit one, hover over the promotion you want to edit and click the "edit" link that appears.
Deleting a Coupon
If you create coupons regularly, you are almost certainly going to want to remove some from time-to-time. To do this, from the WordPress dashboard, head over to Exchange > Coupons. Hover over the coupon you wish to delete and click the "Trash" link that appears.
If you want to bulk delete coupons, you can check the checkbox to the left of the coupon name and then select "Move to Trash" from the bulk actions drop down. Be sure to click the "Apply" button for the changes to take place.
If you have been following the series of articles on iThemes Exchange you will now be able to set up, accept payments, add products and coupons to your Exchange site. In the last part of the series we take a look at basic theming to customise the look of your Exchange store.