Email Delivery with WordPress

How to achieve reliable email using WordPress to send order confirmations and other emails on your website.

Tracking with Facebook Pixel

 

What is Facebook Pixel?

The facebook pixel is a small piece of code that you add to your website pages that tracks various events as they occur.  If you are familiar with Google analytics, it is very similar in every aspect.  You add a short script to the head of each document and you can track page views, add to cart, checkout, purchases, and many other events as they occur.

Why is this important?

Because tracking your users as they move through your site gives you good insight into the behavior and site flow of your website.  Using eCommerce, such as WP EasyCart, you want to see which products are gaining attention and clicks.  Are people adding products to their cart? Do they start the checkout process?  Do users eventually reach a successful purchase?

And more importantly, where did they come from?  Knowing where your purchasing and converting customers come from is the name of the battle, and leads you to invest more marketing dollars in the correct area.

How to Get a Facebook Pixel Code?

Simply visit facebook’s pixel page and learn more or create a new facebook pixel:  https://www.facebook.com/business/a/facebook-pixel  Once you walk through and create a new facebook pixel, you will be given a small snippet of code to paste into the head of your wordpress theme.  Most themes allow you to paste google tracking code into the head of the document, but you can also paste in the facebook pixel script.

Alternatively, there are great third party tools that let you insert tracking code scripts from google, facebook, and others.  Just search wordpress plugins for tracking code manager plugins.  We like IntellyWP’s plugin tracking code manager for this purpose.  https://intellywp.com/tracking-code-manager/ 

Once you do this, all of your pages will send page view events to facebook.

What does WP EasyCart Pixel integration do?

Now that you have setup page views, you may want to track more events, such as add to cart, initiated checkout, purchase complete, and other events.  Even track how much a purchase was made for after a successful checkout.  This is where EasyCart has integrated, and all you need to do is visit settings -> third party and add your Facebook Pixel ID.

 

What do reports look like?

Facebook offers a very rich analytics dashboard, giving you statistics on pages, revenue, and other events as they occur. Now you can start investigating where users came from, which facebook ads are generating traffic, and start promoting more with proper data on this very popular platform.

Track actual ecommerce events as they happen.  Not just page views, but actual events such as add to cart, initiated purchase process, check out began, purchase completed, and other events.

Facebook analytics provides robust revenue reports including totals, purchases, averages and more.

To learn more, simply visit Facebook business and start setting up your facebook pixel in their ad manager program!

ShipStation Webhook Integration

Troubleshoot Connection Errors

This troubleshooting guide is designed to explain and give troubleshooting steps to the Network Communication errors that can occur using the EasyCart administrative console software. In part, we hope to explain why this error occurs, and then how to take some simple troubleshooting steps to help get past it.

EasyCart Shortcode is Easy!

Looking to develop custom product pages with EasyCart Functionality?

Many customers have asked about creating new products and designs on their WordPress pages and then simply inject or add EasyCart add to cart behavior or products on those custom pages.  It is a common workflow, and while EasyCart develops an entire catalog system for you and your products, customizing ones pages to fit your specific needs is often a requirement.

With EasyCart shortcode, it is easy to develop your own product pages and add only specific parts of EasyCart to your system.  Here are a few good examples, but be sure to experiment with our shortcode to see all of the capabilities it has to offer.

 

Scenario 1:  Create your own pages, but want ‘Add to Cart’ button on your pages

This is very popular scenario, you have a few products, so you want to create highly customized WordPress pages and JUST use EasyCart add to cart behavior.

  1.  Create your page in WordPress how you like it, then access the EasyCart shortcode by clicking the ‘shopping cart’ icon on the toolbar.shortcode-toolbar
  2. Select the ‘Add to  Cart’ shortcode button.  There are lots of options here for shortcode, so worth time to explore and see the possibilities of each shortcode section.shortcode
  3. Once you select ‘Add to Cart’, you are asked which product would you like this add to cart button to represent, select which product from the dropdown.addtocart
  4. Select ‘Add shortcode’ and it will inject the shortcode into your wordpress page.  You can use the default editor OR some themes have custom page builders, which also work if they represent shortcode in them.

shortcodeaddition

Here you can see shortcode in the default editor, but you can also add it to your theme if it has a page builder system and will represent shortcode appropriately.

