How to embed YouTube Video within the Facebook fbml tabs

This is a how-to article on expanding your Facebook Fan Page (aka Business Page) by using the application Static FBML which allows you to add youtube video to your tabs or box which can incorporate CSS, HTML, Facebook’s flavor of JavaScript, FBJS, and Facebook’s mark-up language FBML. FBML has greatly expanded what is possible on Facebook Pages and, if you’re sufficiently skilled with CSS/HTML and, optionally, FBML, you can make some really fine looking Pages. Basically this not an actual youtube embed that you normally do, you will need to follow the below code to make this work in Facebook. Simply Facebook will first show the image that we have within the code below, and then upon user confirm with a click then play and load the video.
Continue Reading »

How to completely disable Magento module

Disable Magento module? Easy, in admin panel, click the menu “System” -> “Configuration” -> “Advanced” in “Advanced” Section, select “disable” for the module you would like to disable, and it’s finish, right?

Sorry but … NO! If you disable the module in admin panel, it will only disable the module output, not the module functionalities. The Observer, cornjob, setting in config.xml are still in use and running.
Continue Reading »

How to create coupon code for fixed amount discount

In your selling period, sometimes you would like to make offer for promotion or festival. Here I will show you how to create a coupon code between a specific period for all products and customers with unlimited usage.

In admin panel, click the menu “Promotions” -> “Shopping Cart Price Rules”, then the list for all coupon codes for all websites are shown. Clicking “Add New Rule” button on right hand side and input the following:
Continue Reading »

WordPress – Restricting Personal IPs on All in One Adsense and YPN!

This hack is to restrict personal IPs on All in One Adsense and YPN! extension for wordpress. The reason to add this code(hack) in, it’s because alot of the isp are using dynamic ips, or your company may only have a single ip sharing to thousands of employee. This is our current situation, and you don’t know how much your employee “LOVED” you by spam clicking on the links. This will hurt you if google decide that you are spamming on the ads.

First open the file “all-in-one-adsense-and-ypn.php” under wp-content/plugins/all-in-one-adsense-and-ypn/ and search for the following line of code.

global $user_level, $ai_loadnetwork;

above this line of code add the following code in, and change “Y.O.U.RIP”, “YOU.R.SECOND.IP” to your own ips. Use commas for multiple ips.
Continue Reading »

Magento – Hide the price for a free product using jQuery

In the new version it was moved to the /catalog/product/view/type files. There is a separate file for each product type. Inside those file the line: getPriceHtml($_product) ?> is responsible for outputting the price.

But better yet, this tutorial I will show you how to write a simple jQuery script to change all “$0.00″ to “FREE”

First create a new javascript file and name it ds.js and insert the following code as follow.

jQuery(document).ready(function() {
	jQuery("span").each(function(i, e) {
		if ( (jQuery(e).attr('class') == "price") && (jQuery(e).text() == "$0.00") ) {
			jQuery(e).text("FREE");
		}
	})
})

Now create a folder name called js within your folder and save the following file under it. skin/frontend/default/YOURTHEME/js/ds.js

Simply open your page.xml which located
app/design/frontend/default/YOURTHEME/layout/page.xml
and add the following line

<action method="addItem"><type>skin_js</type><name>js/ds.js</name></action>

Be sure that your magento site had jQuery enable.