Full service web hosting, great prices and support. Starts at $1.99/month!
Results 1 to 9 of 9

Thread: Option Type and 051112 Patch

  1. #1
    TracyG
    Guest


    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

  2. #2
    osCMax Developer


    Option Type and 051112 Patch


    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    23,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    michael_s     $ 10.00
    Rep Power
    597


    Default RE: Option Type and 051112 Patch

    What is the exact error message please...

  3. #3
    TracyG
    Guest


    Default RE: Option Type and 051112 Patch

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

    Parse error: parse error, unexpected $ in /home/httpd/vhosts/mykeepsakebooks.com/httpdocs/catalog/includes/classes/shopping_cart.php on line 596
    Tracy

  4. #4
    osCMax Developer


    Option Type and 051112 Patch


    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    23,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    michael_s     $ 10.00
    Rep Power
    597


    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.

  5. #5
    TracyG
    Guest


    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

  6. #6
    TracyG
    Guest


    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

  7. #7
    osCMax Developer


    Option Type and 051112 Patch


    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    23,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    michael_s     $ 10.00
    Rep Power
    597


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

  8. #8
    TracyG
    Guest


    Default

    Thanks Michael

  9. #9
    jillbalkus
    Guest


    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?

Similar Threads

  1. osCMax 2.0RC2 Security Patch/Update 051112
    By wilde-uk in forum osCmax v2 Installation issues
    Replies: 5
    Last Post: 04-12-2006, 07:45 PM
  2. osCMax 2.0RC2 Security Patch/Update 051112
    By michael_s in forum Announcements
    Replies: 0
    Last Post: 11-27-2005, 10:12 AM
  3. Option Type Feature
    By adam71o in forum osCMax v1.7 Installation
    Replies: 2
    Last Post: 04-24-2005, 01:08 PM
  4. Have BTS 1.2a, want to add Option Type Feature
    By nfmg in forum osCMax v1.7 General Mods Discussion
    Replies: 1
    Last Post: 05-31-2004, 03:50 PM
  5. Option Type Feature v1.6 for MS2-MAX v1.5.5
    By michael_s in forum osCmax v1.7 Discussion
    Replies: 3
    Last Post: 01-23-2004, 01:09 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •