Do you run a Wordpress CMS with the WP-Shopping-Cart plugin? I was recently working on a project for a website running the Wordpress CMS with the WP-Shopping-Cart and I needed a way to have a different price for shipping depending on each specific quantity amount.

Shipping Price by Default

By default, the WP Shopping Cart plugin lets you setup a flat rate shipping amount for each product regardless of how many (quantity) are purchased. But this is a problem when you need to up the flat rate when more quantity is ordered. So here is a quick fix to that. Locate in your plugin directory the processing_functions.php file. Inside the nzshpcrt_determine_item_shipping function. I changed the function to the following:

function nzshpcrt_determine_item_shipping($product_id, $quantity, $country_code)
{
global $wpdb;
if(is_numeric($product_id) && (get_option(’do_not_use_shipping’) != 1)) {
$sql = “SELECT * FROM ".$wpdb->prefix."product_list WHERE id=’$product_id’ LIMIT 1″;
$product_list = $GLOBALS['wpdb']->get_row($sql,ARRAY_A) ;
if($product_list['no_shipping'] == 0) {
//if the item has shipping
if($country_code == get_option(’base_country’)) {
$additional_shipping = $product_list['pnp'];
} else {
$additional_shipping = $product_list['international_pnp'];
}
if ($quantity >= 16)
{
$shipping = 0;
} elseif ($quantity < 16 && $quantity >= 11)
{
$shipping = 7;
} elseif ($quantity < 11 && $quantity >= 6)
{
$shipping = 6;
} elseif ($quantity < 6 && $quantity >= 2)
{
$shipping = 5;
} else
{
$shipping = 2;
}
// $shipping = $quantity * $additional_shipping;
} else {
//if the item does not have shipping
//$shipping = 0;
}
} else {
//if the item is invalid or all items do not have shipping
//$shipping = 0;
}
return $shipping;
}

You can see where the Quantity numbers and Shipping prices go in depending on your needs. This is a very helpful and useful piece of code. Of course, if you are using UPS or USPS for shipping quotes than there is no need for this. But for a custom flat rate shipping amount for different amounts of quantities this is a great way to do it. If you want to learn more about this Ecommerce shopping cart plugin for Wordpress you can read my article Ecommerce for your Wordpress Blog.

I wanted to take some time and revisit the open source social networking platform Elgg. This is one the coolest open source projects out there and is still not talked about enough. I still hear stories about people building social networking platforms on their own from scratch. It doesn’t make too much sense to me when you can utilize such a great tool such as Elgg. I’m accomplishing two tasks at once here, because I have a few people that are requesting some information from me concerning building a social network.

Elgg 1.0 requires a system running PHP 5.2+ as an Apache mod (not in CGI mode or safe mode) with GD extensions, MySQL 5+ and a version of the Apache web server with mod_rewrite installed. OpenSocial requires Mcrypt; Elgg 1.1 SOAP extensions will require the PHP SOAP library. You don’t have to have the OpenSocial side of the application if you don’t want to. But it is certiantly a positive. The OpenSocial part is the OpenID part allowing your users to integrate their logins with other social networking websites. Here is the basic features rundown of Elgg:

  • Blogging
  • Social networking
  • File repositories for individuals and communities
  • Podcast support
  • Full access controls
  • Supports tagging
  • User profiles
  • Full RSS support
  • RSS aggregator
  • Create communities
  • Collaborative community blogs
  • Create ‘friends’ networks
  • Import content
  • Publish to blog
  • Multilingual
  • Branding/customisation
  • OpenID support

From there you can basically understand the core of what Elgg gives you and where your imagination can take over. I have built a few websites in Elgg along with my team of developers and we all agree that Elgg was very easy to customize to our needs. Last year I built two websites that are running Elgg:

Since the last time I wrote about Elgg the community has grown tremendously and so has the code. Many more plugins have been contributed to the project, giving Elgg much more power and ability for your social network. I wanted to take the time and highlight a few plugins of interest.

  1. Media Gallery - this plugin gives the admin the abililty to post flash videos using the jeroenwijering.com flash media player.
  2. Advertiser - Allows you to run ads on your elgg site.
  3. Profile Comment Wall Widget - This is similar to the comment wall on Facebook. Very important for social networking sites.
  4. Bookmarks - This gives your social network some Delicious type functionailty. Your users can save, import, and export their bookmarks.
  5. Vanilla Forum - If you need a forum integrated into your social network than this Is what you want.
  6. Chat Integration - This uses the PhpFreeChat to integrate an Ajax chat system into your social network.
  7. Invitation List - Adds a menu item to the ‘Your Network’ page, called ‘Open invitations’. It lists all invitations sent out by the current user or all invitations if the user is an admin) and offers the option to delete, resend or edit them. This is really important because if you send out an invitation, and they don’t get it for some reason, you need to be able to know that and correct the problem.
  8. Notify - Adds a template keyword {{notifications}} that shows whether a user has pending friend requests and membership invitations.
  9. Module Manager - Self explanatory. Same idea as your plugins manager in Wordpress.
  10. Statistics - Admins and users can view statistics of all kinds. For admins is for all content and users. And for users content posted by him or her.

I hope this article has been helpful for you in learning more about the open source Elgg social network platform. I think many can benefit greatly from this application if they plan properly and use it accordingly. I have to admit that I have not used it nearly as much as I would have liked. But as you can see the posibilities are pretty endless with this platform.

