This is another shipping module for Zencart. I have been working on the UPS XML module for awhile now. I have ported over the more advanced packing algorithm from the UPS module, to allow packing support in the USPS shipping module. This module allows Zencart to calculate shipping for multiple boxes for a freight quote. The default behavior for Zencart is to place all items in one box with a total weight to send for quote. With this updated USPS shipping module, items will be packed into boxes you enter, or you may set items to always be packaged separately. The module then returns the aggregate shipping cost for your packages. This should provide much more accurate shipping quotes. Continue reading Zencart + USPS Webtools with Multiple Package Support
CodeIgniter + UPS Worldship
This is a post I have been to get around to for quite awhile. At work we have UPS Worldship installed on our desktops for shipping out packages. I had written a small php script that could open the UPS Worldship database, and report all of our tracking numbers with links. UPS had switched from being an unprotected Microsoft Access database file, to using a Microsoft SQL (MSSQL database). This kind of broke my little php script I had written, but I was eventual able to work something together. Recently, I installed the latest update UPS Worldship 2010 Version 12. Wouldn’t you know it, broken again. I couldn’t get my little script working again. ODBC access had been removed from this version. I could no longer connect to the MS SQL dabatabe for UPS Worldship.
CodeIgniter + Chargify
I recently began integrating the Chargify service into a web app I am coding for codeigniter. Chargify is seems to be a slick web service for creating subscription based services. They provide a strong API, and along with a slick web based dashboard (GUI). One of the points on using the API are Chargify postbacks. I did some quick googling and didn’t turn up much in the way of chargify and codeigniter. I did find a great library for integrating the API called ChargeIgniter.
Chargify will send a json array back a POST var to your site. The docs for Chargify don’t state what variable they are submitted as. This is what I came up with.
function post_back(){ $body = file_get_contents("php://input"); $replace = array('[', ']'); $replacements = array('', ''); $body = explode(',', str_replace($replace, $replacements, $body)); //$body now contains array of subscription ID's //Iterate through returned subscription IDs foreach($body as $subscription_id){ $subscription = $this->chargify->get_subscription($subscription_id); //Do something here with $subscription details } } |
Zencart + Free Shipping USA Shipping Module
Many websites offer free shipping in the USA. The default shipping module for zencart does not allow a store owner to easily handle it. In the configuration of the shipping module, you set the desired country (USA) to display free shipping to, and any of the other options that are available in the standard freeshipper module included with zencart. The zip file contains just 2 files, the shipping total, and a english language define. Install instructions are included in the download. Very easy and fast to install.
You may download the module form bitbucket.org, or even help contribute to it.
FreeNAS + Mercurial
I was recently tinkering around with Mercurial and getting my feet wet using a distributed source version control. I have been using Subversion for about the past year, and has served me well. I wanted to get involved with some of the projects hosted on Bitbucket.org in order to fork some projects. The are a number of useful Codeigniter projects and zen-cart addons on there as well. One of the main ideas behind using a DSVC is not needing a centralized server. This seems great, if you are doing your work where will you have access to the network at some point to push/pull those changesets. I work from a couple locations and need to be able to push/pull those changes. Pricing plans on Bitbucket.org are very reasonable, but I needed to host a few extra private repositories. Got me thinking to install mercurial on that FreeNAS box sitting quietly in my basement. I am currently using FreeNAS .69. If you are running another build of FreeNAS, you will need to find the appropriate packages for your build. Continue reading FreeNAS + Mercurial
PetFinder API PHP Class Library
I was interested in a project for a website as to what data could be retrieved from PetFinder.com. To my surprise, on their website located in the footer is a link to their API documentation. In order to use their API, you must first fill out a developer request for a key & password. I did a quick look to see if anyone had written a php class for accessing the api, but couldn’t find anything useful. I have created a php class that you can call the certain methods available to retrieve the records.
Update 6-30-2010:
I recently updated the class to enable caching the xml response from the Petfinder server. This should provide a nice little speed boost even though it was already pretty fast :). Caching is enabled by default, and caches expires in 3 minutes. The folder “cache_files” in zip folder must have write permissions. As shown in the instructions, you can change the paths of cache files.
CodeIgniter + Whitepages.com API Library
I was recently working on another Codeigniter project that I needed to grab some phone, address, & map information for plotting on a map. After doing a little searching I found Whitepages.com has provided an API interface for retrieving data via REST. The methods seemed simple enough, and provided an easy way to create a CodeIgniter library to due the dirty work. Continue reading CodeIgniter + Whitepages.com API Library
Codeigniter + Geshi
Geshi is a PHP class to do the heavy lifting for syntax highlighting output to your browswer. Geshi started originally to help users highlight code posted on bulletin board sites. I converted the standard Geshi class into a Codeigniter library. Just a simple as renaming the class and created a few methods to conform to some of the options you’ll find in codeigniter.
Continue reading Codeigniter + Geshi
Zencart + Price Breaks + Easy Populate
Here is another update to the popular add-on for Zencart called Easy Populate. For those unfamiliar with Easy Populate, it’s a fantastic add-on for Zencart. Easy Populate allows user to create comma separated values (.csv) files to editing the list of products in their Zencart installation. A user recently emailed me requesting an additional feature of price break imports to be included in Easy Populate. Continue reading Zencart + Price Breaks + Easy Populate
Zencart Custom Session Length
Lately, I have been developing a few modifications for Zencart. One of things I have noticed during the development process, is my shopping cart being lost while typing code and then refreshing the page a little while later. This was no big deal. Just go in add another product, and test again. Then, I got to talking to a few other users who seem to experience the same problem of losing their session. As an end user or a customer this can be frustrating that you have added items to your cart, and then something come ups. They come back to their cart, go to another page, and they have lost their shopping cart. Zencart checks your php.ini for session length. On some hosting accounts, you don’t have access to change this value, or you just want a more user friendly way to adjust this. This contribution / modification for Zen-cart will fix this problem. No core files are touched with this mod. You can extend the session length / timeout / expiration from the admin page.