olive12b
Pioneers-
Posts
37 -
Joined
-
Last visited
Profile Information
-
Real Name
J
olive12b's Achievements
-
Protect your site via htaccess - support
olive12b replied to blurredreality's topic in General Add-Ons Support
Thanks Jim. Do you mean the "HTTP Server"? If so, it states "Microsoft-IIS/6.0". If not on Apache, what can I do to ban IP addresses from a particular country? Thanks. -
Protect your site via htaccess - support
olive12b replied to blurredreality's topic in General Add-Ons Support
I just want to have this part in my htaccess file, which is to ban ip numbers from Singapore. After putting in the DENY FROM .... <ip numbers from Singapore>, and testing it, it still does not work. I even put in my own ip address to test, and I can still access the website. Please advise. Thanks. -
[Contribution] Additional Images Module
olive12b replied to Parikesit's topic in General Add-Ons Support
thanks... and now this error... hope i'm inching closer to installing this module successfully... at ...../catalog/admin browser screen, i get this error: Warning: Unexpected character in input: '\' (ASCII=92) state=1 in ....\catalog\admin\includes\functions\general.php on line 1499 Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in ....\catalog\admin\includes\functions\general.php on line 1499 Lines 1499 to 1509 are: if ($image_subdirectory == '/' || $image_subdirectory == '\') { $image_subdirectory = ''; } // in case the user mistakenly entered only a single / if ($image_subdirectory != '') { $image_subdirectory = preg_replace('/\/', '/', $image_subdirectory); // in case back-slashes used, flip 'em around $image_subdirectory = preg_replace('///+/', '/', $image_subdirectory); // change any multiple slashes to a single / if (strpos($image_subdirectory, '/') === 0) { $image_subdirectory = substr($image_subdirectory, 1); // strip any leading slash } if (substr($image_subdirectory, -1, 1) == '/') { $image_subdirectory = substr($image_subdirectory, 0, -1); // strip any trailing slash } $dirs = explode('/',$image_subdirectory); what do i amend now? pls help... -
[Contribution] Additional Images Module
olive12b replied to Parikesit's topic in General Add-Ons Support
thanks... and now this error... hope i'm inching closer to installing this module successfully... at ...../catalog/admin browser screen, i get this error: if ($image_subdirectory == '/' || $image_subdirectory == '\') { $image_subdirectory = ''; } // in case the user mistakenly entered only a single / if ($image_subdirectory != '') { $image_subdirectory = preg_replace('/\/', '/', $image_subdirectory); // in case back-slashes used, flip 'em around $image_subdirectory = preg_replace('///+/', '/', $image_subdirectory); // change any multiple slashes to a single / if (strpos($image_subdirectory, '/') === 0) { $image_subdirectory = substr($image_subdirectory, 1); // strip any leading slash } if (substr($image_subdirectory, -1, 1) == '/') { $image_subdirectory = substr($image_subdirectory, 0, -1); // strip any trailing slash } $dirs = explode('/',$image_subdirectory); what do i amend now?... pls help... -
[Contribution] Additional Images Module
olive12b replied to Parikesit's topic in General Add-Ons Support
-
[Contribution] Additional Images Module
olive12b replied to Parikesit's topic in General Add-Ons Support
hi, great contribution! i hope to resolve the errors and be able to use this contribution... i have installed all the new files for this contribution (under section A. New Files in install-readme), and also compared and installed the modified files (under section C. Files Modification in install-readme). As for section B, "Database Installation", I opened a browser and typed http://www.xxxx......catalog/admin/additio...s_configure.php and got these errors below. I have not done anything yet on this page, including "run configuration utility". Should I resolve the errors before running the configuration utility? I hope someone can help me with these errors: Notice: Use of undefined constant tep_get_parent_category - assumed 'tep_get_parent_category' in .....\catalog\admin\includes\functions\general.php on line 1357 Notice: Use of undefined constant tep_catname_to_dir - assumed 'tep_catname_to_dir' in .....\catalog\admin\includes\functions\general.php on line 1371 Notice: Use of undefined constant version_compare_replacement_sub - assumed 'version_compare_replacement_sub' in .....\catalog\admin\includes\functions\general.php on line 1380 Notice: Use of undefined constant version_compare_replacement - assumed 'version_compare_replacement' in .....\catalog\admin\includes\functions\general.php on line 1441 I am guessing that the errors are related to the general.php file, and lines 1357 to 1450 of the general.php file is as follows: if ( !function_exists(tep_get_parent_category) ) { function tep_get_parent_category($cat) { $category_query = tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$cat . "' limit 1"); if ( $category = tep_db_fetch_array($category_query) ) { if ($category['parent_id'] != 0) { return $category['parent_id']; } else { return false; } } return false; } } if ( !function_exists(tep_catname_to_dir) ) { function tep_catname_to_dir($catname) { return strtolower(str_replace(' ','-',preg_replace("/[^a-zA-Z0-9\s]/", "", $catname))); } } // version_compare_replacement & version_compare_replacement_sub // based on functions found in phpThumb() by James Heinrich <[email protected]> // released under GNU GENERAL PUBLIC LICENSE Version 2, June 1991 if (!function_exists(version_compare_replacement_sub)) { function version_compare_replacement_sub($version1, $version2, $operator='') { // If you specify the third optional operator argument, you can test for a particular relationship. // The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively. // Using this argument, the function will return 1 if the relationship is the one specified by the operator, 0 otherwise. // If a part contains special version strings these are handled in the following order: dev < (alpha = a) < (beta = B) < RC < pl static $versiontype_lookup = array(); if (empty($versiontype_lookup)) { $versiontype_lookup['dev'] = 10001; $versiontype_lookup['a'] = 10002; $versiontype_lookup['alpha'] = 10002; $versiontype_lookup['b'] = 10003; $versiontype_lookup['beta'] = 10003; $versiontype_lookup['RC'] = 10004; $versiontype_lookup['pl'] = 10005; } if (isset($versiontype_lookup[$version1])) { $version1 = $versiontype_lookup[$version1]; } if (isset($versiontype_lookup[$version2])) { $version2 = $versiontype_lookup[$version2]; } switch ($operator) { case '<': case 'lt': return intval($version1 < $version2); break; case '<=': case 'le': return intval($version1 <= $version2); break; case '>': case 'gt': return intval($version1 > $version2); break; case '>=': case 'ge': return intval($version1 >= $version2); break; case '==': case '=': case 'eq': return intval($version1 == $version2); break; case '!=': case '<>': case 'ne': return intval($version1 != $version2); break; } if ($version1 == $version2) { return 0; } elseif ($version1 < $version2) { return -1; } return 1; } } if (!function_exists(version_compare_replacement)) { function version_compare_replacement($version1, $version2, $operator='') { if (function_exists('version_compare')) { // built into PHP v4.1.0+ return version_compare($version1, $version2, $operator); } // The function first replaces _, - and + with a dot . in the version strings $version1 = strtr($version1, '_-+', '...'); $version2 = strtr($version2, '_-+', '...'); pls help.... -
After I first installed the pwa_2_0b, I did not do a server database restore from the admin screen. That was because after the 1st install of PWA, I continued to install other contributions like QPBPP and Specials Module etc. However, I did go into phpmyadmin and manually removed the executed SQL files (namely common.sql and english.sql) that came with the PWA_2_0b contribution. I also removed all the customers details in there, so that i could start fresh with PWA_0.910. Thereafter, I executed the SQL file of PWA 0.910 and compared the relevant files of PWA 0.910 with my existing files, and manually edit them through the oscommerce admin screen. what can i do now?
-
I'm using Oscommerce 2.2rc2a. please advise what exactly to do? please be patient with me as i am new to SQL (i.e. didn't know anything about it until i started developing a website)... thanks.
-
the PWA_2_0b didnt work for me, so I uninstalled it and installed PWA_0.910 instead. now i have 2 error messages and have checked/compared all the relevant files for the whole day, but can't find the problem. please help.... Error on catalog/checkout_process.php 1264 - Out of range value adjusted for column 'customers_address_format_id' at row 1 insert into orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, currency, currency_value) values ('6', ' ', '', '', '', '', '', '', '', '', '', '', ' ', '', '', '', '', '', '', '', '0', ' ', '', '', '', '', '', '', '', '', 'InterBank Transfer Payment', '', '', '', '', now(), '1', 'SGD', '1.00000000') [TEP STOP] Error on catalog/order_info.php 1264 - Out of range value adjusted for column 'address_book_id' at row 1 insert into address_book (customers_id, address_book_id, entry_firstname, entry_lastname, entry_street_address, entry_postcode, entry_city, entry_country_id, entry_gender, entry_company, entry_suburb, entry_zone_id, entry_state) values ('7', '', 'tracy', 'lim', 'tracy lane', '333555', 'singapore', '188', 'f', '', '', '0', 'singapore') [TEP STOP]
-
Hi, after omitting the first line and further amending the rest of the code (as shown below), i finally managed to get it executed with success. thanks everyone! :) :) QUOTE(Jan Zonjee @ Mar 17 2008, 10:04 PM) Try changing the "" for the id to NULL: CODE INSERT INTO `configuration` VALUES (NULL, 'Limit the Scope of Specials Shown', 'LIMIT_PRODUCT_SPECIALS_SCOPE', 'true', 'Show only Product Specials that are under the current category level.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); INSERT INTO `configuration` VALUES (NULL, 'Show Specials on Catalog Page', 'SHOW_PRODUCT_SPECIALS_ON_CATALOG', 'true', 'Show Product Specials at the bottom of the Main Catalog Page', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); INSERT INTO `configuration` VALUES (NULL, 'Show Specials on Categories Page', 'SHOW_PRODUCT_SPECIALS_ON_CATEGORIES', 'true', 'Show Product Specials at the bottom of the Categories Page. Shown only on pages without a products list also.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); INSERT INTO `configuration` VALUES (NULL, 'Show Specials on Products Info Page', 'SHOW_PRODUCT_SPECIALS_ON_PRODUCTS', 'true', 'Show Product Specials at the bottom of the Products Info pages.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); INSERT INTO `configuration` VALUES (NULL, 'Show Specials on Products List Pages', 'SHOW_PRODUCT_SPECIALS_ON_PRODUCTS_LIST', 'true', 'Show Product Specials at the bottom of the Products List pages. This is best suited for column/row product list pages.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); INSERT INTO `configuration` VALUES (NULL, 'Product Specials Columns', 'PRODUCT_SPECIALS_DISPLAY_COLUMNS', '3', 'Number of columns to display product specials.', 6123, NULL, now(), now(), NULL, NULL); INSERT INTO `configuration` VALUES (NULL, 'Max Product Specials', 'MAX_DISPLAY_PRODUCT_SPECIALS', '3', 'Maximum number of product specials to display in a category.', 6123, NULL, now(), now(), NULL, NULL);
-
hi, i got this error message on the webpage "Warning: in_array() [function.in-array]: Wrong datatype for second argument" for catalog\includes\application_top.php on line 293. here's the contents of my application_top.php from line 262 to 311 is: // include currencies class and create an instance require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); if (!tep_session_is_registered('easy_discount')) { tep_session_register('easy_discount'); $easy_discount = new easy_discount(); } //Vlad b EZ discount //Discount for given category: //Id's of categories which has a products with discount //$categories_list=array('25', '24'); $categories_list=array('3', '4', '10'); if (count($categories_list)>0) { $query="select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id='".$categories_list[0]."'"; for( $it=1;$it<count($categories_list);$it++) $query.=" OR categories_id='".$categories_list[$it]."'"; $result=tep_db_query($query); $total4discount_prod=0; $products_in_cart=$cart->get_products(); //Make an array with products id's from specials categories: while ($pr2cat = tep_db_fetch_array($result)) $discount_products_list[]=$pr2cat['products_id']; //var_dump($discount_products_list); foreach ($products_in_cart as $cart_item) { [color="#FF0000"]if (in_array($cart_item['id'], $discount_products_list)) {[/color] $total4discount_prod+=$cart_item['price']*$cart_item['quantity']; } else $total4discount_prod2+=$cart_item['price']*$cart_item['quantity']; //========================================================= //Calculate discount1: if ($total4discount_prod<40) $discount_percent=0; elseif ($total4discount_prod<200) $discount_percent=10; else $discount_percent=20; //Calculate discount for total price of selected products: $easy_discount->set('D4BH', '<abbr title="'.DISCOUNT_FOR_BAGHOOKS_TEXT.'">-' . $discount_percent . '%</abbr>', (($total4discount_prod*$discount_percent)/100) ); } } //Vlad e EZ discount // include the mail classes require(DIR_WS_CLASSES . 'mime.php'); require(DIR_WS_CLASSES . 'email.php'); Line 293 where the error is in red colour in the codebox. please advise what I can do about the error? thanks.
-
can i use the code above in the Easy Discount contribution? I would like to give discount to a customer who buys 5 or more items within the same product category (can be a mix of different products but must be within the same product category). And a higher discount if a customer buys more than 10 items. please advise. thanks.
-
SQL error relating to Specials Module contribution
olive12b replied to olive12b's topic in General Add-Ons Support
thank you! thank you! thank you! thank you! thank you! it finally says "Your SQL has been executed successfully" thank you!! :) -
SQL error relating to Specials Module contribution
olive12b replied to olive12b's topic in General Add-Ons Support
hi, thank you very very much for your detailed guidance. After I found "configuration group" on the left column and clicked "browse", I did find "6123" and it is for "Product Specials Module". Then I followed your advice to skip that statement and executed only this: INSERT INTO `configuration` VALUES ('', 'Limit the Scope of Specials Shown', 'LIMIT_PRODUCT_SPECIALS_SCOPE', 'true', 'Show only Product Specials that are under the current category level.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); INSERT INTO `configuration` VALUES ('', 'Show Specials on Catalog Page', 'SHOW_PRODUCT_SPECIALS_ON_CATALOG', 'true', 'Show Product Specials at the bottom of the Main Catalog Page', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); INSERT INTO `configuration` VALUES ('', 'Show Specials on Categories Page', 'SHOW_PRODUCT_SPECIALS_ON_CATEGORIES', 'true', 'Show Product Specials at the bottom of the Categories Page. Shown only on pages without a products list also.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); INSERT INTO `configuration` VALUES ('', 'Show Specials on Products Info Page', 'SHOW_PRODUCT_SPECIALS_ON_PRODUCTS', 'true', 'Show Product Specials at the bottom of the Products Info pages.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); INSERT INTO `configuration` VALUES ('', 'Show Specials on Products List Pages', 'SHOW_PRODUCT_SPECIALS_ON_PRODUCTS_LIST', 'true', 'Show Product Specials at the bottom of the Products List pages. This is best suited for column/row product list pages.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); INSERT INTO `configuration` VALUES ('', 'Product Specials Columns', 'PRODUCT_SPECIALS_DISPLAY_COLUMNS', '3', 'Number of columns to display product specials.', 6123, NULL, now(), now(), NULL, NULL); INSERT INTO `configuration` VALUES ('', 'Max Product Specials', 'MAX_DISPLAY_PRODUCT_SPECIALS', '3', 'Maximum number of product specials to display in a category.', 6123, NULL, now(), now(), NULL, NULL); Then I got this different error message: SQL query: INSERT INTO `configuration` VALUES ( '', 'Limit the Scope of Specials Shown', 'LIMIT_PRODUCT_SPECIALS_SCOPE', 'true', 'Show only Product Specials that are under the current category level.', 6123, NULL , now( ) , now( ) , NULL , 'tep_cfg_select_option(array(''true'', ''false''),' ); MySQL said: #1264 - Out of range value adjusted for column 'configuration_id' at row 1 What do I do now? Thanks. -
SQL error relating to Specials Module contribution
olive12b replied to olive12b's topic in General Add-Ons Support
Sorry I'm not familiar with SQL, so I am unsure what the default osC installation configuration_group_id number is. The only other SQl files I have previously executed related to the Purchase without account contribution, and they are as follows: ALTER TABLE `customers` ADD COLUMN `customers_login` VARCHAR(96) AFTER `customers_newsletter`, ADD UNIQUE INDEX idx_customers_login(`customers_login`); ALTER TABLE `customers` MODIFY COLUMN `customers_password` VARCHAR(40); ALTER TABLE `orders` ADD COLUMN `customers_dummy_account` TINYINT UNSIGNED NOT NULL AFTER `customers_address_format_id`; and INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Purchase without account', 'PURCHASE_WITHOUT_ACCOUNT', 'yes', 'Do you allow customers to purchase without an account?', '5', '10', 'tep_cfg_select_option(array(\'yes\', \'no\'), ', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Purchase without account shippingaddress', 'PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING', 'yes', 'Do you allow customers without account to create separately shipping address?', '5', '11', 'tep_cfg_select_option(array(\'yes\', \'no\'), ', now()); Are the SQl files from the Purchase without account contribution conflicting with the SQL file of Specials Module contribution that I am trying to install? Please advise what I can do to rectify the problem? Separately, apologies for double posting...I am really desperate for a solution as I have yet to receive any response after previously posting... Also, what is meant by "bumping"? (Please enlighten me before I break another forum rule...) Many thanks, and I really hope I can get around my SQL problem soon.