Fatal error: Cannot re-assign $this in \home\xxxx\www\admin\includes\classes\upload.php on line 31
Usually You getting below erorr on PHP 5.xx
Fatal error: Cannot re-assign $this in \home\xxxx\www\admin\includes\classes\upload.php on line 31
How to fix?
Open file: admin\includes\classes\upload.php
on line 31
find:
$this = null;
replace with:
unset($this);
Done!
Posted by admin
26.Feb.08
Bug Fixes
Read more
Comments (0)
TinyMCE WYSIWYG editor in oscommerce
TinyMCE WYSIWYG HTML EDITOR
http://addons.oscommerce.com/info/4563
This contribution is an extremly easy mod that turns any TEXTAREA into a full flegged WYSIWYG HTML EDITOR.
Best of all, its compatible with FireFox!
None of the other HTML editors would work with FireFox. I use Firefox religiously and have seen a few requests in the forums for this mod so I set out to do it myself
This contrib can be used in product description, newsletters, emails or any other page in admin that uses a TEXTAREA field
The editor is fully configurable to include the features you want, or exclude the feature you will not use. Its also Themeable!
By default WYSIWYG editor will be applied to all found textareas on page.
To exclude textarea and show it without WYSIWYG editor just add class=”mceNoEditor” to textarea params.
Thats all.
Posted by admin
11.Feb.08
Tips and Tricks
Read more
Comments (0)
Credit Class & Gift Voucher 5.19 and osCommerce rc1 bug
I’m using oscommerce rc1 and found bug on checkout_payment.php page.
You have to redeem your coupon twice to make it working.
When you trying redeem coupon first time you get error like this:
The coupon has been successfully applied for
***HOWEVER:No reducion available, please see the coupon restrictions***
but when you trying enter this coupon second time - coupon applying successfully and you see below message:
The coupon has been successfully applied for $xx
To fix this bug you have to edit file catalog/includes/modules/order_total/ot_coupon.php
at line ~130 find:
if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id'); $cc_id = $coupon_result['coupon_id'];
replace with:
$cc_id = $coupon_result['coupon_id']; tep_session_register('cc_id');
Thats all
Posted by admin
11.Feb.08
Bug Fixes
Read more
Comments (0)
Ultimate SEO URLs page navigation bug
On product result page, navigation links not working after Ultimate SEO URLs installed. We found solution to fix this bug. See below:
file:\includes\classes\seo.class.php
line : 1064 to1073
function requested_page()
{
$protocol = ((int) $_SERVER[’SERVER_PORT’] === 443)? ‘https://’ : ‘http://’;
$current_page = $protocol . $_SERVER[’HTTP_HOST’] . ((!empty($_SERVER[’REQUEST_URI’]))? $_SERVER[’REQUEST_URI’] : ”);
$current_page = substr($current_page, strlen(HTTP_SERVER));
if (($pos = strpos($current_page, “?osCsid”)) !== FALSE)
$current_page = substr($current_page, 0, $pos).’<br>’;
if ($current_page[0] == “/”)
$current_page = substr($current_page, 1);
Changed return $current_page;
to:
return $return;
Posted by admin
10.Feb.08
Bug Fixes
Read more
Comments (0)
osCommerce 2.2 rc1 mysql_insert_id() problem
As we noticed, osCommerce 2.2 rc1 don’t working properly on MySQL 5.xx. We are getting error:
Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in xxxxxxxxxxxxxxxxx/catalog/admin/includes/functions/database.php on line 1171064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' '', 0, 0, '1')' at line 1insert into phesis_poll_data (pollid,optiontext,optioncount,voteid, language_id) values (, '', 0, 0, '1') [TEP STOP]
To fix this error, try find:
$insert_id = tep_db_insert_id($query);
and change to:
$insert_id = tep_db_insert_id();
Webmaster
http://www.oscommerce-packages.com
Posted by admin
04.Feb.08
Bug Fixes
Read more
Comments (0)
Header Tags Controller bug fix
Warning: chmod() [function.chmod]: Operation not permitted in
/home/public_html/admin/includes/functions/header_tags.php on line 254
Cannot change the mode of file (/home/public_html/includes/languages/english/header_tags.php)
How to fix?
To allow the admin section to access the files just installed, the permissions for thefollowing files should be set to 755 (777 on some hosts).The best way to be sure what the correct setting is, is to check those on the images directory and set the ones for Header Tags to match those. If the settings on the images directory and the Header Tags files aredifferent, a warning will appear in admin->Header Tags about permissions not being correct.
catalog/includes/header_tags.phpcatalog/includes/languages/english/header_tags.php
And off course and other header_tags.php created for other languages if they exist:
catalog/includes/languages/<language>/header_tags.php
Contribution page: http://www.oscommerce.com/community/contributions,207
Posted by admin
15.Jan.08
Bug Fixes
Read more
Comments (0)
Security issue in logoff.php
There is a failure in a system exit osc which allows the person to click the return button on a browser and to reboot last page with the expired term., which could be something private as page of details of the accounting record or something. They can see, that people consider the information etc.
Value by default osc logoff.php only requires a small part of the code added to destroy and readdress / freshen page of an exit from system once so that if the return button is pressed, the page of an exit from system remained blocked in a loop and has not come back to any previous caching page histories.
In catalog/logoff.php about top FIND:
include(' includes/application_top.php ');
ONLY BELOW it ADD this code:
// BEGIN LOGOFF BACK BUTTON SECURITY FIX
// Do not let the customer use back button or refresh to go back after logoff
if (tep_session_is_registered('customer_id')) {
//$navigation->set_snapshot();
tep_session_destroy(); // disabled above line and changed to destroy so cannot hit back button and see potentially private info
tep_redirect(tep_href_link(FILENAME_LOGOFF, '', 'SSL')); // changed to FILENAME_LOGOFF instead of FILENAME_DEFAULT ... lock in loop
}
// END LOGOFF BACK BUTTON SECURITY FIX
Now, if say, that someone leaves their browser opened, and someone else comes and amazes the return button to Spy!… Irrespective of, how many times they click it…, the Page of the Exit from system only freshens itself beacuse, the session is for a long time destroyed, and the page speaks to itself not to do something, but to freshen or allow them to move ahead somewhere in other place.
Posted by admin
30.Dec.07
Security tips
Read more
Comments (0)
How to add a Master Password?
A master password can be created that, in the event a customer looses their password and the store owner has the customer’s email address the store owner can login to the customer’s account with a master password and have a new password sent to the customer.
In login.php find about line 35 is the code to change. Replace:
if (!tep_validate_password($_POST['password'], $Qcheck->value('customers_password'))) {
$error = true;
} else {
With:
$passwordgood = tep_validate_password($_POST['password'], $Qcheck->value('customers_password'));if ($password == "somepass" || $password == "somepass2") {
$passwordgood = 1;
} else {
$passwordgood = $passwordgood;
} if (!$passwordgood) {
$error = true;
} else {
Change "somepass" and "somepass2" to passwords you want to use. This will provide two different passwords that can be a Master Password.Now, the store owner is able to login to the customer's account using the Master Password.
Posted by admin
25.Dec.07
Tips and Tricks
Read more
Comments (0)
Ultimate SEO URLs bug fix
This is not for everybody.
But if you’re getting URL’s for your categories like this:
http;//www.yoursite.com/-c-2.html
instead of:
http://www.yoursite.com/categoryname_keyword-c-2.html
Then your version of mysql needs a new seo.class.php.
Just upload it to your (catalog)/includes/classes/ folder and your categories names will again appear!
This file contains only the seo.class.php file, and nothing else, so this is not the complete contribution — this fix only for those who had the problem mentioned above.
Find
$sql = "SELECT cd.categories_seo_url, c.categories_id, c.parent_id, cd.categories_name as cName,
cd2.categories_name as pName
FROM ".TABLE_CATEGORIES." c,
".TABLE_CATEGORIES_DESCRIPTION." cd
LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2
ON c.parent_id=cd2.categories_id AND
cd2.language_id='".(int)$this->languages_id."'
WHERE c.categories_id='".(int)$single_cID."'
AND cd.categories_id='".(int)$single_cID."'
AND cd.language_id='".(int)$this->languages_id."'
LIMIT 1";
Change it to:
$sql = "SELECT cd.categories_seo_url, c.categories_id, c.parent_id, cd.categories_name AS cName, cd2.categories_name AS pName
FROM ".TABLE_CATEGORIES." c
INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd ON cd.categories_id = '".(int)$single_cID."'
AND cd.language_id='".(int)$this->languages_id."'
LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2 ON c.parent_id = cd2.categories_id
AND cd2.language_id = '".(int)$this->languages_id."'
WHERE c.categories_id = '".(int)$single_cID."'
LIMIT 1";
Admin
http://www.oscommerce-packages.com
Posted by admin
13.Dec.07
Bug Fixes
Read more
Comments (0)
AJAX Attribute Manager bug
Another bug
Fatal error: Cannot redeclare class amdb in z:/home/localhost/www/adminattributeManager/classes/amDB.class.php on line 18
How to fix?
Open file admin/attributeManager/attributeManager.php
Find :
// db wrapper
require_once(’classes/amDB.class.php’);
// session functions
require_once(’includes/attributeManagerSessionFunctions.inc.php’);
replace to:
// db wrapper
if(class_exists(”amDB”))require_once(’classes/amDB.class.php’);
// session functions
if(function_exists(”amSessionUnregister”))
require_once(’includes/attributeManagerSessionFunctions.inc.php’);
Thats all
Contribution page: http://www.oscommerce.com/community/contributions,4063

















