Virtuemart product pictures size

Forgot to create thumbnails of your product pictures?

Change:

define(‘PSHOP_IMG_RESIZE_ENABLE’, ”);

To:

define(‘PSHOP_IMG_RESIZE_ENABLE’, ’1′);

In file: /administrator/components/com_virtuemart/virtuemart.cfg.php

And all your pictures are resized in the view.

Posted in Webshop | Tagged , , , , , | Leave a comment

Outlook signature ActiveX Error

When Outlook gives you a activex security error when opening a new email try this:

Reset the restricted access websites in IE to the default.

http://forums.windowsitpro.com/web/forum/messageview.aspx?catid=40&threadid=45944&enterthread=y

Posted in Windows | Tagged , , , , | Leave a comment

AVI to DVD convert Open source!

Check out this very nice app. It was the only one, who converted my avi correctly without any errors.

Also it’s optimized for dual or quad cores!

http://www.dvdflick.net/

Freeware, open source

Posted in Tools, Uncategorized | Tagged , , , , , | 2 Comments

Windows and Office serials recovery

Ever tried to make a good list of all Windows and Office license keys on your network computers?

This can be a h*ll of a job.

Try this app to recovery every Windows and Office serials from the PC’s on your network. (You need domain admin rights).

http://www.nirsoft.net/utils/product_cd_key_viewer.html

Open the app in the command prompt (cmd) with the parameters for scanning the whole network.

Takes a little time, but works perfect!

Posted in Tools | Tagged , , , , | Leave a comment

PERL input and output files

To read an input file, edit your data and put it to an output file try this:

#! /usr/bin/perl -w

use strict;

my $file = “in.csv”;
my $outfile = “out.csv”;

open(IN, “<$file”) or die “Could not open $file\n”;
open(OUT, “>$outfile”) or die “Could not open $outfile\n”;

while (<IN>)
{
chomp;
my @line = split(“,”); # this char is the separation sign.

# Your data will now be in a array called line[ ].

# Do whatever you want, access the data with the varable $line[FIELDNUMBER]
# Example: $line[3] = ‘blablbla’ #edit the 4th value from the input file.

print OUT “$line[0],$line[3],$line[2]“\n”; # write back to output file
}
# close the both files (importend! else the writing will not take place due caching!)
close(IN);
close(OUT);

Posted in Programming | Tagged , , , , , , | Leave a comment

PERL connect to SQL server

To connect you PERL application to an SQL server is pretty easy.

First you need the driver for supporting SQL connections.

Install driver:

  1. Open command prompt
  2. Typ: ppm install DBD-mysql

After a correct installation of the driver your SQL connection can be made as follow:

#!/usr/local/bin/perl
print "Content-type:text/html\n\n";
use DBI;
$username = '';
$password = '';
$database = '';
$hostname = '';
$dbh = DBI->connect("dbi:mysql:database=$database;" .
 "host=$hostname;port=3306", $username, $password);

This is all you need to connect to your server.
If you don’t know your server ip, try connecting to your website address.

A very good website about this subject is:
http://www.codeproject.com/KB/perl/perldbi.aspx

Posted in Programming | Tagged , , , | 1 Comment

TNT zone shipping module in Joomla Virtuemart

After lots and lots of googling i couldn’t find any shipping module for Virtuemart that was suiteble for our situation.

There is some kind of module for TNT but its for TGP Post and I didn’t get it working.

So there is no other option then write a module myself.

The first steps:

(1) Shipping Zone importing

I’ve imported all country zone codes by downloading the zone PDF from TNT, copied the in Excel and wrote a PERL script for the importing.

To make it more simple to you just download the SQL file here and just run the code in phpmyadmin.

It will update zone information (zone_id) for all countries in the jos_vm_country table.

If you prefer just international country codes with shipping zone information find it here. (same data, other format)

Beware this zone data is only from the Dutch point of view ;-) This will be different for your country!

(2) Writing the module itself:

The problem is, there is a default Zone Shipping module in Virtuemart, but here in the Netherlands the shipping costs are calculated different.

For example, in the default module you can ship a product sized 30cm * 30cm * 30cm with the weight of 50 Kg for just the zone price. There’s no difference in shipping a very large/small/heavy package. Only the destination matters.

TNT caculates the weight and the volume weight. You pay the highest value.

Weight is just the weight in Kilogram.

Volume weight is the size of the package length*width*hight / 6000.

Source: http://members.ziggo.nl/mfleur/maten.html

I’m writing the PHP code for the shipping module at the moment, so hold on a week or two.

Update 19 november 2008:

I had success with writing the module. There is a working alpha version. My deadline is 31 december 2008, so working hard to make this happen. I will make it more configurable, some parameters are hardcoded at the moment.

Update 9 january 2009:

I can report the shipping module is working fine :-) It still has the be tested some more, but it working.
There is one practical problem I”m facing, the volume weight calculation.

When you have some products, you can calulate their volume. But not in witch box they will fit.

At the moment i’m tweaking this calculation for the most optimal box.

If someone has a good solution for this, please write a comment below :-)

Update 14 Juni

Thanks all for waiting! :-) I can report this module is working fine in production now. At the moment i’m VERY busy with school (tomorrow I’ll have my final exam!).

Within a short time I’ll set the code online for testing. Anyone interested in this testing?

