Sometimes you just need a quick image swapping script so here is one you can use quickly. You could always do this right inline too but why? I want to use the same script over and over and want to be able to place the images anywhere so this is how I do this.
<img src="images/image1.gif" ID="TestID"/>
<script type="text/javascript">
function changeImage(ImageID,ImageFileName)
{
}
</script>
<script type="text/javascript">
function changeImage(ImageID,ImageFileName)
{
document.getElementById(ImageID).src = ImageFileName;
}
</script>
<img src="images/image1.gif" id= "TestID"
onmouseover="changeImage('TestID','images/image2.gif')"
onmouseout="changeImage('TestID','images/image1.gif')" />
That's it. It's a pretty basic function but now you can re-use this all the time for image swapping.
Google Analyticator is a plugin for WordPress that connects your site to your Google Analytics account. Now that Google has also set it up so that you can track a users page speed on your analytics, you should track how fast your connection is for your visitors.

_gaq.push(['_trackPageLoadTime']);
You should now see the added line in your source and you should see the tracking show up in your Google Analytics within a day.
For some products, or all of your products, on a Virtuemart product, you may want to add a comments or notes section to your products in a Textarea. There is no easy way to do this but I have come up with one way to do it. Use the following steps to use this method:
<input type="text" class="inputboxattrib" id="<?php echo $attribute['titlevar'] ?>_field" size="30" name="<?php echo $attribute['titlevar'].$attribute['product_id'] ?>" />
<textarea type="text" class="inputboxattrib" rows="5" id="<?php echo $attribute['titlevar'] ?>_field" cols="45" name="<?php echo $attribute['titlevar'].$attribute['product_id'] ?>" style="margin-left: 5px; margin-bottom: 10px;"> </textarea>
There really isn't much difference to make this work. Now if you want to make this work with multiple types of inputs you will need to make more adjustments to this file with some if or select statements. Let's say you want to have a custom attribute called Burgers that will be a checkbox and every other type of custom attribute is going to be a textarea, you would do something that looks similar to the following:
foreach( $attribute as $attr => $val )
{
// Using this we make all the variables available in the template
// translated example: $this->set( 'product_name', $product_name );
$this->set( $attr, $val );
}
if ($attribute[title]=="Burger")
{
?>
<div style="width: 400px; margin: 0 auto; padding-left :5px;">
<div style='float: left; width: 140px; text-align: right; padding-right: 5px; vertical-align: middle;'><?php echo $attribute['title'] ?>: </div>
<div style='float: left; width: 40px;'>
<input type="checkbox" class="inputboxattrib" id="<?php echo $attribute['titlevar'] ?>_field" size="30" name="<?php echo $attribute['titlevar'].$attribute['product_id'] ?>" />
</div>
<?php
}
else
{
?> <div style='float: left; width: 140px; text-align: right; padding-right: 5px;'><?php echo $attribute['title'] ?>: </div>
<div style='float: right; width: 40px;'>
<input type="checkbox" class="inputboxattrib" id="<?php echo $attribute['titlevar'] ?>_field" size="30" name="<?php echo $attribute['titlevar'].$attribute['product_id'] ?>" />
</div>
<?php
}
Burger; Notes; Comments;
In this example Notes and Comments will be Textarea's and Burger will be a checkbox.