How to develop a new set of all button images in another language
In Zencart, if you want to change the design of the button images, you’ll find them in the directory:
includes\templates\template_default\buttons\english\.
If you purchase or download a free zencart template on the internet, you will find them in the directory of your purchased template. Unlike other system, these images are not located under “images” directory. The reason for this setup is that it’s easier for multiple languages can be developed in the future. For example, if you want to add a set of button images in Japanese or Italian, you will just add another directory called “japanese” in parallel with the “english” directory.
In many old ZenCart versions, you’ll find button images in the image folder which can only support English. That’s why I recommend all ZenCart user to upgrade their shopping cart to the latest version or at least a higher version so that it can adapt to the new changes of the IT industry.
Problems with Paypal Express in zen cart
We’ve got a few phone calls lately about the issue with PayPal Express. The issue is that when customer clicks on Paypal Express button, it display many lines of warning instead of taking them directly to Paypal page.
The errors:
| Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home2/crowscom/public_html/includes/modules/payment/paypalwpp.php on line 1467
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home2/crowscom/public_html/includes/modules/payment/paypalwpp.php on line 1467 Warning: Cannot modify header information – headers already sent by (output started at /home2/crowscom/public_html/includes/modules/payment/paypalwpp.php:1467) in /home2/crowscom/public_html/includes/modules/payment/paypalwpp.php on line 1492 Warning: Cannot modify header information – headers already sent by (output started at /home2/crowscom/public_html/includes/modules/payment/paypalwpp.php:1467) in /home2/crowscom/public_html/includes/functions/functions_general.php on line 44 |
There’ll be multiple steps to get this fixed. You need to fix the file in the root called “ipn_main_handler.php”. Then in the Modules, you need to repair/add codes in the Payment module. There’re a few files involved such as paypal.php, paypalwpp.php. Then inside this folder includes\modules\payment\paypal, you’ll need to modify these files below. Even though, there’re some minor changes but if you don’t do it, errors still exist.
– ipn_application_top.php
– paypal_admin_notification.php
– paypal_curl.php
– paypal_functions.php
– paypalwpp_admin_notification.php
– tpl_ec_button.php
Then next, in the language pack, select your store’s language (English/Portugese/Japanese…), then select modules/payment folder, modify this file paypalwpp.php. You’re done! Errors should disappear and the Paypal Express button should take your customers directly to Paypal page.
How to insert an image to MySql database with php
A BLOB is a binary large object that can hold a variable amount of data. There’re 4 datatypes that you can select for a blob field, depending how much storage of an image you’ll need.
TINYBLOB
A binary large object column with a maximum length of 255 (2^8 – 1) characters.
BLOB
A binary large object column with a maximum length of 65535 (2^16 – 1) characters.
MEDIUMBLOB
A binary large object column with a maximum length of 16777215 (2^24 – 1) characters.
LONGBLOB
A binary large object column with a maximum length of 4294967295 (2^32 – 1) characters.
This is the table that holds an image as a blob. You must select Blob datatype for the field ‘blob_img’
| field | type |
| id(5) | unsigned |
| blob_img | blob |
| text | text |
Now, on your php page (ex. insert.php), use this query to insert a real image to blob_img field in your table.
$file = file_get_contents('C:\Documents and Settings\Desktop\images\app_license_images.jpg');
$sql_query = 'insert into test.blob_tbl (blob_img, text) values($file, 'testing text here')';
How to set clean URL in Joomla
The Clean URL setting in Joomla only works on Linux Server. If your hosting server is Windows, you’re not able to do this.

Using base64 to encode your data
Recently, I have got a project that requires a Web Service to transport data back and forth between an Android application and Linux server. As you know, Android also supports JSON to transfer data and communicate with a web service that way. So, we decided to use base64 as a middle man to save and retrieve data. The design point is that a user can upload data and pictures from an Android to the database in cloud. Then later on, data can be retrieved using a web-based application.
This base64 encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies. Base64-encoded data takes about 33% more space than the original data. There’s a give and take for using base64 here. The pros is base64 string is pretty small and it protects your data if there’s special characters exist. The cons is that during the retrieving data, if 1 character missing in the base64 encoded string, you can’t read the entire data set.
How to encode your data:
string base64_encode ( string $your_data )
$your_data variable can be mixed data including arrays, text, string, numeric,... VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==
The encoded string can be as simple as this
How to retrieve your data from a base64 encoded string:string base64_decode ( string
$your_encoded_data [, bool $strict = false ] )
$strick returns FALSE if input contains character from outside the base64 alphabet.