Yahoo Small Business is currently selling domain names for only $1.99 right now. I’m not sure how long this is going to last, and it is also for new customers only! Of course the way around that is you could create a new account if you needed to. The $1.99 price counts for only the first year, and it’s $12.95/year after that. I’m using this as an opportunity to purchase any domain names that I want to test out, and if they don’t work out for me i’ll just bag them after the first year!

The way I located this discount was by first doing a Google search for ‘Yahoo Domains’. Then you click on the PPC ad on the top of the listing, not the organic listing. The PPC listing redirects you to a special landing page where you can get the $1.99 discount! As i’m writing this i’m realizing that this only will work for your first domain name! But anyhow, it will save you some cash for a .com and you can get a domain name for something you want to try out. In my case, i’m creating a new affiliate website that I wanted to test out the market on first. So if it doesn’t work out for me, i’ll just bag it when my 1 year is up.

Recently I was working on a website where my customer had a Wordpress website and needed a different header on each page. Not post, but page. In this particular situation, my client is using Wordpress as a content management system for static content pages only, and not for a blog. There is some very simple PHP code that I used in my header.php file, and this code can be helpful for you especially if you are not an expert in PHP, but just need a solution.

Locate your header.php file and located the <div> for your header. Replace it with this code:

<?php if (is_front_page()) { ?>
<div id=”header”> <!– This is the Header id that you want on your Front Page” –>
<?php } else { ?>
<div id=”<?php echo $post->post_name; ?>”> <!– An alternative header is defined, based on the page title –>
<?php } ?>

Now you define each “header” div in your style.css file. The name of the <div> is associated with each static page title. So for example, if you have an About page your div would be #about in your CSS file. It’s a pretty simple approach to getting a different header on each page for Wordpress. This code would of course work for any div or class. Most times people use it for the Body class. In my case I only needed a different header and that worked fine for me.

I think the code here is so simple, it’s almost a waste of time to create any kind of plugin to do the same thing. Might as well as just use the simple code to make it happen. If anyone has a different/better way of accomplishing this same task please post your thoughts. Good luck with your Wordpress site and I hope this helps you in Creating a Different Header on Each Page for Wordpress!

Are you trying to build your own social network? Are you at least contemplating the idea in your mind? Than you are looking for Elgg- the open source social network platform. It’s open source, which means it free and customizable. It also means that it gives you a solid foundation to work off of. Elgg supports a variety of different plugins that you will find helpful such as the “Open ID” plugin which essentially gives your social network Open ID support. The invitation tool works like a charm with Elgg, giving your social network the physical capability to spread like a “virus” to many many users. I must say that I recommend Elgg to all as it has worked so well for me and my personal project Realedin.com - a real estate social network.

Fresh out of the box Elgg contains these fundamental facebook like features:

  • Find and make friends
  • create communities
  • upload photos
  • Your Profile Page

With some additional features of course:

  • Your own blog
  • RSS Reader

There are a few plugins I suggest as well. These plugins have worked very well for me in my projects:

  • Bookmark tool
  • Private Messages
  • Suggestions Tool

And my final thought to round it all up. Many people have been throwing up Myspace Clone’s for the past couple of years now to build their own social networks. I cannot emphasize how big of a waste of time that is. Elgg is built on such a better foundation than Myspace ever was. Plus it has more features. Due to the fact that it’s a major open source project you will see exponential growth in the system in the months to come. So if you are serious about creating a social network of your own, than use Elgg. If you are not, and are looking for a stupid quick fix than go ahead and do a Myspace clone like everybody else.

Sponsor: Reliable Web Hosting, Unlimited Domains, $6.95 a month with Bluehost.com

So I shot an email over to the TextPattern guys asking them the question “why would someone use TextPattern rather than Wordpress”. The response I got back was very helpful and gives a unique insight into what TextPattern really is and how it can help you in your web design/development efforts. What you will find is that TextPattern really can be a powerful open source tool for you. Much thanks to Ruud for spending the time to respond to my inquiry and give back some great feedback!

Quoting Ruud:
“I can’t compare Textpattern with Wordpress, because I’ve never used Wordpress. No really, I haven’t. What I know of the differences between TextPattern and Wordpress stems from reading reviews that compare the two.

While TextPattern can be (and is) used for blogs, it’s more a lightweight CMS than just a blogging solution. I personally consider these TextPattern features most important:

  • plugins: they keep TextPattern itself small, yet enable you to do what you want.
  • small code base: fast and secure (no monthly security updates needed).
  • flexible templating system and powerful template tags
  • helpful community: while not as big as Wordpress, you do get an answer

I hope that’s enough information. If not, you may want to ask your question on our forum (I think it’s been discussed before). Many of our users have used other CMS and/or blogging solutions and probably compare various solutions better than me.”

My Thoughts
Very interesting stuff. What interests me is that TextPattern plays to be a very very simple open source content management system. That I find very interesting because of the need of such a thing. Not every website, or every situation is going to call for a full fledged Wordpress or Drupal installation. There are times when you just need something very simple and basic. For those very simple content websites with 6-30 pages in that range, with not much functionality, it seems that TextPattern would serve to be a great solution.

Side Note
Don’t hold yourself hostage to just one open source content management system. And don’t hold yourself hostage to just the popular ones. Get familiar with as many of them as you can. This will prove valuable to you long term. Just because we love Drupal and Wordpress so much, doesn’t mean that something better isn’t “over that them hills”.