Magento: Problem with DIBS module

Using the DIBS module (from Magento connect); we had the “slight” problem that if the order was payed using the test visa card (from DIBS 10 steps) viewing the order was not possible.
The page only partially rendered but most of it was not shown.

We “fixed” this by adding two things to app/code/local/Mage/Adminhtml/Block/Sales/Order/View/Tab/Info.php

We figured out the problem lied in the “switch($paytype)” statement in the “function printLogo($paytype)”

We started by editing the “default:” statement to read

$res = 'no image for ' . $paytype;

instead of the old statement of

$res = '<img src="' . $paytype;

was what broke the page rendering as that img tag was not ended.

We also added an extra case for the card that didn’t exist in the old switch:

case 'VISA,V-DK':  {
                $res = '<img alt="" />getSkinUrl('images/dibs/visa.gif') . '" border="0" />';  break;
            }

Magento: Adding tax (Swedish moms for example)

There is 4 momsclasses in Sweden (25%, 12%, 6% and 0%).

Under Sales-Tax-Manage tax zones & rates:

Create one rule per momsclass for Sweden with * as region and * as Zip.

Create one rule for customers.

Create one rules per momsclass for products.

Create one Tax rule for each momsclass.

Make sure that the products in the catalog have tax set (if there are product in the catalog).

Under System-Config-Tax make the appropriate settings. (defines if the prices are including or excluding tax, if tax should be added on shipping or not etc)

DSN 5.0.0 – Service Unavaliable

Ran into this error today on a server. Some mails got through but some was not getting through.

Check that /etc/hosts has a FQDN (fully qualified domain name).

Also check the size of the mails being sent, in my case the issue was that mail was to large for the receiving server thus this error message was produced at the sender.

unqualified host name ([something]) unknow; sleeping for retry

sendmail expects to the machine to have a FQDN (fully qualified domain name).

If it does not have that (type “hostname” to check what name the machine has) sendmail will complain about this and take a loot of extra time trying to find it.

To use a FQDN edit “/etc/hosts” and change [something] to [something.yourdomain.com] and this will go away. Updating “/etc/hostname” at the same time might be a good idea; don’t forget to run “/bin/hostname -F /etc/hostname” after updating /etc/hostname.

sudo: no tty present and no askpass program specified

This error message will occur if sudo is not able to ask for the password (no tty is present) (like for instance when trying to sudo rsync).

One solution to this is to add the line “Defaults visiblepw” to the /etc/sudoers file.

[Todd C. Miller Todd.Miller at courtesan.com said on sudo-users: Recent versions of sudo will refuse to prompt for a password if no tty is present, since it is not possible to turn off echo in this case. You can restore the old behavior with a line like above]

Adding piwik to GetBoo

In order to add Piwik analytics tracking code to a GetBoo installation two files needs to be updated.

“footer.php” and “publicfooter.php”.

Just copy&paste the code from piwik to the end of these two files (just above the </body> tag)

IIS/ASP.NET turning (browser) debug messages off

To make this change for one project at a time:

In  “Web.config”find the line saying “compilation debug=true” and switch this to false.

To make this change for the entire server:

In “%SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG\Machine.config” find the line saying “compilation debug=true” and switch this to false.

More info on this from Microsoft:http://support.microsoft.com/kb/815157

Synergy – Problem with international chars (keys)

When using synergy and a non us keyboard layout there is sometimes problems with the chars not being sent correctly (chars that are not on the us layout or in a different location).

I know that others have this problem as well, but the solution that I have found to work for me – so far – is very simple.

Just using force reconnect from the server makes this problem go away 😉

Attaching BOINC to a manager (without the gui)

Go into the directory with all the files created by BOINC (in Debian: /var/lib/boinc-client)

Use the boinccmd command to attach to the manager

boinccmd --join_acct_mgr [URL] [name] [passwd]

And for (boincstats) bam the url is bam.boincstats.com

Hint in the BOINC directory there is a file called stdoute.log – this is a log so tailing this file while doing this might be a good idea 😉