Full-Service Internet Marketing & Web Development | WebMail
Call us Toll-Free:
1-800-218-1525
Email us

How to: Implement One Click to Order

Dawn Rossi, August 27    --    Filed under SoftwareProjects Products
One click to order is a feature that allows your customers to place an order on your website, without having to retype their credit card information every single time.

Amazon.com was one of the first websites to implement One Click Shopping and they filed a patent for this process back on September 1999.

These days all major shopping carts support a variation of Amazon's One Click to Order, making it easier for customers to place repeat orders.

As part of this post, I will describe the process of implementing One Click to Order (also known as: "Background checkout") with the SoftwareProjects Shopping cart.

Step 1: Integrate spicart.php

Login to your SoftwareProjects account, click on the Product Manager and then select the Integrate menu item.

Complete all fields and generate your custom spicart.php file

Save spicart.php on your website and include it on all pages.

For example, on your index.php file:


<?php
// Specify product codename offered on this page
// (If applicable)
$product_codename = "my_first_product"; // Replace with your codename

// Include shopping cart
require_once($DOCUMENT_ROOT."/spicart.php");

// Your HTML code here
// ...

// Track everything
track();
?>


Step 2: Capture customer payment information

Before you can offer One Click to Order, you have to capture your customer's payment information (credit card) at least once.

The customer payment information will then be saved in your SoftwareProjects database so that any upsell products can be offered with One click to Order.

In addition to upsells, customers who return to your website and login (with their email address and password) are also going to be able to take advantadge of the One Click to Order feature.

To capture customer payment information, you need to add a single checkout form to the first page of your checkout process:


<?php
// If submitted order for processing
if (Strcasecmp($_POST['action'],'checkout')==0)
{
  
// Populate input variables
  
$input = array();
  
$input['store_id'] = 2; // Replace with your store id
  
$input['product_codename'] = $product_codename;

  
// Charge customer
   // If failed - error code will be set into $ResultStr
  
if (do_checkout($input, &$output, &$ResultStr))
   {    
    
// If successful, redirect
    
Header("Location: upsell.php"); // Replace with your upsell page
    
return;
   }
}

// Your HTML code here
// ...

// Populate input variables
$input = array();
$input['product_codename'] = $product_codename;
$input['emailaddress'] = $emailaddress;
$input['ResultStr'] = $ResultStr;

// Print checkout form      
print_checkoutform($input);
?>


Step 3: One Click to Order

Now that you've captured the customer's payment information, implementing One Click to Order is as easy as calling a single function.

The customer's payment information will be stored as part of the session variables.

To implement One click to Order, display product information on your HTML page, inviting customer to take advantadge of any upsell offers. The target url will handle placing an order in the background without requiring any customer input (also known as: "Background checkout")

For example:

Code for upsell.php page:


<?php
Thank you
for ordering our product!
<
BR><BR>
To add XYZ to your order, for a low $9.95,
<
a href="upsell_doit.php">click here</a>
?>


Code for upsell_doit.php page:


<?php
// Populate input variables
$input = array();
$input['product_codename'] = $product_codename;
$input['store_id'] = 2; // Replace with store ID

// Background checkout
if (do_backgroundcheckout($input, &$output, &$ResultStr))
{
  
Header("Location: thanks_upsell.php"); // Replace with upsell thank you page
}
?>


-

All set. You now know how to offer your customers a One Click to Order interface, using the SoftwareProjects Shopping cart.

Before I wrap this post, I would like to leave you with another example -

In this scenario we will be incorporating the upsell offer into the main checkout screen, so that the customer can opt-in to the upsell as part of placing the first order:



To implement this process-flow, we will use a similar script, however in this case we are going to incorporate the background checkout as part of the main index.php file:


<?php
// If submitted order for processing
if (Strcasecmp($_POST['action'],'checkout')==0)
{
  
// Populate input variables
   
$input = array();
  
$input['store_id'] = 2; // Replace with your store id
  
$input['product_codename'] = $product_codename;
 
  
// Charge customer
   // If failed - error code will be set into $ResultStr
   
if (do_checkout($input, &$output, &$ResultStr))
   {    
    
// If customer opted-in for the upsell
    
if (isset($_POST['upsell']))
     {
     
// Populate input variables
     
$input = array();
     
$input['store_id'] = 2; // Replace with store id
     
$input['product_codename'] = "upsell_product"; // Replace with upsell codename
    
$input['force_shipping'] = 1; // Populate default shipping address
     // Background checkout
    
if (!do_backgroundcheckout($input, &$output, &$ResultStr))
     {
     }
 
     }
         
    
// If successful, redirect
    
Header("Location: thanks.php"); // Replace with thankyou page
    
return;
   }
}

