Archive for the ‘Ecommerce’ Category

Adsense is an Auction, Where Conversion Ups Your Bid for Free

Friday, January 18th, 2008

In the ultimate fair play move, Google makes it so that you can compete with large advertisers on some scale at least. A highly competitive keyword can have $5.00 (or even more) cost per click, but can you get a return on that kind of investment? If it takes say 50 clicks to get a sale, you paid $250.00 for that single sale. Depending on what product you’re selling that may not be worth it at all. That ROI number depends completely on your conversion rate, and your product price, both long and short term. The good news: raising your conversion rate can now make your advertising less expensive.

I saw this first hand while advertising my hosting services. When I first started running Adsense ads, I would start of at $0.25 per click limit and then within a day to a week it would be up to $1.00 or $5.00 minimum bids. So I’d stop running and try something else and come back and do it again, doing the same thing. (Kind of makes you think of that insanity definition.)

Then I observed that if I just redesigned (reworded) the ad, or changed the url that it was linking to and came back to it a day or two later the ad was running again. Google was raising my prices because the ad was not performing well. I assume they measure this by looking at bounces. Meaning if someone clicks my ad and comes back to Google seconds later, it means the ad and the page that it clicked through to were not relevant to what I was advertising nor what the user was looking for.

Not only does this level the playing field on a NATIONAL advertising campaign, but it shows you almost immediately whether your ad is working! Google is telling you, your ad isn’t working, we’ll still deliver it for you, you’ll just have to pay more, your choice.  This is something no other advertising media is going to do for you! Google, in there outstanding vision, realizes that end users need to have a good experience and rewards advertisers who provide it. So when you see, “Your ad has been deactivated unless you raise your minimum to bid to $5.00″. Take that has a blessing, that you were notified your advertising can be better.

PayPal Subscription and Payment Plan Buttons Integrated with Aweber

Sunday, January 13th, 2008

If you have a subscription service, or payment plan button on your website and you’ve tried to integrate it with Aweber so that the payee is automatically subscribed to your Aweber Newsletter, then you may have come across the problem that Aweber only supports a Buy It Now button or link.

Using PHP (and lots of other languages), you can perform a PayPal -> YourSite -> Aweber transaction that does the same thing for a Subscription or Payment Plan button. You can’t do an automatic PayPal -> Aweber transaction, but this the best work around we’ve come up with.

Quick Summary for the impatient: Copy the code in the text box below, and customize the two options at the top of the script which are notated in the code.

The first thing necessary is to create a page on your website with the following code. This code will have two options we need to customize before it will work, but we need the url of your thank you page before we get into the paypal setup, so create that page first.

<?php

// These two items are the only two you need to edit.

// 1. add your key here

$auth_token = “RtWe0qNpNLiZlsdkdiseESasdr3vqpqlimqNzvfSPqHFhgKUc0bVhwKdgwNy”;

// 2. add your aweber list name to the beginning of this email address

$aweber_email_list = “list-name@aweber.com”;

// read the post from PayPal system and add ‘cmd’

$req = ‘cmd=_notify-synch’;

$tx_token = $_GET['tx'];

$req .= “&tx=$tx_token&at=$auth_token”;
// post back to PayPal system to validate

$header .= “POST /cgi-bin/webscr HTTP/1.0\r\n”;

$header .= “Content-Type: application/x-www-form-urlencoded\r\n”;

$header .= “Content-Length: ” . strlen($req) . “\r\n\r\n”;

$fp = fsockopen (‘www.paypal.com’, 80, $errno, $errstr, 30);

// If possible, securely post back to paypal using HTTPS

// Your PHP server will need to be SSL enabled