customlayout

5.  Now you can view your page, and if your product has option sets, those are also shown with your add to cart shortcode.  Notice how this is a completely custom page built in WordPress, and ONLY the EasyCart product options and add to cart behavior are shown.  This allows you to really extend EasyCart and WordPress by design and development on your own pages.  (Of course EasyCart can do all this for you by using our regular catalog and product details pages that are created automatically, but for those wanting custom designs and complete control, this is a helpful feature.)

customlayout2

Scenario 2:  A table of products with titles, pricing and view more options

Many customers have asked for a way to build a table of products.  We have an awesome shortcode for store table of products which allows you to quickly select groups of products, categories, and individual products and put into a quick shortcode table.  Of course you could use CSS to custom design colors afterwards, but this shortcode really helps speed up the process of building a product table.

  1.  Select shortcode as in previous scenario and select ‘Store Table’ shortcode.producttable
  2. Select all the categories and columns that you would like to insert with this shortcode.  Once finished, insert the shortcode into your page or custom page builder.tableshortcode
  3. Save your page and viewing shows the table of products along with a button to view the product in detail.producttable2

More Shortcode to explore!

We have more shortcode which allow extensive control over your product displays and setup.  You can display custom product categories on a WordPress page, very popular to do.  You can also display custom cart and account shortcode, place single items or selected items on a page, even create a page for manufacturers and place those designed manufacturer products on a page.

Subscriptions?

We offer membership content shortcode as well, so if you sell membership content such as video, downloads, or access to a members area of your website, simply use this shortcode and design ‘Member Content/Non-Member Content’ on a single WordPress page.  IF the user is logged in AND has purchased a membership, then they can view that content, otherwise, show the user directions to purchase OR login.

For more information on shortcode, you can also visit our online documentation:  http://wpeasycart.com/docs/3.0.0/themes/shortcodes.php

WordPress 4.3 Upgrade Procedures

WordPress has recently released version 4.3, and there are thousands of plugins that are still working to become compatible with this latest release.

WP EasyCart has released a 4.3 compatible version, but it is critical that you update the plugin before you update WordPress.

  1. First, update plugins to 4.3 compatible versions. (plugins will say if they are 4.3 compatible in plugin update section)
  2. Second, update themes to 4.3 compatible versions. (check with your theme developer if theme is compatible)
  3. Lastly, update WordPress to 4.3 and process should go smoothly.

 

 

What to do if you get a white screen?

If your website automatically upgraded to 4.3, then it may break due to plugins or EasyCart not being updated prior to this core WordPress update.  You may experience a white screen, or a PHP error notice saying it is having trouble loading.

1.  First, you will need to log into your website through FTP and disable the plugin, for exampe /wp-content/plugins/wp-easycart folder should be renamed to /wp-easycart-old.

2.  Second, you can log into wordpress admin  now and see that under ‘plugins’ that the conflicting plugin has been deactivated…  in this case WP EasyCart.

3.  Third, go back to FTP and rename the plugin back to wp-easycart.

4.  Fourth, go ahead and upgrade the plugin in question to a 4.3 compatible version.

5.  Fifth, you can activate the new upgraded plugin.

6.  Now you should be able to continue using WordPress as usual

 

 

Are there a list of other plugins that might not be 4.3 compatible?

Unfortunately yes, there is a huge list of plugins that this is known to have an issue with, and with automatic updater for WordPress running on many websites, this could accumulate into a huge issue.  We encourage everyone to turn off automatic updates if you do not want this type of unexpected update behavior to occur on your website.

Here is a list from GitHub of plugins still needing to be upgraded:  https://gist.github.com/chriscct7/d7d077afb01011b1839d

Become an EasyCart Affiliate and Earn Cash

affiliate-program

Now you can market and promote WP EasyCart and earn 10% for each referral you make.  We have integrated with AffiliateWP and are tracking affiliate referrals so you can easily earn commission, and get paid for your recommendations.

Theme developers will be glad to know you can earn extra revenue by posting that your theme is WP EasyCart compatible and link to our website.  Earn 10% for each referral who purchases our standard or lite version plugins.

Web designers, now you can become an affiliate and have your customers purchase a license directly from us, while still retaining 10% profit.

It’s easy, just Click Here to Sign Up and then you will receive a unique URL to promote on social media, your website, or email and referrals are automatically tracked with your account.

 

Custom Store Post Template

The WP EasyCart can leverage the WordPress option “custom post types” to help with the linking of your products, categories, menus, and manufacturers. Using this feature, we are able to create links like http://yoursite.com/store/mens-beanie, rather than http://yoursite.com/store/?model_number=abc123.

This option is enabled in the EasyCart system by going to your WordPress Admin -> WP EasyCart -> Settings -> Additional Settings  and turn “On” the option “Use Custom Post Type Linking”. Once this is functioning, your links will now go to a more search engine friendly URL, but there is a downside. WordPress uses your default post template in your theme called “single.php”.

If this file does not look how you like or looks very different from your store page template, it will cause a disconnect from product list page to product details page. Fortunately there is a solution! Directions will be provided here, but you can read more about this setup in WordPress’s codex here: http://codex.wordpress.org/Post_Type_Templates.

Setting Up Custom Post Template

  1. Copy your themes single.php file in your theme folder and rename it to single-ec_store.php.
  2. Make changes to this file as is needed. Many times it is best to use the layout and info from your page.php file.
  3. Go to your WordPress Admin -> WP EasyCart -> Settings -> Design and turn “On” the option “Use Theme Custom Post Template”.

This will allow your store to use a custom design for the product details, categories, menus, and manufacturers.

Custom Payment Gateway Integration

We have had a huge demand for adding a custom payment integration to your own EasyCart install and it is finally here. Starting with the release of version 3.0.19, you can add a live payment gateway that is customized by you, the programmer! Fair warning to those who are not familiar with PHP, this may be a little difficult to manage and is meant for those with a good understanding of programming.

The highest demand for this service is for those companies that use an Authorize.net emulator. This type of custom gateway is by far the easiest and will the first example provided here.

To start, lets explain how the custom payment gateway option is integrated in general, minus the programming details of customizing the class for your own payment gateway.

[divider]

Basic Custom Payment Gateway Class Setup

1. Start by going to your WordPress admin -> EasyCart Admin -> Store Setup -> Payment Setup and in the Live Payment Gateways section, and select the last option “custom payment gateway”.

2. The system is now looking to include your new payment gateway file, so lets copy an existing payment gateway file into place and rename it so that it is included in the load of the plugin. Do this by copying the file “plugins/wp-easycart/inc/classes/gateway/ec_authorize.php” to “plugins/wp-easycart-data/ec_authorize.php” and rename the file here to “plugins/wp-easycart-data/ec_customgateway.php”.

3. The system is also looking for a class named “ec_customgateway” so lets fix this up. Open the newly copied ec_customgateway.php file and rename the class to read on the first line:

