Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

davidedp

Pioneers
  • Posts

    20
  • Joined

  • Last visited

Reputation Activity

  1. Like
    davidedp got a reaction from EvrikGapRUS in [Contribution] Option Types v2   
    I would say it's a copy/paste error.
    With that code you are loading and checking twice the option type. To be more precise you do the second check only if the typeis NOT text, textarea or file. I would say unuseless.
    Here my code (but I have issues with products_attribute and I'm using the AJAX add-on).
     
     
    //BOF Option Types v2.3.1 - For TEXT and FILE option types, No need to add anything...
    // Let's Check for OptionType first...
    $optionType_query = tep_db_query("select products_options_type from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$option_id . "' and language_id = '" . $languages_id . "'");
    $optionType = tep_db_fetch_array($optionType_query);
    switch ($optionType['products_options_type']) {
    case OPTIONS_TYPE_TEXT:
    case OPTIONS_TYPE_TEXTAREA:
    case OPTIONS_TYPE_FILE:
    // Do Nothing...
    break;
    default:
    //EOF Option Types v2.3.1
     
    What error do you have if you remove one part? Is it a } missing?
×
×
  • Create New...