// Your HTML code here
// ...

// Populate input variables
$input = array();
$input['product_codename'] = $product_codename;
$input['emailaddress'] = $emailaddress;
$input['ResultStr'] = $ResultStr;
$input['screen'] = "checkout_upsell"; // Replace with name of your checkout screen

// Print checkout form      
print_checkoutform($input);
 
?>


Notice I am passing a new screen (checkout_upsell) to the print checkout form function. The new checkout screen includes the upsell checkbox:


<?php
<input type='checkbox' name='upsell'/>
        
<
U><span class='checkbox3'>Check this box</span></U> if you would like to add a private membership to ...

?>


-

Any questions? Please comment below or contact us directly.

How to unzip / untar a file

Adrian Singer, August 26    --    Filed under Programming
If a file ends in .zip (for example, file.zip) type:
unzip file.zip

If a file ends in .tar (e.g., file.tar) type:
tar -xvf file.tar

If a file ends in .gz (for example, file.gz) type:
gzip -d file.gz

If a file ends in .tar.gz (e.g. file.tar.gz) type:
gzip -d file.tar.gz
and then
tar -xvf file.tar

If a file ends in .tgz (e.g. file.tgz) type:
tar -xvzf file.tgz

View 1 Comment(s)

Shopping Cart Net Sales Report

Adrian Singer, August 22    --    Filed under Analytics
When you sell anything online, it is very important that you know your numbers.

Most folks know their gross sales (total $ collected in sales), but what about the more important numbers?

SoftwareProjects Shopping Cart Net Sales Report shows a breakdown of:

* Gross sales,
* Commissions,
* Refunds and
* Net sales (Gross sales - Commissions - Refunds)

...over a selected time frame:




Focusing on net sales and always keeping your net sales line above zero, is the only way to turn a real profit.

Affiliate Summit East 2008-Day 3

Rhonda W, August 14    --    Filed under Traffic
Day 3

The last day of the affiliate summit was a little more laid back, as the summit was coming to a close. We took the opportunity to get into the "cashinator" machine and grab some wind blown cash, take some pictures and generally just enjoy some casual networking.

Kyle, Software Projects Sr. Engineer, took some time to pose with yet another set of "booth babes". I think this may have been his favorite part of the summit.


By the end of the day most booth owners were trying to give way the left over promotional props, to avoid taking them back home. The Software Projects team scored some really cool gifts, which I took home and shared with my kids. I am now known as, "the coolest mom ever".

The gifts ranged from T-shirts, light-up pens, coffee cups, fake stacks of money and many other unique props.

A few of the unique giveaways offered at the Affiliate Summit.




Overall, the summit was a great networking event. We will cherish new friendships made and carry away some newfound Affiliate Marketing knowledge. I can't wait to attend the next Affiliate Summit. We at Software Projects are looking forward to speaking with the new contacts we made and helping them grow their business online.

Affiliate Summit East 2008-Day2

Rhonda W, August 14    --    Filed under Traffic
The second day of the Affiliate Summit was the first actual day of the Exhibition. More spacious than the previous day's Meet Market, the Exhibition was an excellent way to meet all the merchants, networks and affiliates.

The Software Projects team made our way around to visit each booth and network with some new friends. Each booth had unique give away promotional props. The NextWeb Media booth was a big hit, as they were giving away grand prizes such as, an IPOD’s and a Wii.

We were in the drawing, but did not take the prize. Kyle, Software Projects Sr. Engineer, enjoyed his prize of posing with the booth model, Sara.





We attended a great presentation given by Super Affiliate, Amit Mehta. Amit did a great job revealing little known secrets and strategies he uses to drive huge volume and generate large revenues through PPC affiliate marketing. The specific focus of his seminar was using PPC to drive traffic to your pages and become a profitable affiliate marketer.

Among the topics discussed were bid optimization, split testing of landing pages and creative's, website value (specifically, how to create a site that will keep Google happy), common pitfalls of those new to affiliate marketing, and even the psychology of Affiliate Marketing. Amit is a great speaker who knows his stuff, and the speech was informative and interesting. Definitely one worth attending.

Afterwards we got a chance to speak with Amit about his apartment hunting adventures, while in Boston.

