I’ve just released an update to autoFacebook 2. I know it’s been awhile and it’s not so much an update as it is just updated video instructions. I also go over enabling automatic facebook posts on update as well as new products, adding an icon to your app so that it displays on your page’s feed, and enabling different forms of currency. If you need help feel free to comment, or go to http://www.zen-cart.com/forum/showthread.php?t=153528

What’s new:

  • Slightly updated code
  • Video install instructions


  • This Zen Cart modification is licensed under the GNU General Public License: http://www.gnu.org/licenses/gpl-3.0.txt


autoFacebook Lite

By: Jamie Taylor

Don’t let the name fool you, this is perhaps the most robust version of autoFacebook yet. Just see the new features below. autoFacebook Lite is a facebook application you simply install to your facebook store page, edit one line of code, and your off and running.autoFacebook lite was started for people who had problems installing my “heavier” autoFacebook 2.0, but because it’s a hosted app, it offers more advantages. Like easier install, few errors, quicker fixes, and automatic updates.

For more info check out the facebook page at: http://www.facebook.com/apps/application.php?id=134663346580107

What’s New:

  • Added super simple installation!!!
  • Added multipage support!!!
  • Added full currency support for Dollar, Pound, and Euro as well as the ability to not user a money sign!!!
  • Fixed problem with product descriptions not being added to page
  • Added Zen Cart integrated error and status alerts.
  • Added more error checking.
  • Removed need for JSON support.



This Zen Cart modification is licensed under the GNU General Public License: http://www.gnu.org/licenses/gpl-3.0.txt

Getting Help:

Help is available via the Zen Cart forums @ http://www.zen-cart.com/forum/showthread.php?t=153528 or at http://htmyell.com/autofacebook-2-0


1. Go to http://apps.facebook.com/storeupdater, to install the autoFacebook Lite app.

2. Fill in your infomation, and select your page to see a preview of how the listing will look on your page.

3. After clicking submit, you will your page’s page Id.

4. Copy and paste that number into line 91 of the included update_product.php, save, and upload the file to your server’s admin/includes/modules folder

For more info and to give feedback check the forums.

Hope ya like it

Download Now! autoFacebook Lite
Downloaded 665 times.

Please note there is an update to this plugin at: http://htmyell.com/autofacebook-2-1/

autoFacebook 2.0

By: Jamie Taylor

What’s New:

  • Added oauth 2.0 authorization to integrate with Facebook’s new Graph API calls.
  • Added Zen Cart integrated error checking and status alerts.


  • Zencart 1.3.9+
  • php 5+
  • cURL
  • JSON


This Zen Cart modification is licensed under the GNU General Public License: http://www.gnu.org/licenses/gpl-3.0.txt

Getting Help:

Help is available via the Zen Cart forums @ http://www.zen-cart.com/forum/showthread.php?t=153528 or at http://htmyell.com/autofacebook-2-0


New Users:

1. Log in to your facebook account and go to http://www.facebook.com/developers and click the “+ Set up New Application” button.

2. Name your application. I suggest something like “MyStoreDomain.com” but it can be whatever you like. Agree to the terms and click “Create Application.” On the next page, if required fill in the security check and click “Submit.”
Note: if an error occurs simply go back you should see your application was created anyway. If so, click “edit settings” otherwise, try again.

3. Now you should see your new Application settings. You can come back and edit these later though it’s not required (I’d suggest atleast uploading an Icon image once everything is working).

4. For now we need to click “Web Site” on the left and edit our “Site URL” and our “Site Domain”.
The Site URL is simply your store’s web address followed by a ‘/’ forward slash. So it should look something like “http://mystore.com/”
Your Site Domain is just your domain name ‘dot’ whatever and could look like “mystore.com”. No “http://”, no “www.”, and no “/”

5. Now click “Facebook Integration” on the left. Towards the bottom you should see “Installable to?”. Uncheck “Users” and add a check next to “Facebook Pages” instead.