// $fp = fsockopen (’ssl://www.paypal.com’, 443, $errno, $errstr, 30);
if (!$fp) {

// HTTP ERROR

} else {

fputs ($fp, $header . $req);

// read the body data

$res = ”;

$headerdone = false;

while (!feof($fp)) {

$line = fgets ($fp, 1024);

if (strcmp($line, “\r\n”) == 0) {

// read the header

$headerdone = true;

}

else if ($headerdone)

{

// header has been read. now read the contents

$res .= $line;

}

}
// parse the data

$lines = explode(“\n”, $res);

$keyarray = array();

if (strcmp ($lines[0], “SUCCESS”) == 0) {

for ($i=1; $i<count($lines);$i++){

list($key,$val) = explode(“=”, $lines[$i]);

$keyarray[urldecode($key)] = urldecode($val);

}

// check the payment_status is Completed

// check that txn_id has not been previously processed

// check that receiver_email is your Primary PayPal email

// check that payment_amount/payment_currency are correct

// process payment

$firstname = $keyarray['first_name'];

$lastname = $keyarray['last_name'];

$email = $keyarray['payer_email'];

$itemname = $keyarray['item_name'];

$amount = $keyarray['payment_gross'];
$headers = ‘From: “‘.$firstname.’ ‘.$lastname.’” <’.$email.’>’ . “\r\n” .

‘Reply-To: “‘.$firstname.’ ‘.$lastname.’” <’.$email.’>’ . “\r\n” .

‘X-Mailer: PHP/’ . phpversion();
mail($aweber_email_list, ”, ”, $headers);
echo (“<p><h3>Thank you for your purchase!</h3>Please check your email in 5-10 minutes to confirm your subscription.</p>”);
echo (“<b>Payment Details</b><br>\n”);

echo (“<li>Name: “.$firstname.” “.$lastname.”</li>\n”);

echo (“<li>Email: “.$email.”</li>\n”);

echo (“<li>Item: “.$itemname.”</li>\n”);

echo (“<li>Amount: $”.$amount.”</li>\n”);

echo (“”);

}

else if (strcmp ($lines[0], “FAIL”) == 0) {

// log for manual investigation

}
}
fclose ($fp);
?>
Your transaction has been completed, and a receipt for your purchase has been emailed to you.<br />

You may log into your account at <a xhref=’https://www.paypal.com’>www.paypal.com</a> to view details of this transaction.<br />

####END CODE#####
Now that you have a new page, and you’ve got the url to that page, now go to PayPal and setup your Subscription Button. After filling in the necessary items, click the “Add More Options� button instead of the “Create Button Now�. On the more options page choose paste the url to the page you just created into Successful Payment URL input box. Then next to the text “Payment Data Transfer� click the Edit button. On this page turn “Auto Return� to “On�. Paste your url again in the input box below that. Now scroll down turn “Payment Data Transfer� to “On� and now copy the “Identity Token� and put it into the page you created on your website. Set the rest of your options as needed, click “Save�, then on the next page “Create Button Now�.

Now you should of course copy and paste your button code into your site. Then there is just one more option to setup. Go to your Aweber account get your list name, and put that into the script on your site as the email address “list-name@aweber.com�. You should be all set now, with your website now sending an email to Aweber about the new subscription.

Note: If you’re on a shared hosting plan you may experience difficulties with the very simple mail script because your host may require that you send emails from or to a domain within your account. If thats the case, adding a BCC or CC to the email script so that a copy goes to your domain should work.

Download aweber – paypal pap here.

Map Pricing for Zen Cart

Saturday, June 10th, 2006
I’ve recently written a quick contribution or modification to the ZenCart open source ecommerce software. This contribution allows you to enable M.A.P. Pricing (map pricing) for individual products. I’ve written similar contributions for OS Commerce, and for Proprietary Ecommerce Software. Contact me if you need custom work.  

MAP Pricing = Manufacturer’s Advertised Price, which in summary means you can’t display a price lower than what the manufacturer tells you, you can. You can sell it for less, you just can’t advertise it for less.

This contribution makes it so you can display some text instead of the price when it’s enabled, and the price will only show once the product as been added to the cart. (Currently it replaces the text with: “Priced so low, we’re not able to advertise it. Add to cart for price.)

You can download the instructions on implementing it here:
Map Pricing v1.0

Free Consultation

[X]