Posted in At the office, Programming, Webshop | Tagged , , , , , , , , , , , | 29 Comments

Unable to install DVD/CD Driver Windows

If your having problems installing your DVD or CD drive check this instructions:

Check in “Device Manager” if your drive is shown with a “yellow !”. If not, this is no solution for you.

Solution for following errors:

Error message 1

The device is not working properly because Windows cannot load the drivers required for this device (Code 31).

Error message 2

A driver for this device was not required, and has been disabled (Code 32 or Code 31).

Error message 3

Your registry might be corrupted. (Code 19)
You receive an “error code 39″ error message.
A message that resembles the following appears in the notification area:

Windows successfully loaded the device driver for this hardware but cannot find the hardware device. (Code 41)

Step 1: Start Registry Editor

Start Registry Editor.

Step 2: Delete the UpperFilters registry entry

1. In Registry Editor, expand My Computer, and then expand HKEY_LOCAL_MACHINE.
2. Expand SYSTEM, and then expand CurrentControlSet.
3. Expand Control, and then expand Class.
4. Under Class, click {4D36E965-E325-11CE-BFC1-08002BE10318}.
5. In the details pane of Registry Editor, on the right side, click UpperFilters.

Note You may also see an UpperFilters.bak registry entry. You do not have to remove that entry. Click UpperFilters only.

If you see the UpperFilters registry entry in the details pane of Registry Editor, go to step 6.
If you do not see the UpperFilters registry entry, you still might have to remove the LowerFilters registry entry. To do this, go to “Step 3: Delete the LowerFilters registry entry.”
6. On the Edit menu, click Delete.
7. Click Yes when you receive the following message:

Are you sure you want to delete this value?

The UpperFilters registry entry is removed.

Step 3: Delete the LowerFilters registry entry

1. In the details pane of Registry Editor, on the right side, click LowerFilters.

Note You might see a LowerFilters.bak registry entry. You do not have to remove that entry. Click LowerFilters only.

If you do not see the LowerFilters registry entry, unfortunately this content is unable to help you any more. Go to the “Next Steps” section for information about how you can find more solutions or more help on the Microsoft Web site.

2. On the Edit menu, click Delete.
3. Click Yes when you receive the following message:

Are you sure you want to delete this value?

The LowerFilters registry entry is removed.

4. Exit Registry Editor.

Step 4: Restart your computer

Source:

http://support.microsoft.com/kb/314060

Posted in Windows | Tagged , , , , , , , , | 1 Comment

Webbased Kaminsky DNS Exploit Check

Maybe you heart about the “new” DNS exploit found by Mr. Kaminsky.

Basics:

  • Your surfing to your bank website.
  • Your computer checks where it can find www.nicebank.com
  • If your router doesn’t know, it will ask the ISP DNS server.
  • This response from your ISP DNS can be tricked.
  • Your not going to the real www.nicebank.com, but to a faked website that logs your password.
  • You will NEVER know, unless your money is gone.

It’s kinda more technical then explained here. If your interested in the technical details there is enough on the Internet. I like this powerpoint about it.

More imported for most people is to make sure the DNS they are using is not vulnerable anymore (yes ALL DNS Servers where!).

Although there is a patch, but this isn’t a real solution for the problem, it makes the exploit ALOT harder. But in theory its still exploitable. The only real solution is to use DNSsec. But this is not something you can install yourself (if you don’t want to run your own DNS server at home).

Check on this website if your using a save DNS server.

https://www.dns-oarc.net/oarc/services/dnsentropy

Posted in Security | Tagged , , , , , , , , | Leave a comment

Multiple mouse cursors on a Windows Desktop

Ever thought of two mouse cursors at the same time? After googling I found a SDK from Microsoft, to make multi mouse available WITHIN your own application. I was wondering if this can be done system width.

The answer is YES!

There’s an open source project named CPNMouse (kinda outdated, last update was in 2004) but it works!

Download the custom driver (make sure you have the binary) from this website.

Select your mouse in device manager, and update the driver to the downloaded on. Instructions

If windows tells you there is no supported hardware in this driver follow these instructions (easy to fix!):

Windows 2000/XP/2003
  1. Open Start -> Programs -> Accessories -> System Tools -> System Information. If this is not available on your computer, you may also be able to use BusHound to obtain the information.
  2. In this program select Components -> Input -> Pointing Devices
  3. The information in under PNP Device Id is what you need. It is in the form USB\VID_XXXX&PID_YYYY\<something>
  4. You need the numbers XXXX and YYYY
  5. You must add a line to cpnmouse.inf. The line is “%CPNGroup.DeviceDesc1% = usbinst, HID\VID_XXXX&PID_YYYY“, where XXXX and YYYY are the numbers found earlier. You should add the line just after the other lines looking just like it
  6. If you send the numbers to me, I will add them to the distribution

After you successfully installed this driver (on both mouses!) download and run the ordinary-binary application. This starts two mouse pointers witch can move separated.

It works, but the scroll function is lost (after the application is starts, not by installing the driver).

Try it yourself ;-)

PS: It’s working on Windows XP SP3

Extra link:

Funny little multi mouse game:

http://www.nekogames.jp/mt/2008/01/cursor10.html

Posted in Tools, Windows | Tagged , , , , , | 30 Comments