Sunday 29 August 2010

how do I run printhead cleaning program on the HP Deskjet F2200

hp f2200 clean printer head


After buying a printer cartridge for my HP Deskjet F2200 from PrinterBasics on ebay, I found that eventhough the printer reconised the cartridge it would still not print.

The buyer writes this in their help.


What if the printer recongnises the cartridge but won't print?


printerbasics: Try running the printhead cleaning program on these cartridges. This process will clean the heads and also push the ink through and should hopefully resolve this problem for you. We recommend that you do this 3 to 4 times for best results.


The question then is how do we do that?  here's the answer.


 I'm using Microsoft Word to print my documents.  So here's what I needed to do.


in Microsoft Word

>> click on file

>> scroll down and click on print

>> go to the features tab

>> at the bottom find the button 'Printer Services' click on it

>> in the 'device services' tab - go down to 'Clean the Print Cartridge'


>> I need to run this a couple of times to get the print to go through.

Monday 23 August 2010

Virtuemart Related Product problem and hacked solution.

It seems to be a common problem with Virtuemart that when adding or editing products if you go to the 'related products' tab - then use the drop down list to search for the products you wish to add - then you get either nothing or an incomplete list. 

There's a few solutions to try on this post https://forum.virtuemart.net/index.php?topic=42558.msg135503   however none of these worked for me.  As I am on a limited budget for the projects I have quickly knocked together a tool that help me apply all the related products I needed quickly.  with extra time it would be prefferable to intergrate this tool into Joomla itself. If anyone wants to sponsor me to do so then let me know. Otherwise this was a five minute ugly fix ;)  

I have a folder which I used to run batch mysql tasks needed for when I transffered over a store from 'ruby on the rails' - In this folder i have a config.php file in the folder 'includes'  -

in here you'll need to add your details for connection

#################config.php#########################

//Database connection info
$hostname = "localhost";
$username = "mysqlusername";
$password = "mysqlpsswrd";
$dbName = "mysqldatabasename";
MYSQL_CONNECT($hostname, $username, $password) OR DIE("Unable to connect to database");
@mysql_select_db( "$dbName") or die( "Unable to select database");
 

####################################################



then I wrote the following page - that lets me update a product.  

############################add_related_products.php#############################

include ("includes/config.php");

if (isset($_POST['add_related_products']))
{

$product_id = $_POST['product_id'];
$related_products = $_POST['related_id1'];
$related_id2 = $_POST['related_id2'];
$related_id3 = $_POST['related_id3'];
$related_id4 = $_POST['related_id4'];

if ($related_id2 !=NULL) {

$related_products .= '|'.$related_id2;

}

if ($related_id3 !=NULL) {

$related_products .= '|'.$related_id3;

}

if ($related_id4 !=NULL) {

$related_products .= '|'.$related_id4;

}



$sql = "INSERT INTO jos_vm_product_relations (product_id, related_products) VALUES ('$product_id', '$related_products')";

$runsql = mysql_query($sql);



echo 'this sql statement has been run -
'.$sql.'

';


}
else {

echo 'Add related products to another product fill in the following details
<br> <BR>';
echo '
<form method="post" action="'.$_SERVER['PHP_SELF'].'">';
echo '
<input type="hidden" name="add_related_products" value="TRUE">';
echo '
<input type="text" name="product_id" value="product id"<br>';
echo '
<input type="text" name="related_id1" value="related id 1"<br>';
echo '
<input type="text" name="related_id2" value="related id 2"<br>';
echo '
<input type="text" name="related_id3" value="related id 3"<br>';
echo '
<input type="text" name="related_id4" value="related id 4"<br>';
echo '
<input type="submit" value="Submit">
</form>';
}






?>


and it does what i need it to, so i hope this helps someone else. 





Monday 16 August 2010

virtuemart menu goes to wrong category

According to this post http://forum.virtuemart.net/index.php?topic=72696.0  the root of the problem here is known as the "multiple 'Itemid' issue." - in this post it describes this as being a confussion between the menu module of Joomla and virtuemart.  As soon as I read this I knew a quick solution for this would be to just use the URL's off the virtuemart catergory tree module that I'm using and manually put these urls in the menu - applying them as a external link item.

And now all is working fine.  As of yet I am not sure whether this problem may be something that will be a hiderance later.  We'll have to see.


Friday 13 August 2010

Virtuemart product page showing thumbnails fix

I've used a couple of hacks to solve some problems that I was having with the Product display pages in Virtuemart. 

It seems to be the default of Joomla's virtuemart to show thumbnails images on the Product page.  However I wanted to show a larger image at say 350px wide.


Thanks to this post http://forum.virtuemart.net/index.php?action=printpage;topic=21161.0

I found out that the what I needed to change was in

components/com_virtuemart/themes/default/templates/product_details/

and it's the page 'flypage.tpl.php' that needed changing ( i also needed to do flypage-ask.php !!)

find $product_image

and replace it with
< img src="components/com_virtuemart/shop_image/product/%3C?php%20echo%20$product_full_image%20?%3E" width="350px" / >

CLOSE THE GAPS AROUND <  & > thou !!



obviously you can change the width to whatever you wish




virtuemart apply template to all pages

What I need to do is get virtuemart to always display in a set template.

There are actually a couple of ways of doing this. Firstly you could set up a fake menu and list all your pages there. You don't have to set a module for it, meaning it can't actaully be seen from the site. However it would mean you can access all pages when assigning from the 'templates' section.

Another solution that's simpler is to install this plugin.



once installed you can access it from Extensions/plugins then find 'SM2 Component Template'
on the right hand side you need to input
'yourComponent yourTemplateName'
under 'Plugin Parameters' and you're all good to go :)


Thursday 12 August 2010

Joomla Module 'mod_articlebymonths' problem. When clicking on a link I'd get a 404 error.

I have the module 'articlebymonths' installed on my Joomla! installation when clicking on a link in the monthly menu tree I'd get a 404 error. I noticed in URL it was trying to link to a component called 'component/contentbloglist' - this didn't exist in my component folder. So I got it from another installation that I do have 'article by months' working on and hey presto. all works fine :) - if you haven't got another installation and need this folder then contact me and I'll send it over

Tuesday 10 August 2010

Joomla Virtuemart Search problem

after installing Virtuemart it seems I could not search for any products.  I could however search for 1 letter of 2 letters but anything over that return a '0 matches' message.

thanks to this post:
http://forum.virtuemart.net/index.php?topic=62207.30

in the Joomla file libraries/joomla/databse/databse/mysql.phpI found a line which says:
$this->setQuery( "SET sql_mode = 'MYSQL40'" );
(around line 153).
UNDER this line I added:
$this->setQuery( "SET OPTION SQL_BIG_SELECTS=1" );

so it now reads:
$this->setQuery( "SET sql_mode = 'MYSQL40'" );
         $this->setQuery( "SET OPTION SQL_BIG_SELECTS=1" );
         $this->query();