Offer

Fix WP Ecommerce IPN issues

January 7 2010 by Scott in Open Source, Technology, Web Design

I was recently asked by a client to implement the WP Ecommerce plugin into their Wordpress site in order to sell digital products. Our client used PayPal as the merchant facility and was having issues getting the PayPal IPN feature to work.

I tried every setting possible within the plugin, and also within PayPal to get the IPN to work. Nothing seemed to fix the issue.

So I decided to have a dig around in the plugin core files to see if I could find a fix. I did!

If you go inside your /wp-content/plugins/wp-ecommerce/ folder you will find a folder called /merchant/, inside this folder is the file you require. Open paypal_multiple.php in your favourite editor and then you need to find line 233.

The line below is what you are looking for

  1.  
  2. if(get_option(‘paypal_ipn’) == 0) { //ensures that digital downloads still work for people without IPN, less secure, though
  3.     //$wpdb->query("UPDATE `".WPSC_TABLE_PURCHASE_LOGS."` SET `processed` = ‘2′ WHERE `sessionid` = ".$sessionid." LIMIT 1");
  4.  }
  5.  

The fix is simple, you just need to uncomment the above line so it reads like so:

  1.  
  2. if(get_option(‘paypal_ipn’) == 0) { //ensures that digital downloads still work for people without IPN, less secure, though
  3.     $wpdb->query("UPDATE `".WPSC_TABLE_PURCHASE_LOGS."` SET `processed` = ‘2′ WHERE `sessionid` = ".$sessionid." LIMIT 1");
  4.  }
  5.  

Once you have done this save the file and return to your Wordpress installation. Now go to the WP Ecommerce plugin settings > payment settings and uncheck the ‘use IPN’ checkbox. Now go into PayPal and again remove the IPN settings.

That’s it, your WP Ecommerce should now work and you will be able to sell your digital products.

Use jQuery with other libraries

October 1 2009 by Scott in Technology, Web Design

We we’re recently doing some custom coding work for a client that wanted some nice jQuery effects but had already used the MooTools Javascript Library in their website.

If you’ve tried using jQuery with other libraries you’ll already know they don’t always play well together straight off. It’s pretty easy to sort this issue with the jQuery.noConflict(); function.

Okay, your typical function would look as follows:

  1.  
  2. // Put your code in document ready
  3.      jQuery(document).ready(function(){
  4. // Do jQuery stuff
  5.        $("div").hide();
  6.      }
  7. );
  8.  

Now the fix, simply add to your function and then replace $ with jQuery.

  1.  
  2. // Add the noconflict
  3. jQuery.noConflict();
  4.      
  5. // Put your code in document ready
  6.      jQuery(document).ready(function(){
  7. // Do jQuery stuff using
  8.        jQuery("div").hide();
  9.      }
  10. );
  11.  

It really is as simple as that. Your Javascript libraries should all get along now.

Enable NTFS Read/Write Support OS X

September 29 2009 by Scott in Technology

iMacI recently purchased a 500GB external USB harddrive for data back-ups and file transfers between my iMac, PC’s, Laptop and Server. As all these systems run different operating systems I had to think about the formatting of the external drive. The PC’s are Windows based machines, the server is Linux, and then there’s the OS X iMac. I know FAT32 would be able to have read/write support on all of the operating systems I use, but FAT32 also has a 4GB storage limit!

I finally settled on NTFS mainly because all my systems can read/write to NTFS as standard, all except my iMac. The release of Snow Leopard was supposed to give OS X full write support to NTFS formatted volumes, but, for whatever reason Apple decided not to implement it in the final release.

This does not mean it’s not possible! All that’s needed is a few tweaks.
Continue Reading