This is a discussion on Option Type and 051112 Patch within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; Hi, I am getting a parse error that indicates the last line of /includes/classes/shopping_cart.php This problem is related to applying ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi, I am getting a parse error that indicates the last line of /includes/classes/shopping_cart.php This problem is related to applying the 051112 security patch to that file, which has been modified for the Option Type feature text option. Code can be viewd at http://mykeepsakebooks.com/catalog/s...rt_opt_sec.txt I am sure it is just an extra or lacking } or something. Tracy |
|
#2
| ||||
| ||||
| What is the exact error message please...
__________________ Michael Sasek osCMax Developer
|
|
#3
| |||
| |||
| Sorry Michael, I was in a rush when I posted. Here it is: Quote:
|
|
#4
| ||||
| ||||
| It looks like you were missing a couple of closing braces as you suspected. If you add a closing brace after the following lines (in 2 places): Line 157: Code: if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id, products_options_value_text) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (int)$value . "', '" . tep_db_input($attr_value) . "')");
Then just after line 224: Code: if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "', products_options_value_text = '" . tep_db_input($attr_value) . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "' and products_options_id = '" . (int)$option . "'");
__________________ Michael Sasek osCMax Developer
|
|
#5
| |||
| |||
| Thanks, Michael, This corrected the error, but the TEXT options value is not being passed to the shopping cart from the form, and if the order continues to the end the TEXT fields are blank. I will look over at the oscommerce forums for the contribution, while I await any comments you might have. Here is my shopping_cart.php with new brackets added. http://mykeepsakebooks.com/catalog/s...pt_sec.php.txt Thanks, Tracy |
|
#6
| |||
| |||
| Additional info. These are lines 256 & 257 of /checkout_process.php Code: // 'products_options_values' => $attributes_values['products_options_values_name'],
'products_options_values' => $order->products[$i]['attributes'][$j]['value'],
Still investigating. I am going to check through everything and make sure I made all the changes correctly. In the meantime, the store is working with the 1.7 store version of the /includes/classes/shopping_cart.php and checkout_process.php files, as a bandaid. Thanks, Tracy |
|
#7
| ||||
| ||||
| Check the thread for this mod over at oscommerce.com, as the TEXT appearing instead of the actual input is a common issue that is resolved in that thread...
__________________ Michael Sasek osCMax Developer
|
|
#8
| |||
| |||
| Thanks Michael |
|
#9
| |||
| |||
| Hi! I'm having the same problem, and when I tried Michael's solution, it didn't work. I'm getting a parse error on my catalog/includes/classes/shopping_cart.php page after adding the Option Type contribution 1.7.2: Parse error: parse error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in .../html/catalog/includes/classes/shopping_cart.php on line 867 Here's the code: http://keepsakeprograms.com/shopping_cart.txt Perhaps my braces are also off? |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| osCMax 2.0RC2 Security Patch/Update 051112 | wilde-uk | osCMax v2 Installation issues | 5 | 04-12-2006 07:45 PM |
| osCMax 2.0RC2 Security Patch/Update 051112 | michael_s | osCMax v2 Announcements | 0 | 11-27-2005 10:12 AM |
| Option Type Feature | adam71o | osCMax v1.7 Installation | 2 | 04-24-2005 01:08 PM |
| Have BTS 1.2a, want to add Option Type Feature | nfmg | osCMax v1.7 General Mods Discussion | 1 | 05-31-2004 03:50 PM |
| Option Type Feature v1.6 for MS2-MAX v1.5.5 | michael_s | osCMax v1.7 Discussion | 3 | 01-23-2004 01:09 PM |