class ec_customgateway extends ec_gateway{

4. At this point you have a custom gateway setup, but need to customize this to function as a custom class to your system. Please read the next section about editing the class to work as an Authorize.net gateway emulator.

[divider]

Authorize.net Emulator Class Setup

If you have not completed the “Basic Custom Payment Gateway Class Setup”, please complete that section first. There are many companies that use the Authorize.net API as their method for collecting payment from their merchants. The reason they do this is that Authorize.net is one of the most popular, if not the most popular integration in the e-commerce industry and by leveraging their API, they can quickly integrate with any platform. Their system requires you to change the endpoint (the server that receives the transaction information) to point to their own payment servers. The following steps will help you alter the newly created payment class:

1. The first thing to do is enter your custom settings and there are two ways to do this. The easiest way is to first return to WordPress admin -> EasyCart Admin -> Store Setup -> Payment Setup and in the Live Payment Gateways section and change back to Authorize.net as your payment gateway. Enter your login id, transaction key, test mode off, and your currency code, then click save. At this point the authorize values are saved to your system, no matter what gateway you select from this point on. So you can now open the live payment gateway section again once the page reloads and switch it back to the custom payment gateway option. The other option here is to replace the following code:

$authorize_login_id = get_option( ‘ec_option_authorize_login_id’ );
$authorize_trans_key = get_option( ‘ec_option_authorize_trans_key’ );
$authorize_test_mode = get_option( ‘ec_option_authorize_test_mode’ );
$authorize_currency_code = get_option( ‘ec_option_authorize_currency_code’ );

TO:

$authorize_login_id = “YOURLOGINID”;
$authorize_trans_key = “YOURTRANSKEY”;
$authorize_test_mode = false;
$authorize_currency_code = “USD”;

2. Edit the get_gateway_url method to use the emulator endpoint instead of the authorize endpoint. The edit will change:

$is_developer_account = get_option( ‘ec_option_authorize_developer_account’ );

if( $is_developer_account )
return “https://test.authorize.net/gateway/transact.dll”;
else
return “https://secure.authorize.net/gateway/transact.dll”;

TO:

return “https://yourendpoint.com/endpoint”;

3. At this point you should be able to upload your custom gateway and run it successfully. We have noticed some errors occur in that the response may not be returned in the “body” as Authorize.net does. If this is the case, you will need to investigate the format of the response and is easily done by changing:

function handle_gateway_response( $response ){

TO:

function handle_gateway_response( $response ){

print_r( $response ); die( );

which will print the response to the screen and stop once printed. Use this to point yourself to the right response information to process and remove it when you are happy with your understanding of the response data.

[divider]

Custom Payment Gateway Company

We also know there may be some of you out there that have a company you would like to integrate with that does not follow closely to any other payment gateway. We will do our best here to describe our process for custom integration with payment gateways.

1. We recommend using the ec_securenet.php payment gateway class as a starting point. The reason for this is that it covers many of the most common requirements for custom gateway integration.

2. Typically there are two types of data format that are sent to your payment gateway, an array or XML string. The ec_securenet.php shows gateway data in the format of an array, use this is a starting point if you are going that route. If you are using a gateway that accepts XML data, look into the ec_securepay.php file instead.

3. Notice that ec_securenet.php does not use the method “get_gateway_data” as this is not necessary when you need to use a custom CURL call (ec_securenet.php does this). Some gateways work great with the default call and in this case, follow the format of returning the data through the “get_gateway_data” method. This is a technical option based on the requirements of the payment gateway. Following the ec_securenet method is the easiest way to avoid technical difficulties.

4. Some gateways require an authorization header and ec_securenet as an example of this. If your gateway does not require this, you can remove the line that adds this to the header array.

5. Once you are able to build and send your gateway data, the next, and most difficult, part is to process the response.  We always send the response data to the “handle_gateway_response” method for processing. Please notice that if you are viewing the securenet version, the response from them is in JSON formatting and is why we process it through the json_decode function first, but many gateways return their data as an array in the $response[‘body’] array element. Our recommendation is to start by sending the whole response into the “handle_gateway_response” method and use a print out to determine where to go from there. Once you send the data to the response function, we should start by adding “print_r( $response ); die( );” to the top of the “handle_gateway_response” method. This will show you the path to getting the response messages out of the data and applying them to the correct class data elements.

6. The first processing step is determining the attribute that signifies a successful payment, typically an “APPROVED” or “SUCCESS” value and may be accessed through $response[‘body’]->result or $response[‘result’]. If XML is returned, you may need to first run the $response data through:

$response_body = $response[“body”];
$xml = new SimpleXMLElement($response_body);

and access the value by $xml->result or something similar. This is the most difficult task because it requires you to have a complete knowledge of the type of response and if it is formatted as an array, object, xml, JSON, etc… Once you are able to access and check for success, set the $this->is_success to true or false.

7. We also ask that if there is an error, try to set $this->error_message = $xml->response_message; or whatever your response error message is.

8. The last thing to do is insert the response to the database for later access and troubleshooting. This is done by editing the following line to fit your needs:

$this->mysqli->insert_response( $this->order_id, !$this->is_success, “Gateway NAME”, print_r( $response, true ) );

If you are able to get through all of this, get a response from your gateway, process the return data successfully, and set the success value to true or false, then you are done. The EasyCart will insert and process the order based on your success value and requires nothing else once you get your gateway setup to process the credit card through your own gateway.

[divider]

Successful Custom Payment Integration

If and when you complete your custom payment integration, you are welcome to send to us for review and to add the gateway as a default option in the cart. Having us add new gateways to the cart is especially useful for developers that reuse the EasyCart for multiple projects and want the same gateway to be available quickly. We are always open to adding new gateways, so please contact us in the event that you would like your gateway in the cart by default!