6. Now click “Save Changes”. If all goes well you should see your app on the My Applications page, along your app settings. We’ll need to use the “Application ID” and “Application Secret”.

7. Now that we’re done with our app open up the included facebook_authorization.php file and edit lines 4 and 5 with your App information.
Note: facebook_authorization.php is a simple file that we’re going to upload to our server and run from our browser to authorize our application to do things for us like post to our page’s wall. After if gives us certain information it is no longer needed and should be deleted.

So on line 6 where you see: $app_location = “http://yoursite/facebook/facebook_authorization.php”; This is simply the URL to where you plan to upload facebook_authorization.php. I suggest making a temporary folder on your folder called “facebook”. However, where ever you plan to upload it, it must be on the same server you specified in Step 4 and make sure you reflect it’s location on line 6. Once you’re done editing lines 4-6 save and upload it to where ever you specified in your $app_location.

8. Once uploaded run the file in your browser and you will be taken to facebook’s Permission Request prompt to authorize your app. Click “Allow.”

9. You should now see a Success page with your page’s ID and Page’s Token. We need those for our next step.
Note: if you see a period (or any other punctuation) at the end of your page’s Token consider it part of the token.

10. Open up the included update_product.php file in the admin/includes/modules folder and edit lines 90 through 97 with your Application Info and the Info given from the last step (Step 9). Note: $store_url needs to be the full url to your store without the trailing (‘/’). So it should look like “http://www.mystore.com” or “http://www.mystore.com/store”. Alos: lines 96 and 97 can be personallized or just left as they are.

11. Now upload the the new update_procut.php and the facebook folder to your store’s admin/includes/modules folder on your server (or just drag the admin folder from autoFacebook2 folder to your zencart root directoy)

12. Now when you add a new product to your store your facebook will automatically be updated with the new product info. Note: you may now delete the facebook_authorization.php uploaded in step 6 as well as the temporary folder from your server.

Existing Users:

If all is fine with your old version of autofacebook, there really isn’t any major improvements with this version. This version mainly address facebook’s changing of the user authorization process for people who did not create their application before july 1st.
However if you want to upgrade be aware of the following:

  • You will have to create a new Application since the methods have changed
  • I am unable to test this on any live sites running the old version of autoFacebook so to be safe and ensure maximum compatibility:

1. Delete the “facebook” folder in your admin folder.

2. Start at step 1 for new users.

Adding to autoFacebook to autoTweet.

