Jump to content

Dr_DK

Members
  • Content count

    82
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Dr_DK


  1. @rknabe - You are right. I had the same problem, I think DunWeb missed a few things. I had to download v2 of option types and look at their versions to compare.

     

    In the includes/classes/shopping_cart.php make the following changes:

     

    Comment out lines 103-109:

    /*	    reset($attributes);
        while (list($option, $value) = each($attributes)) {
    	  if (!is_numeric($option) || !is_numeric($value)) {
    	    $attributes_pass_check = false;
    	    break;
    	  } else {
    	    $check_query = tep_db_query("select products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "' limit 1");
    	    if (tep_db_num_rows($check_query) < 1) {
    		  $attributes_pass_check = false;
    		  break;
    	    }
    	  }
        }
      } elseif (tep_has_product_attributes($products_id)) {
        $attributes_pass_check = false;
      }
    */
    

     

    Find lines 131-133:

    $this->contents[$products_id_string]['attributes'][$option] = $value;
    // insert into database
                   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) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (int)$value . "')");

     

    Replace with:

    
    //BOF - Zappo - Option Types v2 - Check options loop, and add attributes accordingly...
                   $attr_value = NULL;
                   $blank_value = FALSE;
                   if (strstr($option, TEXT_PREFIX)) {  //Check for Text and Upload Options
                     if (trim($value) == NULL) { //Check if the Text Option has a value (Or is the value blank?)
                       $blank_value = TRUE;
                     } else {                               //Value is valid and contains data --> Add Text Option value
                       $option = str_replace(TEXT_PREFIX,'',$option);
                       $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
                       $value = OPTIONS_VALUE_TEXT_ID;
                       $this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
                     }
                   }
    
                   if (!$blank_value) {  // If the Value is valid and Contains Data, add the option to the Cart....
                     $this->contents[$products_id_string]['attributes'][$option] = $value;
    // insert into database
                     // - Zappo - Option Types v2 - Added products_options_value_text For saving Text and Upload Option Values
                     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) . "', '" . $option . "', '" . (int)$value . "', '" . tep_db_input($attr_value) . "')");
                   }
    //EOF - Zappo - Option Types v2 - Check options loop, and add attributes accordingly...

     

    Comment out line 175-184:

    /*      if (is_array($attributes)) {
           reset($attributes);
           while (list($option, $value) = each($attributes)) {
             if (!is_numeric($option) || !is_numeric($value)) {
               $attributes_pass_check = false;
               break;
             }
           }
         }
    */

     

    Find around lines 193-195:

    $this->contents[$products_id_string]['attributes'][$option] = $value;
    // update database
               if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "' and products_options_id = '" . (int)$option . "'");

     

    Replace it with:

    //BOF - Zappo - Option Types v2 - Check options loop for Text & Uploads, and add attributes accordingly...
               $attr_value = NULL;
        $blank_value = FALSE;
               if (strstr($option, TEXT_PREFIX)) {  //Check for Text and Upload Options
                 if (trim($value) == NULL) { //Check if the Text Option has a value (Or is the value blank?)
                   $blank_value = TRUE;
                 } else {                               //Value is valid and contains data --> Prepare for database
                   $option = str_replace(TEXT_PREFIX,'',$option);
                   $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
                   $value = OPTIONS_VALUE_TEXT_ID;
                   $this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
                 }
               } 
               if (!$blank_value) {
                 $this->contents[$products_id_string]['attributes'][$option] = $value;
    // update database
                 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) . "' and products_options_id = '" . (int)$option . "'");
               }
    //EOF - Zappo - Option Types v2 - Check options loop for Text & Uploads, and add attributes accordingly...

     

    Find around line 356:

    global $customer_id;

    Add below it:

    //BOF - Zappo - Option Types v2 - ONE LINE - Add call to tep_get_uprid to correctly format product ids containing quotes
         $products_id = tep_get_uprid($products_id, $attributes);

     

    Find around line 378:

    'image' => $products['products_image'],

    Add below it:

    'attributes_values' => (isset($this->contents[$products_id]['attributes_values']) ? $this->contents[$products_id]['attributes_values'] : ''),

     

     

    Hope that helps. Share if you find something else that needs modifying! :-)


  2. Chris,

     

    I have it without the attribute manager and still experiencing the same problem on fresh 2.3.1.

     

    Run your SQL - add your drop over the top files - if I go into Admin -> Catalog -> Product Attributes -> add a new one as TEXT field add it to the product (CUSTOMER-INPUT as option value), go into product page and try to add it to cart, shopping carts empty...? Any thoughts? Am I missing something?


  3. bkellum - You know that's exactly what I thought, but then tried to reinstall, use compare&merge and have exact files in place. Then compared the chmod on all the files to make sure that it's not some permission issue, but again failed. It just seems as though something might not be properly configured on the new host (network solutions). Home page template works fine, sts template works, page templates work, but the product_info and category templates do not! Really pulling my hair out on this one lol. :-) Thanks for the help!

     

    Dino, this is an isolated issue with your shop, not STS.

     

    It appears you may have missed some of the STS files in your merge to your new host. Try re-installing all of the STS files as well as making the necessary code changes to the existing osCommerce files. To make this pain free, use a file comparison tool such as Beyond Compare.


  4. When you say configure, you mean in the admin to activate the display for index pages? If so, then yes. Everything is activated in the admin, the weird part is that these template files work fine: index.php_0.html, about.php.html, sts_template.html, policy.php.html. But for some odd reason index.php_21.html etc. won't work and also the product_info template won't work either...

     

     

    Hello Dino,

     

    Did you remember to configure the STS Modules at your new host?


  5. I have RC1 working fine with Ultimate SEO and STS 4.5.2 on the old host. But when I moved to network solutions STS templates for index.php_XX.html don't work... Also product_info.php.html template doesn't work. It only keep picking up sts_template.html file!

     

    Did anyone experience anything similar? Any quick fix? Thanks.


  6. This is an answer or "Add-On" requested from Bimbachetuning

    ------------------------------------------------------------------------

    I make a question:

    Its possible define only a status orders total?

     

    I would see only the totals in "finished" orders, and no in all status orders.

     

    Thnks a lot for the orders mod.

     

    P.D.: Sorry my bad english, im spanish ;)

    ------------------------------------------------------------------------

     

    Answer:

     

    Simply replace the line 385 with this:

     

    $orders_total_query = tep_db_query("select ot.orders_id, sum(ot.value) as total_sales, count(ot.value) as total_orders, ot2.orders_status_id from " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS_HISTORY . " ot2 where class = 'ot_total' and ot.orders_id = ot2.orders_id and ot2.orders_status_id = 2 GROUP by ot2.orders_id");

     

    Enjoy!


  7. Eastbiz - Fullfilment centers will want to have this data in specific formats. Most common one is 320 bit txt file which has fixed lenght. Upon successful authorization from the gateway they'll want you to execute an order batch file into their FTP location with that specific order info.

     

    Let me know what your budget is and how they want to have the batch order furnished, and maybe i can help you out to create it or perhaps we could release it as contribution. :-)

    Thanks.

     

    I am interested if someone can make such contribution. I will be happy to pay $$. I need to export orders to fulifllment center.

  8. Hey there people!

     

    I wanted to see if anyone has created a payment module for TransFirst or at least tried to? I have to use them for the payment module and wanted to check with the crew at OsC. :thumbsup:

     

    Any heads up is appreciated.

     

    Thanks.


  9. I have installed the UPSXML module and everything went ok.

     

    When I want to checkout with an item, I get the error:

    10002: The XML document is well formed but the document is not valid

     

    I've searched through the forum for a fix but it's all for the Dimension support to be set to 0 which in this version it already is fixed. I have the v1.2.3.

     

    Any help would be greatly appreciated!

     

    Thanks in advance.


  10. Not sure where your line 46 exactly would be, but looks like you are missing closing PHP tag "?>" on

     

    $commercial = !$residential; // Res/Comm Contrib

     

    Make sure that your Res/Comm contrib is installed correctly.

     

    :blink:

     

    TIP: Try not to copy your PATH to files! Mask them with *** for your own good. :-" Some of us can get tempted.

     

     

    I do however get a Parse Error when I attempt to edit an existing accounts addresses in

     

    when I click on edit I get this error:

     

    I can't seem to find it.

     

    Here is my code for that page:

     

    Any idea's?

     

     

     

    Thanks Again,

     

    Rod

     

     

     

    PS: The create account works great, thanks for fixing the drop down problem I was having!

×