Joomla-JoomFish: How to fix Joom!Fish saving language configuration error, unknown column ‘l.ordering’ in ‘order clause’

When I go for language activation to the JoomFish language manager, I get this error when trying to activate default language:

An error occured while saving your languages

Also in the language configuration see the following error:

Unknown column 'l.ordering' in 'order clause' SQL=SELECT l.* FROM jos_languages AS l ORDER BY l.ordering
Warning: Invalid argument supplied for foreach() in www/administrator/components/com_joomfish/models/languages.php on line 188


SSH: How to Fix Permissions on Files and Directories?

Here are the SSH commands to fix your permissions on a mass level:

    find ~/public_html -type d -exec chmod 755 {} \;

    find ~/public_html -type f -exec chmod 644 {} \;

Basically, the format is to find, or look, in the path of ~(which means home) and then in public_html. (If you want to look in a different directory, you can change this. e.g. ~/public_html/myblog) And then it looks for the document type, be it directory (d) or file (f), and executes the chmod(change mode) command to change the permissions on all results.

Magento: Replace Price Difference with Actual Price in Magento Configurable Product Options

This is performed by javascript. You need to modify the method getOptionLabel in js/varien/configurable.js (this is Magento, your milage may vary depending on the version you’re using).

This method receives the option and the price difference to be applied. If you want to just show the absolute price of the different options, you need to calculate them yourself, using the absolute base value of the configurable product and the absolute difference of the option.

Magento: Rating showing twice on product pages

We came across an issue recently, where the customer’s product pages review section was showing the rating stars twice. We tried to locate the issue, but nothing seemed to work. Finally found out the fix .

Just goto the phpmyadmin and run this SQL query,

TRUNCATE  `rating_option_vote` ;
TRUNCATE  `rating_option_vote_aggregated` ;

jQuery: Append a CSS class to any item or last item

<script type="text/javascript">
	jQuery("p:last").addClass(" last");

It’s important to note that this method does not replace a class. It simply adds the class, appending it to any which may already be assigned to the elements.

More than one class may be added at a time, separated by a space, to the set of matched elements, like so:

$("p").addClass("myClass yourClass");


Magento: How to remove discount coupon code?

Magento offers a built in coupon code feature to provide shopping cart customers with discounts when shopping on their ecommerce website. You can post discount codes in emails, blogs and social networks to generate more traffic and entice paying customers to your ecommerce website. But often, website owners don’t want to offer discount codes on their shopping cart. Fortunately for ecommerce web designers, it is quite easy to disable the discount coupon code function on a Magento shopping cart website.

Magento: How to remove Estimate Shipping and Tax?

Magento offers a built in Estimate Shipping and Tax feature to provide shopping cart customers with realtime feedback of tax and shipping estimation when shopping on an ecommerce website. But often, website owners don’t want to display the Estimate Shipping and Tax function on their shopping cart website. For example, some shopping cart website owners will offer free shipping or flat rate shipping, which makes shipping estimation irrelevant, not to mention confusing and distracting to ecommerce customers. Fortunately for ecommerce web designers, it is quite easy to disable the Estimate Shipping and Tax function on a Magento shopping cart website.

JavaScript: How to change text value in an input box?

<form name='yourForm' action="">
     <input type='text' name='yourinput' id='yourinput' value='Hello World'>

<script type="text/javascript"> 
// Assign the value to the input with the id passed in 
function replaceInputValue( idRef, val ) { 
	// Make sure browser supports getElementById  
	if(!document.getElementById ) return; 
	// Find the input by it's id 
	var inputObj = document.getElementById( idRef ); 
	if( inputObj ) { 
	// Update the value 
	inputObj.value = val; 
replaceInputValue( 'yourinput', 'Hello Dolly' );

PHP: Downloading a Remote File With cURL and PHP

    $url  = '';
    $path = '/path/to/';
    $fp = fopen($path, 'w');
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_FILE, $fp);
    $data = curl_exec($ch);

Magento: How to dynamically get product image URL and page title on Facebook when sharing a product?

Add thew following code just before the tag

 <?php if (Mage::registry('current_product')) : ?>
<meta property="og:image" content="<?php echo Mage::helper('catalog/image')->init(Mage::registry('current_product'), 'small_image')->resize(100,100);?>" />
<meta property="og:title" content="<?php echo Mage::registry('current_product')->getName();?>" /> 
<?php endif;?>