to add to autoTweet just complete steps 1 – 10 but istead of uploading update_product.php copy lines 89 – 132 of the autoFacebook 2.0 update_product.php and paste them above line 90 (above “// start autoTweet 3.0″) of your current update_product.php

Adding autoTweet to autoFacebook

copy lines 90 – 157 of your autoTweet update_product.php and paste them just below line 132 (where you see “//end of autoFacebook”)

For more info and to give feedback check the forums.

Hope ya like it


Available for download at Zen-Cart.com

You heard me right… autoTweet 3.0 is now out. I know what you’re thinking;

“But Jamie, didn’t you just release 2.0 like last week?”

Well, yeah but-

“So why 3.0 so soon?”

Good question.

When I finally sat down to make autoTweet 2.0 I unwittingly did so without the knowledge that twitter was doing away with their current method of making API calls (read more about this here: http://dev.twitter.com/announcements). The new method requires OAuth to make API calls and is basically going to render autoTweet useless. This does however make using twitter apps far more secure. Also, since it’s  a new method I decided to go ahead and make it a 3.0 (i was never good with these naming conventions). Just be happy it’s not 2.0.1.b R2 beta 4.

New Features
  • Uses OAuth to verify twitter user.
  • Added real time error reporting
  • Added ability to set twitter time out.
  • php5+
  • JSON support
  • cURL
  • Zen Cart 1.3.8 or greater
Set up

Anyway to get started with the new twitter method we’re going to have to create a web app via twitter that we can access using a single access token.

1. first you need to log into your store’s twitter account and create an application on twitter http://dev.twitter.com/apps/new

2. Fill in the information boxes like so:

a. Application Name: Just use your store’s name or URL. I simply used store’s address: Htmyell.com

b. Description: You need to enter at least a 10 character description. Once again I used Htmyell.com

c. Application Website: your store’s URL, i.e. http://www.htmyell.com

d. Application Type: Make sure you set this to “Browser” if it’s not already set for you.

e. Callback URL: This isn’t important to us, since we wont need to be making any requests. Just enter your store’s URL again:

f. Make sure you set this to “Read & Write” if it is not already set for you.

g. Application Icon: Your logo, pic, etc.

Anything else you can fill in however you want, or leave blank. Note: you can come back and change this at any time.

Now prove you’re real, click register application, then accept the terms.

3. Now you’ll be redirected to you application details page. There you should be given two important things; your Consumer Key, and your Consumer Secret.

4. Extract everything the autoTweet3.zip. Open the included update_product.php from the in admin/includes/modules/ folder and edit the information you see between quotes on lines 92 and 93 with your information

5. Now back at your Application Details page you should see a link on the right hand side called “My Access Token”, click on it. This page gives you your single access token of the twitter account that you created the application with.  Use this information to fill in lines 94 and 95 back in update_product.php.

6. Now edit lines 96 through 100 like so:

a. $twitUsername = your twitter user name.

b. $twitPassword = your twitter password.

c. $bitlyUsername = your bit.ly user name (available for free at www.bit.ly)

d. $bitApiKey = your bit.ly API Key, find it by logging in to bit.ly and clicking settings.

e. $storeUrl = The web address to your store’s home page. (Might be something like www.mystore.com or www.myname.com/store) Note: the “”http://”” before the url is not needed here.

f. $showprice = If you want to show your product’s price on twitter set this equal to 1 (with no quotes.) If you don’t want to set your product’s price set this equal to 0 (default).

g. $timeout = the amount of time (in seconds) to wait for twitter before moving on and just adding the product. This makes it so that your store doesn’t break waiting for twitter. No quotes here either.

7. Save and Upload

Save the file. Now upload the contents of your autoTweet 3.0 admin folder to your store’s admin folder. This will replace your existing update_product.php file with the new autoTweet version and add the twitteroauth folder. So if prompted, allow overwriting.


Download now from Zen-Cart.com

Yep another version of autoTweet for Zen Cart. Just thought I’d share it here until it’s up at Zen-Cart.com

Note: This mod was tested on Zencart 1.3.9a and up although probably works just fine on 1.3.8.
This modification automatically updates your Twitter
followers every time you add a product to your store. It will tweet your product’s name as
well as a shortened URL to the specific products page all without you ever
having to log in to twitter.
It also allows you to use bit.ly’s free link tracking analytics.

Change log v2.0:
  • Made install much easier (about 3 minutes)
  • Added option to turn on/off price.
  • Added twitter error checking set 10 second timeout so store doesn’t break if twitter goes down.
  • Added bit.ly error checking in case links don’t shortening.
Change log v1.01:
  • Updated for zencart 1.3.9a
  • Fixed ‘cannot re-declare class bug’ cause by bilingual stores
  • Fixed cURL Followlocation Error.
  • Added better support for future version of Zen Cart.
  • php5+
  • JSON support
  • cURL
  • Zen Cart 1.3.8 or greater
Getting Help:


1. To install first unzip autoTweet2.zip and edit: admin/includes/modules/update_product.php

At around line 92 you should see:


$twitUsername = "youTwitterUsername";  //twitter username
$twitPassword = "yourTwitterPassword";  //twitter password
$bitlyUsername = "bitlyUsername";  //bit.ly username
$bitApiKey = "R_0191a10f956ee982c1fda80f";  //bit.ly api key.
$storeUrl = "www.your-store.com";  //url to the homepage of your store.
$showprice = 0;  // Show the product price? 0 = off, 1 = on. no quotes.
2. Fill in between the quotes with your info.

$twitUsername = your twitter user name.

$twitPassword = your twitter password.

$bitlyUsername = your bit.ly user name (available for free at www.bit.ly)

$bitApiKey = your bit.ly API Key, find it by logging in to bit.ly and clicking settings.

$storeUrl = The web address to your store’s home page. (Might be something like www.mystore.com or www.myname.com/store) Note: the “”http://”” before the url is not needed here.

$showprice = If you want to show your product’s price on twitter set this equal to 1 (with no quotes.) If you don’t want to set your product’s price set this equal to 0 (default).

3. Save and Upload

Save the file. Now upload the contents of your autoTweet 2.0 admin folder to your store’s admin folder. This will replace your existing update_product.php file with the autoTweet version. So if prompted allow overwriting.

That’s it! (waaaay easier than the old version!)
I hope you like the mod. If it happens to save you a whole lot of time or make you a whole lot of money… don’t forget us little people :)

Buy me a coffee! donate to squirtpunk@hotmail.com


Note: there is a new version of autoTweet available here:

autoTweet 3.0

Yep, that’s right… yet another social media plug-on for Zen Cart. This one, automatically generates Open Graph Tags in your header. As well all know Open Graph is supposed to be a way of the future. Some people even projecting that it will change the way we use the web. Well Im not sure about that, however, not to be left in the past I created this little bit of script for everyone’s favorite e-commerce solution.

This little bit of code allows you to integrate the new Facebook Open Social Graph API into your store’s header info.

The following code goes in your html_header.php file located in your: includes/templates/YOUR_TEMPLATE_NAME/common/ directory right under the title tags. Which should be around line 25 and look like this:

<title><?php echo META_TAG_TITLE; ?></title>

And this gets pasted under it:

################ start of AutoOpenGraph ###################

$store_name = "Htmyell"; //e.g. "Samanthas Power Tools", or "Gus' China Shop".
$store_url = "http://www.htmyell.com"; //url to your store (no trailing '/')
$product_type = "product"; //type of product you're selling (see tutorial)
$use_addr = 0; //use address? if yes, set $use_addr = 1; (no quotes). edit lines 31-34.
$use_email = 0; //use email address? if yes, set $use_email = 1; (no quotes) edit line 37.
$use_phone = 0; //use phone number? if yes, set $use_phone = 1; (no quotes) edit line 40.

//if $use_addr is set to 1;
$street = "123 Main St";  //change to your street address.
$city = "Richmond"; //your city
$state = "VA"; //Your State. Facebook exaple uses abbreviation.
$zip = "23220"; //you're zip/postal code.
$country = "USA"; //your country. Facebook example uses acronym.

//if $use_email is set to 1;
$email_address = "yourEmail@yoursite.com"; // your email

//if use_phone is set to 1
$phone_number = "+1-800-555-1234"; //format: +country code - area code - number.

//no need to edit below this line:
$prod_url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

//get defined image or default
$myImage= zen_get_products_image((int)$_GET['products_id']);
$img = simplexml_load_string($myImage);
$img = $img['src'];
if($this_is_home_page){ $depends = $store_name; $product_type = "website"; }
else if ($categories_name){  $depends = $categories_name; $product_type = "website";  }
else if ($products_name){ $depends = $products_name; }
else { $depends = META_TAG_TITLE; $product_type = "website"; }
################# end of AutoOpenGraph ####################

<!-- start of AutoOpenGraph tags -->
<meta property="og:title" content="<?php echo $depends; ?>" />
<meta property="og:type" content="<?php echo $product_type; ?>" />
<meta property="og:url" content="<?php echo $prod_url; ?>" />
<meta property="og:image" content="<?php echo $store_url . '/' . $img; ?>" />
<meta property="og:description" content="<?php echo META_TAG_DESCRIPTION; ?>" />
<meta property="og:site_name" content="<?php echo $store_name; ?>" />
echo '<meta property="og:street-address" content="'.$street.'" />'."\n";
echo '<meta property="og:locality" content="'.$city.'" />'."\n";
echo '<meta property="og:region" content="'.$state.'" />'."\n";
echo '<meta property="og:postal-code" content="'.$zip.'" />'."\n";
echo '<meta property="og:country-name" content="'.$country.'" />'."\n";
echo '<meta property="og:email" content="'.$email_address.'" />'."\n";
echo '<meta property="og:phone_number" content="'.$phone_number.'" />'."\n";


Obviously you’re going to want to configure this a bit. Here’s how:

  1. on the first line you’re going to want to change $store_name to the name of your store.
  2. $store_url should be the http path to your store (e.g. http://www.mystore.com) with no trailing ‘/’slash.
  3. $product_type will usually be left alone it’s used for Facebook’s own categorizing purposes. However you can see what categories you’re allowed to use @ http://opengraphprotocol.org/#types.
  4. $use_addr, $use_email, and $use_phone are set to 0 by default (this means they’re off) however if you’d like to turn them on, set them to 1. So if you wanted to have your email address used by Facebook you’d set $use_email = 1; then edit the section that says “if email is set to 1″ with your personal information. Do this for any of the info you change to 1. Otherwise just leave the info alone. There is no need to delete it as it wont be executed unless set to 1.

For the image sent to facebook, the script is set up to use your product’s main image. However if someone tries to share your home page (or any page that isn’t a product page) the script will search for a product image and upon not finding one will use your zen cart default no product image. Due to this, I recomend changing the default no_image.gif to your companie’s logo. In your zen cart admin go to Configuration -> Images -> Product Image – No image picture, and change it to an image of your company’s logo.

Remote control your client’s web site from your server.

Sadly we’ve all had clients that just turned around and decided not to pay. Stylelock helps give you some control over the situation. You can enable or disable the client’s stylesheet by typing either “yes” or “no” in the first line of a text file hosted on YOUR server.

In the second line of the text file (and all lines after) just type the message to the client if you decide to disable the stylesheet. (you can use HTML and i suggest it be as disruptive as possible).

To set up:

  1. Edit and upload var.txt to your server *you can rename this to whatever you want (i.e. clientsname.txt)
  2. Upload stylelock.php to client’s server in the same directy as the index/home file.
  3. If not already a php file, rename their home page to .php (i.e. index.html to index.php)
    (dont worry it will work the same and you can change it back when done)
  4. In the on your document, replace the stylesheet line with:


require_once ("stylelock.php");
echo lock("http://your-server.com/var.txt", "http://either-server.com/style.css");

***change the first url to the address of your text file (on your server)
***change the second one to the address of the stylesheet (the .css file can be placed on either server but it would be safer to host it on yours until paid in full).


*For added security, you could encrypt the html in your text file (http://www.w3tool.com/html_encryption/) or even call an external .js file if you decide to disable a client that you think would be able to it figure out.
*This may not be 100% but should do the trick with most clients.
*Requires cURL extension on client’s server.
*Obviously provided without liability and without guarantee/warranty.

Download: Stylelock
Downloaded 213 times.

AutoFacebook automatically updates your store’s facebook page whenever a new product is added via your admin backend. AutoFacebook is easily integrated with AutoTweet.
AutoFacebook is provided up the GNU General Public License without warranty. Note: always back up your files before making any changes to your sore. AutoFacebook has only been tested on zencart 1.3.8 with php 5.3+

Let’s get started. This tutorial assumes you already have a Product/Business/Fan Page for your store up and running. If not click here http://www.facebook.com/pages/create.php to set one up.

Note: To integrate with twitter so that both are automatically updated from zencart download my twitter mod available at http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1523. If you already have AutoTweet installed: Before beginning copy the your twitter info (lines 128 through 148) from your current update_product.php file (located in admin/includes/modules/) and simply paste it below the AutoFacebook code (around line 173) in the update_product.php file that came with this mod.

1. First, extract the contents of autoFacebook.zip then log-in to Facebook.

2. Now we need to become a Facebook Developer! go to http://www.facebook.com/developer to install facebook’s developer app to your page, then Click allow.

3. On the next page, click the “+ Set Up New Application” button in the top right hand corner.

4. Then fill in the name of your application click agree and then click “Create Application.”

5. Get passed the security captcha if prompted… and then you should arrive at your application’s settings page. You can come back here later to update info and add an icon for your app, but for now click “Authentication” on the left, and add a check to “facebook pages”.

6. Next click “Canvas.” This is important: facebook uses your canvas callback url to pull content from a page on your server and bring it into your facebook app. Essentially it runs your app as a web page from within facebook. This is going to link to your fbcanvas folder included in the downloaded autoFacebook zip. However before we can upload the fbcanvas folder to your server we have to finish what we’re doing now. fbcanvas will need to be uploaded to your public/www root folder. So we’ll fill in where we plan to host our fbcanvas folder. So if my store is http://www.htmyell.com, when I upload fbcanvas to my server I’ll upload it to the public root directory so that it’s url will be http://www.htmyell.com/fbcanvas/. So my Canvas Page url will be “htmyell_backend” (since odds are that hasn’t been taken) and my Canvas Callback URL will be “http://htmyell.com/fbcanvas/”. Also while you’re here make sure to click “FBML” instead of “iFrame.”

7. lastly, click “Connect” and enter your stores URL with a trailing “/” for your “Connect Url”.

8. Everything else is fine for now, click “Save Changes” to continue and (if you’re canvas page url isn’t already taken) you should be taken to a new page with your apps info. You will need you “API Key,” your “Application Secret,” and your “Canvas URL” key. So copy and paste them somewhere. NOTE: Do not share your API Key or Application Secret with anyone else.

9. Now You will also need the User ID of the page you created for your store. To get this, open a new tab in your browser and go to your stores profile

and the id will be in the address bar of your browser

copy and paste this somewhere too.

11. Now open the index.php file that’s included with autoFacebook (in the fbcanvas folder) in your text editor. Edit line 4 with your Application’s API Key, line 5 with your Application Secret number, line 6 with the User ID of the fan page/product page you created for your store, and like 7 with your Canvas URL.

12 Save and upload JUST the fbcanvas folder to your server’s public/www root directory.

13. Now go back to your My Applications page (where you got your Api Key) and click “View Application Profile”

click “Add to my Page” (under the apps image) then select your store’s page. Be careful not to add your application page. click close

now click “Go to Application.” On the next page, click the “Allow” Button

14. Now you should see something like this with your facebook name.

Since we already added our page to our application, click the “Click Here to allow all permissions to your app.” link.
On the first page that comes up, click “Allow Access”
On the next page, in the drop down box make sure you also check your store’s page. Once both are checked click Allow Publishing

click allow again until you’re back at the application page with your name and “Step 2.”

15. Now Click the “Click Here to allow your page all permissions to your app” link

16. Your page should already be showing in the drop down menu since we added our page from the app page. So just click “Allow Publishing.”

17. Now you should see a page with your Infinite Session Key, and if you navigate to your store’s Facebook page you’ll see your first generated message!
Now we just have to fill in our zencart info!

18. Now open admin/includes/module/update_product.php from your autofacebook folder and edit lines 132 – 140. with your stores info, your api info, and your infinite session key.

19. Upload the contents of autoFacebook/admin to your stores admin folder. And (if prompted) overwrite your existing update_product.php and merge everything else.

Now… you’re done! Congrats, the next time you add a product to your store in zencart, it will automatically post to facebook!

NOTE: Once you have your infinite session key the fbcanvas folder you uploaded should be deleted for security reasons.
If you need help check the zencart thread for this mod