Jump to content


  • Content count

  • Joined

  • Last visited

Profile Information

  • Real Name
    Alan Lomax
  1. FIXED IT!!!! In fact none of the payment modules work. I was looking at the /includes/modules/payment/world_junior.php file to see why the CoD module worked and WP didn't and noticed that the code in world_junior.php was the same as the checkout_process.php which had been modified in the OTF 2 change. I changed the code in world_junior.php in accordance with the changes for the checkout_process.php and hey presto, it worked!!! I had a look at some of the other payment modules and they need to be changed aswel, if you need them. Here the changes I implemented: ---------------------------------------------------------------- INSTALLATION ---------------------------------------------------------------- Open /catalog/includes/modules/payment/worldpay_junior.php ----------------------- FIND: (around line 239) $attributes_values = tep_db_fetch_array($attributes); ADD BELOW $attr_name = $attributes_values['products_options_name']; if ($attributes_values['products_options_id'] == PRODUCTS_OPTIONS_VALUE_TEXT_ID) { $attr_name_sql_raw = 'SELECT po.products_options_name FROM ' . TABLE_PRODUCTS_OPTIONS . ' po, ' . TABLE_PRODUCTS_ATTRIBUTES . ' pa WHERE ' . ' pa.products_id="' . tep_get_prid($order->products[$i]['id']) . '" AND ' . ' pa.options_id="' . $order->products[$i]['attributes'][$j]['option_id'] . '" AND ' . ' pa.options_id=po.products_options_id AND ' . ' po.language_id="' . $languages_id . '" '; $attr_name_sql = tep_db_query($attr_name_sql_raw); if ($arr = tep_db_fetch_array($attr_name_sql)) { $attr_name = $arr['products_options_name']; } } ----------------------- FIND: (around line 243) 'products_options' => $attributes_values['products_options_name'], 'products_options_values' => $attributes_values['products_options_values_name'], REPLACE with // OTF contrib begins //'products_options' => $attributes_values['products_options_name'], //'products_options_values' => $attributes_values['products_options_values_name'], 'products_options' => $attr_name, 'products_options_values' => $order->products[$i]['attributes'][$j]['value'], // OTF contrib ends ----------------------- FIND: (around line 427) $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name']; REPLACE with // OTF contrib begins //$products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name']; $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . tep_decode_specialchars($order->products[$i]['attributes'][$j]['value']); // OTF contrib ends PLEASE NOTE for all those having problems with the text field and/or text data disappearing in the email/order details etc that the rules need to be adhered to: 1. After you install the OTF there is an sql script (insert_text_option_value.sql).This adds a record into the table products_options_values with a product_options_values_id of 0 and a products_options_values_name of TEXT. THIS IS IMPORTANT!!! 2. When you add a new text Product Option in the Admin/Catalog/Product Attributes it will automatically insert an Option Value of TEXT to the Product Option you have just added. NOTE that the Option Value ID is 0 (AGAIN IMPORTANT!!!). 3. Now add the Product Attributes to the product but make sure that you select TEXT as the Option Value. 4. DO NOT delete any text Option Values with an ID of 0 because all the text fields will be deleted with an ID of 0. The big problem if you do create another text field is that it will not automatically create an Option Value TEXT with an ID of 0, it will pick the next ID. The consequence is that you will lose the text field from you orders etc. If you do need to delete the text field Option Value the you need to run the insert_text_option_value.sql file again to create the default TEXT record in the table. 5. I also noted that it also automatically creates an Option Value of TEXT for Checkboxes aswel, don't ask me why. That's it from the newbie, my next task is to implement the Attributes Sort Order, FINGERS CROSSED!!! Alan
  2. Faaliyet, I am a newbie to the world of e-commerce/OSCommerce. I am contacting you to see if you can help me with a problem I have with the TEXT attribute. I installed option_type_feature-v2.0.2_manual_installation(-new-) onto my OSC build standard of oscommerce-2.2rc2a. I then uploaded the excellent OTF contribution from faaliyet: http://www.oscommerce.com/community/contributions,160 I also added the following because when you update in the shopping cart the options dissapeared: http://forums.oscommerce.com/index.php?s=&...t&p=1199739 shopping_cart.php Uncommented: echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value); application_top.php Added the magic +++ line: $attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i].'+++'.$i]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i].'+++'.$i] : ''; The PROBLEM I have is when I opt for a credit card payment (my payment module is "Worldpay Junior" in Test mode) the shopping cart displays the text field correctly "- text field text data" but the resulting text field displayed in the Customer's Account Orders is as follows: "- text field: TEXT". The problem also propogates to the Admin/Orders invoice & packing slip and fnally the confirmation email sent to the customer and store owner. When I go through the check out process and use "Cash on Delvery" everything works perfectly !!!! I note that the DB table product_option_values has a field product_option_values _names that is set to TEXT, as per the insert_text_option_value sql file used during the OTF installation. It appears that when the software, on return from the the "Worldpay site" goes to the DB product_option_values table for the options rather than the customer_basket_attributes table. Am I on the right lines or am I just guessing? Any help in this matter would be greatly appreciated. Alan
  3. Here's a link to the solution post #663: http://forums.oscommerce.com/index.php?sho...7259&st=662 but you got more problems ahead if using Worldpay. Using text fields work with cash on delivery but not Worldpay Junior.
  4. I've just integrated with WP Junior, and I didn't touch the worldpay_junior.php file. In Worldpay admin, login to the production area and click on SYSTEM Settings, select the Integration Setup 'Test' and add the Payment Response URL eg http://www.your-url.co.uk/catalog/ext/modu...or_callback.php (don't forget the include the http://), check the Payment Response enabled? and check the Enable the Shopper Response. Enter a Payment Response password (This is the Callback Password you entered in the OSC Admin WP Junior setup) and enter the MD5 secret for transactions (This is the MD5 Password you entered in the OSC Admin WP Junior setup). I also copied it to the Production setup. PS You can only enter these changes when you login to the PRODUCTION live environment if you try it in the TEST environment you will get a database error. A good contact at WP is Gary Cook 08703661290. Enjoy...
  5. I get the same thing but only when I use the payment module "Worldpay Junior" the options are blank in the order emails and reviewing the order in admin (except the default drop-down option). The order details are fine when I use "Cash on Delivery" payment method. Having said that, only the option values are in the email. This is becoming a major issue cos I don't know the customer's option's are. I've just installed oscommerce-2.2rc2a with the OTF Full fix with additional changes: shopping_cart.php file: Uncommented: echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value); application_top.php file: Added the magic +++ line: $attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i].'+++'.$i]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i].'+++'.$i] : '';