
The time has come to launch version 1.0 of my Basecamp PHP Class. It’s by no means complete, but it does a majority of the main core features. So, instead of sitting on it for a while, I figured that it was best to launch it early and keep building upon it (hoping too that I will receive more feedback on it).
So, please check it out on the Basecamp API PHP Class page. I whipped together a quick documentation page as well listing how to use the core methods, as well as a bunch of the simple set and get public methods.
November 21st, 2008 in
PHP,
Web Apps |
No Comments

I was given a design to implement into Magento yesterday, and I began on the product pages today. I quickly realized that the standard toolbar placement wasn’t going to work due to the design. The only way to make it work was to move it from catalog/product/list.phtml to catalog/category/view.phtml.
After playing around with the two templates, and with catalog.xml, I realized that there was more going on behind the scenes that would not allow an easy move. There are two problems that exist. First, you can’t just move the blocks in catalog.xml to be nested under view.phtml instead of list.phtml. It won’t load as a child. Second, the product collection is not yet loaded when Magento renders category/view.phtml, therefore, the toolbar can’t work (because it requires a knowledge of the products that it’s loading to work).
Thanks to a good friend of mine, Vinai, we came up with a solution that works, and is VERY easy to implement. It just takes two easy steps:
Step One:
Remove the display of the toolbar from product/list.phtml. You probably don’t want the toolbar displaying twice above all the products. So, find the following code and comment it out:
<?php echo $this->getToolbarHtml() ?>
Step Two:
Add this code where you want the toolbar to be displayed in category/view.phtml:
<?php
$toolbar = $this->getChild('product_list')->getToolbarBlock();
$toolbar->setCollection($this->getChild('product_list')->getLoadedProductCollection());
echo $toolbar->toHtml();
?>
What is this code doing? Well, the toolbar block is loaded as a child to the list.phtml template block. The first line is calling the toolbar block as a child of the product_list and storing it as $toolbar. On the second line, the $toolbar object is being fed the proper product collection, again called by the child of product_list. Then, you simply display the $toolbar object using it’s toHtml() method.
It’s not exactly one of those easy-to-figure-out kind of things, but - it is very easy to implement. So, hopefully you find this as useful as I have!
November 19th, 2008 in
Magento |
No Comments

I have begun working on a Basecamp PHP class (using cURL). I can certainly add in many of the basics, but I would love some feedback as to what YOU would like it to do. So, please write comments with ideas/wishlist of features that you would like to see in a Basecamp PHP class.
At this point (not *quite* ready for a release), you pass the object your url and login credentials to create the object. From that point, you can get information very easily on people, projects, messages, todos, etc. (returned as an xml object) from which you can sort through to find the data you need.
I haven’t yet created the functionality to post data - but that won’t be difficult, as I already know how to do it.
I’ll hope to have a release within the next couple weeks (hopefully). I’ll create a static page for it similar to my Magento Product Import Script.
Update (11.16.08 - 9pm): I have the class successfully posting comments (to any resource), and posting new messages is in the works. Notifications and file attachments are also on the works.
Update (11.16.08 - 11:20pm): Successfully posting messages to any given project id, category id, and you can easily set if a message is private or not.
November 15th, 2008 in
PHP,
Web Apps |
No Comments

If you have ever tried to move your entire magento directory and database to a new different server, you may have run into problems when trying to use the Magento Connect Manager to update any of the components of the website.
The reason for this is that inside of /downloads/ there is a whole bunch of files that are hard-coded with the paths for the original installation. This is totally fine if you want to keep a development copy on one server, and the live copy on another. But if you want to be able to update the live site - this won’t work.
You’ve got two options if you want to move your site to a new server and still be able to use Magento Connect:
Option 1: The Standard Way
This is probably the easiest way to do it for most people. This is what you are going to want to do:
- Upload a fresh copy of Magento onto the new server (don’t run the installer yet)
- Copy over your Themes/Templates, Skins, Images, and Custom Modules
- Dump the database from the original, and import the database to the new site
- Run the installer - and enter all the necessary info
- Go into the Magento Connect Manager, and install this extension: magento-core/Mage_All_Latest
You should then be good to go!
Option 2: The Package Extension Way
Unfortunately, I actually don’t know how to do this method yet - but according to Varien, this is a good way to do it. So, I believe what you *would* do is to import your database to the new server, install a fresh copy of Magento, and then using the Magento Connect Manager, I think you can bring over your package.
Hopefully I can get some time to look into how to do this.
November 13th, 2008 in
Magento |
No Comments

The product import script has reached a point where it would be very, very useful if people were willing to test it out a bit. It’s not fully ready by any means - but it IS importing products. I’m reaching a point though were it is difficult for me to test every different situation and different kinds of data.
So, I need people who are genuinely interested in seeing this import script come to life. Here is what I’m needing in a beta tester:
- Clearly investigate and document the issues you run into (errors, line numbers, etc.)
- Willingness to put the script to the test - try everything you can to find bugs
- Try importing various different sets of data
- Must be confidential until release of features, issues, and everything else. (You can tell people you are testing it and how it’s going - just don’t give details away yet)
- Will not give out files to anyone else
- Overall willingness and eagerness to help make this script great!
If you are willing to help, please post a comment and what level of experience you have had with using Magento. If you know PHP pretty well, please let me know - as a lot of PHP experience is a major plus if you are willing to get into my code to help me troubleshoot issues and make the script better. I will probably only be selecting a max of 3-5 people to start. I will probably be setting up a private area for all of us to post files, bugs, etc. so that we’ll have a central place to collaborate.
November 9th, 2008 in
Magento |
5 Comments