Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.


  • Content count

  • Joined

  • Last visited

Profile Information

  • Real Name
    Caleb Crosby
  1. Hi All, I'm wondering if someone can't help me to understand the use of tep_db_prepare_input better. I am working on a new contribution, and currently when I try to insert/update a field with a value that contains an apostrophe, the backslash is added before it and is then displayed on the site. For example, "why isn't this working" will be inserted into the database as "why isn\'t this working". The backslash is then also displayed on the public site, which is no good. I thought it was the tep_db_prepare_input function that handled this, but I must be missing something. Below is the insert/update page from my contribution page. Any thoughts or suggestions are GREATLY appreciated!! Thanks, caleb ======================================================== $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'insert': case 'update': if (isset($HTTP_GET_VARS['tID']) && tep_not_null($HTTP_GET_VARS['tID'])) $testimonials_id = tep_db_prepare_input($HTTP_GET_VARS['tID']); $sql_data_array = array('authors_name' => tep_db_prepare_input($HTTP_POST_VARS['authors_name']), 'customers_id' => (int)$customer_id, 'authors_email_address' => tep_db_prepare_input($HTTP_POST_VARS['authors_email_address']), 'authors_web' => tep_db_prepare_input($HTTP_POST_VARS['authors_web']), 'authors_state' => tep_db_prepare_input($HTTP_POST_VARS['authors_state']), 'authors_company' => tep_db_prepare_input($HTTP_POST_VARS['authors_company'])); if ($action == 'insert') { $insert_sql_data = array('date_added' => 'now()'); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_TESTIMONIALS, $sql_data_array); $testimonials_id = tep_db_insert_id(); } elseif ($action == 'update') { $update_sql_data = array('last_modified' => 'now()'); $sql_data_array = array_merge($sql_data_array, $update_sql_data); tep_db_perform(TABLE_TESTIMONIALS, $sql_data_array, 'update', "testimonials_id = '" . (int)$testimonials_id . "'"); } $sql_data_array = array('testimonials_text' => tep_db_prepare_input($HTTP_POST_VARS['testimonials_text'])); if ($action == 'insert') { $insert_sql_data = array('testimonials_id' => $testimonials_id, 'language_id' => $language_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_TESTIMONIALS_DESCRIPTION, $sql_data_array); } elseif ($action == 'update') { tep_db_perform(TABLE_TESTIMONIALS_DESCRIPTION, tep_db_prepare_input($sql_data_array), 'update', "testimonials_id = '" . (int)$testimonials_id . "' and language_id = '" . (int)$languages_id . "'"); } tep_redirect(tep_href_link(FILENAME_TESTIMONIALS, 'page=' . $HTTP_GET_VARS['page'] . '&tID=' . $testimonials_id)); break;
  2. Hello and good day! First off, this contribution is wonderful! Currently I am experiencing a problem where ONLY the default header information is being displayed on index.php, product_info.php, and products_new.php. I also have header tags set for my articles.php and articles_new.php, in which it is working properly (i.e. combining the page specific header data and the default header data). Any suggestions? The header data is saved in the database correctly, however it is not being displayed on the main product pages. Thanks so much! My test site can be seen by visiting http://demo.cicsolutions.com
  3. calebic

    QBI Quickbooks Import

    Sorry I can't offer any suggestions, I'm just getting educated on this contribution myself. I heard from Adam, and he mentioned he will be on vacation until the 15th. He seems really nice and helpful, so I would think he'll address any open questions when he returns.
  4. calebic

    QBI Quickbooks Import

    Hello and good day!! Thanks so much for your contribution!! I can't wait to complete this automation!! Currently when I go to QBI Setup > Products, my items.iif file is found in the input directory, however when I try to import the file, it is not imported. It appears that an error message should be displayed, as "SETUP_FAIL" is shown on the page. When I do a "find all" for SETUP_FAIL, it is found in the languages pages, where the error messages are set. I am not seeing a SETUP_FAIL definition in the catalog/admin/qbi_products.php file. Is this not where the error text would be? I was hoping the error would lead me closer to why my items are not being imported. I have tried importing the items.iif file from several different browser, both Mac and Windows, but keep getting the same result. I am also wondering about how discounts are set up to work between osC and QB. I have installed a contribution for separate pricing based on user login (http://www.oscommerce.com/community/contributions,716/). As we do both retail and wholesale sales, I was hoping I could somehow make it so our wholesale clients could log in, receive their wholesale pricing, and the transaction could follow through to QB. Currently the only osC item in the QBI Discounts/ Fees Matching is a "Low Order Fee". Can you help me to understand how I can set up other Discounts / Fees in osC? Any suggestions you can offer are greatly appreciated!! Thanks again for such a great contribution!!
  5. calebic

    I'm new....

    hit me up with your email address and I can send you what kevin sent me. Although, I ended up using the UPS Chooser Module, so that I could easily select which shipping types I wanted to offer.
  6. calebic

    I'm new....

    Admin > Configuration > Shipping / Packing Then update the Postal Code
  7. calebic

    I'm new....

    Check to make sure you have your store zip code set. this is important for calculating shipping. You do not need an account with UPS to use this module. If you are stuck, I would say uninstall everything and then install again. Make sure you have uploaded the ups.php files to your secure server too.
  8. calebic

    I'm new....

    Hi All, I'm not really sure what I am missing here. I too did not have a UPS shipping module come standard with my osCommerce installation. Can anyone recommend which Contribution is a good one to start from. Then, based on the comments above, I need to update my ups.php files with the ones Kevin emailed me? I guess I'm missing how the admin section is updated so I can install UPS. If all I need is the 2 ups.php files, then how am I to configure UPS shipping in the admin system? I REALLY, REALLY appreciate your assistance! Thanks so much!
  9. calebic

    Article Manager v1.0

    Hi Rob, I have been playing around with the Article Manager 1.2 contribution, and it is absolutely WONDERFUL! Really, nice work! Currently, I am experiencing some strange behavior. I would like to have articles without having any topics. I am able to add the article via the admin pages, however the article does not show up in my articles info box unless it is tied to a topic. Once the article is added to a topic, it also shows up in the "new" and "all articles" section of the info box. You can see this in action by visiting I have two articles configured in the database, however only the one associated to the topic "test topic" is being found. You are able to view this other article by going straight to the detail page Any thoughts or advice you can offer is greatly appreciated!! Thanks again for such a useful contribution!