Why I’ve been Missing in Action

Missing in ActionHello all, I’ve had a lot going on since my last post. I started a new job, moved to a bigger place, spending more time with my kids and working on several exciting projects involving Magento and Drupal the best open source platforms on the internet. I should hopefully be launching one of them at the end of the month.

During my absence, I’ve learned a lot which I will be sharing with you on this blog.

I’ve also taken the time to reply to all 63 pending comments and answered them as best as I could. So for those of you that have been waiting patiently, I’m sorry :( . Another thing that you’ll notice that’s different, is a redesign to the blog. I think it’s a much cleaner look. Well, enough ranting… This week will follow with a pretty exciting post. Stay tunned!

Best,
Richard

Disallow hotlinking while allowing requests from robots.txt and favicons

We all hate Leechers. Here’s how to stop them in their tracks from stealing your images and your bandwidth!

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !(^/robots\.txt|\.ico)$
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|pdf)$ [F,L]

How to create a sandbox PayPal Payflow account

pay-pal-payflow-pro

I’ve been working with PayPal PayFlow Pro a lot lately. But before I got the hang of it, I couldn’t figure out how to create a sandbox account for Payflow.

As it goes, it’s different than setting up a standard sandbox account. To set up a Payflow account for testing, you would walk through the sign up process as if you were signing up for a live Payflow account. Once you get to the section in the sign up process where it is asking for the billing information, just cancel out of the process. This creates a test account for you at this point, which you can access by signing into PayPal Manager with the login and password that you created. The partner will be PayPal.

Magento – The best Magento Extensions

Here are some of the best Magento extensions that I’ve come across.

  • Magento Live Chat

    This free module will provide LiveChat support in Magento.

  • Fontis WYSIWYG Editor

    This extension gives you the option to enable a JavaScript WYSIWYG editor to specified admin pages. Currently available editors are: TinyMCE and FCKeditor.

  • Lazzymonks Twitter

    Displays Twitter updates in the menu and allows updates from within the admin panel.

  • Events Calendar

    With this extension, you can display an events calendar on your website. Events are stored in the database. You can also display the upcoming list of events quickly by calling a block in your template.

  • Blog

    Full featured blog extension for Magento.

  • Raffle

    This module gives you basic functionality to run your own raffles.

  • Customer Groups Configurable Catalog

    This extension enables you to hide categories and products from customers depending on the customer group.

  • Exploded Menu

    Replaces the standard single column drop down with a multi-column dropdown featuring 2nd and 3rd level menu items.

  • Velite Magento Superstage

    Functionality, intuitive interaction and product presentation with really high detailed images are the main features.

  • Magento EasyLightbox

    This small extension will help to install Lightbox widget. Installation and configuration will take approximately 5 minutes. No files are replaced and no codding experience needed to install!

  • Magento Exploded Menu

    Replaces the standard Magento menu with a multi-column drop down menu system.

Javascript – Passing Multiple Parameters through setTimeout

One of the problems that I’ve faced with Javascript is passing multiple parameters through the setTimeout function. I found this little snippet on the internet a few months ago and would like to share it with you. I don’t know who the original author is so I could not give him/her proper credit. Thanks!

var _st = window.setTimeout;

window.setTimeout = function(fRef, mDelay) { 
	if(typeof fRef == "function") {  
		var argu = Array.prototype.slice.call(arguments,2); 
		var f = (function(){ fRef.apply(null, argu); }); 
		return _st(f, mDelay); 
	} 
	return _st(fRef,mDelay);
}

Define your function to call with setTimeout:

function alertMe(message, name) {
    alert(message + name);
}

Now, just call the function.

var message = 'Hello, ';
var name = 'Richard';
setTimeout(alertMe, 2000, message, name);

Hope this helps someone! :)

  • Page 1 of 2
  • 1
  • 2
  • >