(Below) Amit presenting his PPC strategies.



The main ‘Affiliate Bash’ was canceled unfortunately, so that night Software Projects hit Boston downtown, to check out some of the night life.

We had the pleasure of going by to see the "original" Cheers.


Affiliate Summit East 2008-Day 1

Rhonda W, August 14    --    Filed under Traffic
Day 1

The Affiliate Summit East 2008 was held in downtown Boston, at the Seaport Hotel, overlooking the Boston Harbor.

Day one started off with a “Meet Market”. There were about 100 companies that had tables set up all around the room. I had the opportunity to visit most of the tables and spoke to an interesting range of businesses. The turnout for the Meet Market was impressive, so much so that getting around to everyone was a challenge, as it was standing room only all day. We got to meet with great people and get a taste of what was to come for the next 2 days.

(Below) View of the Meet Market.


We enjoyed an interesting presentation from PepperJam, given by Brock Siegel. They offered the best tips and tricks of how to most effectively work with PepperJam merchants. They laid out the nuts-and-bolts of their network. Brock covered background of Pepperjam, upcoming products and unique features of the Pepperjam Network.

Maura gave a quick run-down of the typical account and a how- to of the basics, as well as showcasing various features of the PepperJam network

(Below) Brock giving an awesome presentation of the PepperJam Network.


Later in the evening we attended the Share A Sale party. The party took place aboard a beautiful cruise ship on the Boston Harbor and offered awesome views of the harbor and downtown Boston. The grand list of attendees enjoyed 2 full levels of entertainment, complete with seafood bar, desert bar, cocktail bar, 2 full bands and dance floors. Later in the evening, the brave souls participated in karaoke.

(Below) View from the Share A Sale party boat.



Update: Check out Day 2 and Day 3.

How to automatically install PHP/MySQL on FreeBSD

Michel Nadeau, August 14    --    Filed under Programming
Today I had to install PHP and MySQL on many, many servers. I could have done everything by hand on each server but the risk of error is big and it's very long. The answer to this task: create an automated script that does everything for you.

NOTE: All my servers were virgin FreeBSD 6.3 machines.

Step 1 - What to accomplish

I wanted to:

- Install MySQL with a custom my.cnf file
- Install PHP with CURL and GD support (so I needed to install libcurl, libpng and zlib)
- Change the timezone to GMT

Step 2 - Before creating the script

The first thing I did was to manually install and configure everything on the first server, taking notes of everything I did. Once I had my complete "guide", containing all the instructions, and that I was sure that my installation was working well, I was ready to write my automated script.

Step 3 - Writing the automated script

I wrote my automated script using BASH. It probably could have been Perl but sometimes it's not installed, so I think that BASH is a better choice.

When you write such a script, you want to make sure of a couple of things:

- Double-check EVERY instruction
- Think about your current directory
- Display debug information
- Create a debug mode that needs you to press a key after some instructions
- TEST the installed applications at the end of your script, with debug information

It took me 4 machines to get a perfect script:

- Machine 1: manual installation/configuration
- Machine 2: automated script, debug mode ON
- Machine 3: automated script (with some modifications), debug mode ON
- Machine 4: automated script (final), debug mode OFF

To avoid needing to transfer a lot of files on each server, I used "wget" to download everything I needed. So the only things I had to send on each server was:

- wget-1.11.4.tar.gz - needed to download the other files
- auto.sh - the automated script
- auto.php - the PHP test script (it tests PHP and MySQL)
- my.cnf - custom my.cnf file to install

NOTE: These files are included in the attached "auto.zip" file.

Step 4 - Running the script

The first thing the script does is to install wget, as it is needed to download the other applications. Then the applications are downloaded, installed and configured. Everything is downloaded, extracted and compiled in a temporary directory. At the end, the script runs some tests to be sure that everything's working correctly. Finally, the temporary directory is removed, as well as the script itself (and the auto.php file) so you don't have to remove anything manually.

Step 5 - Why this post?

This post's purpose is not really to teach you how to specifically install MySQL and PHP automatically. It's more to show you a good example of a successfully deployed automated script; to inspire you and give you some "guidelines" if you ever need to create such a script.

I invite you to take a look at the attached "auto.zip" file, more specifically to the "auto.sh" script.

« Previous Posts


About us  |  Contact us  |  Privacy  |  Terms & Conditions  |  Affiliates

© 2008 Software Projects Inc. (SPI)
Friday, August 29th, 2008
Page generated in 0.33 seconds