osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Option Type and 051112 Patch

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 11-02-2006, 02:30 PM
New Member
 
Join Date: Apr 2004
Location: NJ
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
TracyG
Default Option Type and 051112 Patch

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 11-02-2006, 04:11 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,329
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: Option Type and 051112 Patch

What is the exact error message please...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 11-02-2006, 06:23 PM
New Member
 
Join Date: Apr 2004
Location: NJ
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
TracyG
Default RE: Option Type and 051112 Patch

Sorry Michael, I was in a rush when I posted. Here it is:

Quote:
Parse error: parse error, unexpected $ in /home/httpd/vhosts/mykeepsakebooks.com/httpdocs/catalog/includes/classes/shopping_cart.php on line 596
Tracy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 11-05-2006, 08:05 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,329
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: Option Type and 051112 Patch

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) . "')");
Add another closing brace } just below it (there is already one there, so create a new line and add the extra one).


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 . "'");
Add another closing brace, just like the first one. That should fix it for you.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 11-06-2006, 06:51 AM
New Member
 
Join Date: Apr 2004
Location: NJ
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
TracyG
Default RE: Option Type and 051112 Patch

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 11-06-2006, 07:30 AM
New Member
 
Join Date: Apr 2004
Location: NJ
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
TracyG
Default

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'],
If I use the second line with the secured /includes/classes/shopping_cart.php, I get blanks in the TEXT field. If I use the first line, I get "TEXT" in the TEXT field.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 11-06-2006, 09:52 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,329
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

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


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 11-06-2006, 10:24 AM
New Member
 
Join Date: Apr 2004
Location: NJ
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
TracyG
Default

Thanks Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 05-30-2007, 07:52 PM
Lurker
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jillbalkus is on a distinguished road
Default Re: Option Type and 051112 Patch

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 10:55 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax