Archive for the ‘Programming’ Category.

Opencart vqmod – Telefonnummer bei Registrierung nicht erforderlich

Anbei ein kleines vqmod file für Opencart 1.5.1.3 (englische und deutsche Sprachdateien) welches die Telefonnumer bei Registrierung als Kunde nicht zwingend erforderlich kennzeichnet.

Normalerweise muß ein Neu-Kunde seine Telefonnummer bei der Registrierung angeben. Dies wird durch dieses vqmod file geändert und der Kunde muß keine Telefonnumer angeben, wenn er sich registriert. Das vqmod file einfach in das Opencart vqmod/xml Verzeichnis kopieren. Wenn was nicht funktioniert, die Datei einfach wieder löschen.

Continue reading ‘Opencart vqmod – Telefonnummer bei Registrierung nicht erforderlich’ »

Develop an OpenCart vqmod to alter the confirm eMail

Hello

[updated 21. dec 2011, see code change]

I had the need to alter the OpenCart (1.5.1.3) order confirmation eMail to include some legal text (german Impressum (company contact) and Wiederrufsbelehrung, Stichwort Abmahnung) and to remove the display of the IP.

To be able to watch and debug my code additions, I had to setup a development system for the OpenCart shop instance:

Continue reading ‘Develop an OpenCart vqmod to alter the confirm eMail’ »

Automated Login for Remote Desktop Mobile II update III

Hello

this is just a note to let you know that “Automated Login for Remote Desktop Mobile II” post has been updated.

Many thanks to Patrik S. for finding out the bugs. Great to see, that some take the code and use it.

Best regards

Josef

KeyWedge: Updated

Hello

at KeyWedge I posted my code that connects to a serial port and then simulates keystrokes into your application.

Now, there were issues where the reconnect did not automatically take place after a Suspend/Resume and you had to invoke the main window and select File-Hide just to let KeyWedge reconnect. This happens on devices that provide the communication port all the time and dont close it during a suspend.

I have added some code to watch the Windows Mobile Power Message Queue for RESUM messages and then do an automatic reconnect. The other option would have been to send some data thru the port periodically to check if it is still working. But this may disturb the attached the device.

The main change is in PowerMsgQueue.cpp. It implements the msg queue to receive power broadcast messages like done in a MSDN example code. If a resume message is encountered, the code sends a WM_USER message to the main window, which will do a SuspendComm/ResumeComm cycle. Very easy.

In PowerMsgQueue.cpp we have code that recognizes the resume:

                case PBT_TRANSITION:
                    nclog(L"Power Notification Message: PBT_TRANSITION\n");
                    //Add2Log(L"Power Notification Message: PBT_TRANSITION\n",TRUE);
                    nclog(L"Flags: %lx\n", ppb->Flags);
                    nclog(L"Length: %d\n", ppb->Length);
                    wsprintf(szPBtype, L"trans.: ");
/*
Flags: 12010000
Length: 6
trans.: ON|PASSWORD|BACKLIGHTON|
*/
                    if(ppb->Flags & 0x12010000)
                    {
                        nclog(L"PwrMsgQueue: got 'ON|PASSWORD|BACKLIGHTON'...\n");
                        //send a message to main window
                        iPost = PostMessage(hwndMain, WM_USER_RESUMECOMM, 0, 0);
                        nclog(L"PostMessage WM_USER_RESUMECOMM returned %i\n", iPost);
                    }
                    break; 

                case PBT_RESUME:
                    nclog(L"Power Notification Message: PBT_RESUME\n");
                    //Add2Log(L"Power Notification Message: PBT_RESUME\n",TRUE);
                    wsprintf(szPBtype, L"resume: ");
                    //send a message to main window
                    iPost = PostMessage(hwndMain, WM_USER_RESUMECOMM, 0, 0);
                    nclog(L"PostMessage WM_USER_RESUMECOMM returned %i\n", iPost);
                    nclog(L"Power: PBT_RESUME\n");
                    break;

To not block the queue, I use PostMessage to inform the main window of the Resume. Here is the simple code block in WndProc of the main window:

Continue reading ‘KeyWedge: Updated’ »