Jump to content

cg-tbear

Members
  • Content count

    57
  • Joined

  • Last visited

1 Follower

About cg-tbear

  • Birthday 08/10/1968

Profile Information

  1. cg-tbear

    NEW! Complete Order Editing Tool!

    I am having the same problem as Maxxis and Chris and have installed the same Shipping Insurance mod as them. Insurance appears, but becomes non-editable after a change is made in the editor, and the insurance amount is not added to the total. Chris posted a fix for this; but for the life of me, I can't figure out what he did to make the insurance show up in the total. (I was able to make it editable.) He says he added a line before these lines: $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; The problem is that these two lines occur six times in the edit_orders.php file. I have no clue how to fix it because my php and javascript are very limited. Add in that AJAX thing and I'm completely lost. I've been searching this thread for three afternoons. :blink: HELP PLEASE! Chris's posts were #2701 & #2702 dated April 2008. Maxxis, any clue? Corinne
  2. cg-tbear

    NEW! Complete Order Editing Tool!

    Try checking your "admin/includes/languages/english/index.php" file. Usually when something like this happens to me, I find that I have accidentally uploaded the root file with the same name (in your case "admin/index.php") instead of the one with the english definitions. Corinne
  3. cg-tbear

    New UPS XML Shipping Module available

    Hey, Jan! The logging really helped. It turns out that the problem was a combination of a couple of things. First, the cases of cassette albums are oversized and I didn't think they were (My bad!). That accounted for about $10.00 of the extra $15.00. The second thing I'm not sure if its a bug or just how the module is supposed to work. I had checked the box for insurance, which means that there will be extra charges for this. The order was about $106.00, so the insurance charge should have been $1.50. For whatever reason, when UPS sends back the info, it is charging $1.50 PER BOX and not $1.50 for the entire order. Is this fixable? Its nice to have a little cushion on the shipping charges, but I still would like to be as accurate as possible on our quotes. Thanks again for your continued help! :thumbsup: Corinne
  4. cg-tbear

    New UPS XML Shipping Module available

    Jan, you are amazing at this! It worked! The correct weight is now shown! Yea! BUT....there is now another problem. I guess this is what you call debugging. The UPS quotes are off for the products that are ready-to-ship AND from the pulldown menu. Its quoting significantly high. I did several orders and it was averaging about $15.00 too much (not always the same amount off). In my tests, the rates were dead on for regular items and for items from a pulldown menu. Any thoughts? By the way, the e-mail error messages have stopped. Maybe these kinds of cURL and transit errors are just symptoms of other errors and not indications of independent cURL and transit errors. FYI, they looked like this: Error from cURL: Error [6]: Couldn't resolve host 'www.ups.com' experienced by customer with id 2 on 2006-08-07 14:04:24 UPSXML TimeInTransit Error: : experienced by customer with id 2 on 2006-08-07 14:04:24 Corinne
  5. cg-tbear

    New UPS XML Shipping Module available

    Hi Jan, The reason we did it that way is because the weight and packaging of our products varies so much that its easier for us just to put in the total shipping weight than try and figure out how much we have to add to each one. Anyway, it didn't work. I KNOW that we need to subtract the original product weight, but I don't know how. Here's the whole "get_products" function again. Maybe I defined "$products_weight" in the wrong place, but I did it the same way the "function caclulate()" has it. function get_products() { global $languages_id; if (!is_array($this->contents)) return false; //BOF Price Break Module $pf = new PriceFormatter; //EOF Price Break Module $products_array = array(); reset($this->contents); while (list($products_id, ) = each($this->contents)) { //BOF Price Break Module if ($products = $pf->loadProduct($products_id, $languages_id)) { $products_price = $pf->computePrice($this->contents[$products_id]['qty']); //EOF Price Break Module $products_weight = $product['products_weight']; //UPS XML //BOF phpmom.com advanced attribute price //hadir $attributes_price = 0; if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'"); $attribute_price = tep_db_fetch_array($attribute_price_query); if ($attribute_price['price_prefix'] == '') { $attributes_price += ($attribute_price['options_values_price']-$products_price); } elseif ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price']; } elseif ($attribute_price['price_prefix'] == '-') { $attributes_price -= $attribute_price['options_values_price']; } } } //EOF phpmom.com advanced attribute price//hadir // BOF: UPS XML Rates & Services ? Attributes Fix // determine total weight of attributes to add to weight of product $attributes_total_weight = 0; if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); $where = ' AND (('; while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $where .= 'options_id=' . $option . ' AND options_values_id=' . $value . ') OR ('; } $where=substr($where, 0, -5) . ')'; $attribute_weight_query = tep_db_query('SELECT options_values_weight FROM ' . TABLE_PRODUCTS_ATTRIBUTES . ' WHERE products_id=' . (int)$products_id . $where); if (tep_db_num_rows($attribute_weight_query)) { while ($attributes_weight_array = tep_db_fetch_array($attribute_weight_query)) { $attributes_total_weight += $attributes_weight_array['options_values_weight']-$products_weight; } } // end if (tep_db_num_rows($attribute_weight_query)) } // end if (isset($this->contents[$products_id]['attributes'])) // EOF: UPS XML Rates & Services ? Attributes Fix $products_array[] = array('id' => $products_id, 'name' => $products['products_name'], 'model' => $products['products_model'], 'image' => $products['products_image'], 'price' => $products_price, 'quantity' => $this->contents[$products_id]['qty'], // BOF: UPS XML Rates & Services ? Attributes Fix 'weight' => $products['products_weight'] + $attributes_total_weight, // EOF: UPS XML Rates & Services ? Attributes Fix // BOF: UPS XML Rates & Services 'length' => $products['products_length'], 'width' => $products['products_width'], 'height' => $products['products_height'], 'ready_to_ship' => $products['products_ready_to_ship'], // EOF: UPS XML Rates & Services 'final_price' => ($products_price + $attributes_price), //BOF phpmom.com advanced attribute price 'attributes_price' => $attributes_price, //EOF phpmom.com advanced attribute price 'tax_class_id' => $products['products_tax_class_id'], 'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : '')); } } return $products_array; } Maybe my syntax is off. Do I need parentheses around the Thanks again for your help. Corinne
  6. cg-tbear

    New UPS XML Shipping Module available

    Hi again, John, Our site is actually divided up into two parts. We have a normal HTML part and then we have the osCommerce cart. The way our ISP has things set up, its just much easier to put the whole cart onto the SSL cert. It doesn't seem like there are any problems with it. I think it just means the whole thing is secure. Thanks for the input, though. Corinne
  7. cg-tbear

    New UPS XML Shipping Module available

    Hi John, We're not quite out of the woods yet. Feel free to jump in. Corinne
  8. cg-tbear

    New UPS XML Shipping Module available

    Hi Jan, I really appreciate the time you're taking to help me with this. You were right! That fixed it! The $prid thing makes total sense. HallMark referenced it in the attribute fix because it would normally be there, but in my version, it was taken out by the Price Break module. We are sooooo close. The function is adding the original weight to attributes weight. Bear with me on this. In the previous "function calculate()" in the "Add Weight To Product Attributes" module, the author, kumar, gives you the option of adding the weight to the original weight: if(!empty($attribute_price['options_values_weight'])) { $this->weight += ($qty * $attribute_price['options_values_weight']); } or imputting the total weight: if(!empty($attribute_price['options_values_weight'])) { $this->weight += ($qty * $attribute_price['options_values_weight'])-($qty * $products_weight); } I chose the second one. To me, these looks similar to what is in HallMark's fix. It looks like we need to subtract out the original product weight since I did so before. So, if in the "get_products" function I define $products_weight as: $products_weight = $product['products_weight']; Will this code (or something like it) work? if (tep_db_num_rows($attribute_weight_query)) { while ($attributes_weight_array = tep_db_fetch_array($attribute_weight_query)) { $attributes_total_weight += $attributes_weight_array['options_values_weight'] - $products_weight; My syntax could be way off. I am by no means a PHP programmer. Am I at least on the right track? Corinne
  9. cg-tbear

    New UPS XML Shipping Module available

    Hey Jan, It looks like I have a lot of work ahead of me. What a mess! I checked my e-mail and now I have the dreaded TimeInTransit and cURL error messages. I know I've seen those in this thread before, so you don't have to worry about them (for now, anyway). Yeah, I did. Right before I left work yesterday. That particular cart doesn't get a whole lot of business, so I wasn't terribly worried. I just thought it was kind-of funny. I think you may have identified the spot, but its not as easy to fix as you may think. That particular function already had code changes from three other modules, so the code I was supposed to change actually doesn't exist any more in my file. The Price Break module changes it to this: //BOF Price Break Module if ($products = $pf->loadProduct($products_id, $languages_id)) { $products_price = $pf->computePrice($this->contents[$products_id]['qty']); //EOF Price Break Module To me, it looked like they made some kind of function to run through the products, so I was hoping that it would be okay. It seemed to work with the other product modules that I had installed. Here is the whole "get_products" function. You will be able to see what a mess I'm dealing with. function get_products() { global $languages_id; if (!is_array($this->contents)) return false; //BOF Price Break Module $pf = new PriceFormatter; //EOF Price Break Module $products_array = array(); reset($this->contents); while (list($products_id, ) = each($this->contents)) { //BOF Price Break Module if ($products = $pf->loadProduct($products_id, $languages_id)) { $products_price = $pf->computePrice($this->contents[$products_id]['qty']); //EOF Price Break Module //BOF phpmom.com advanced attribute price //hadir $attributes_price = 0; if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'"); $attribute_price = tep_db_fetch_array($attribute_price_query); if ($attribute_price['price_prefix'] == '') { $attributes_price += ($attribute_price['options_values_price']-$products_price); } elseif ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price']; } elseif ($attribute_price['price_prefix'] == '-') { $attributes_price -= $attribute_price['options_values_price']; } } } //EOF phpmom.com advanced attribute price//hadir // BOF: UPS XML Rates & Services ? Attributes Fix // determine total weight of attributes to add to weight of product $attributes_total_weight = 0; if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); $where = ' AND (('; while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $where .= 'options_id=' . $option . ' AND options_values_id=' . $value . ') OR ('; } $where=substr($where, 0, -5) . ')'; $attribute_weight_query = tep_db_query('SELECT options_values_weight FROM ' . TABLE_PRODUCTS_ATTRIBUTES . ' WHERE products_id=' . (int)$prid . $where); if (tep_db_num_rows($attribute_weight_query)) { while ($attributes_weight_array = tep_db_fetch_array($attribute_weight_query)) { $attributes_total_weight += $attributes_weight_array['options_values_weight']; } } // end if (tep_db_num_rows($attribute_weight_query)) } // end if (isset($this->contents[$products_id]['attributes'])) // EOF: UPS XML Rates & Services ? Attributes Fix $products_array[] = array('id' => $products_id, 'name' => $products['products_name'], 'model' => $products['products_model'], 'image' => $products['products_image'], 'price' => $products_price, 'quantity' => $this->contents[$products_id]['qty'], // BOF: UPS XML Rates & Services ? Attributes Fix 'weight' => $products['products_weight'] + $attributes_total_weight, // EOF: UPS XML Rates & Services ? Attributes Fix // BOF: UPS XML Rates & Services 'length' => $products['products_length'], 'width' => $products['products_width'], 'height' => $products['products_height'], 'ready_to_ship' => $products['products_ready_to_ship'], // EOF: UPS XML Rates & Services 'final_price' => ($products_price + $attributes_price), //BOF phpmom.com advanced attribute price 'attributes_price' => $attributes_price, //EOF phpmom.com advanced attribute price 'tax_class_id' => $products['products_tax_class_id'], 'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : '')); } } return $products_array; } Thanks for clearing that up. It makes a little more sense now. So, to sum up - HELP! Corinne
  10. cg-tbear

    New UPS XML Shipping Module available

    Oh, one more thing. The USPS module is calculating the correct weight, so I know all of the information is correct. Its just not getting to the right places in the UPSXML module. Corinne
  11. cg-tbear

    New UPS XML Shipping Module available

    Hi Jan, I checked the database and "products_ready_to_ship" is there. The install also adds several "package_whatever" to the database, but not a "package_ready_to_ship". If that is needed, then it is missing from the install. I did the echo thing. Very interesting. Our cart is live, so if any of the customers see it, they're going to be very confused. Here's what I get with the echo: Array ( [0] => Array ( [id] => 58{2}34 [name] => Case of Cassette Albums: 0+2 & Other Sizes [model] => [image] => binders2.jpg [price] => 99.0000 [quantity] => 1 [weight] => 10 [length] => [width] => [height] => [ready_to_ship] => [final_price] => 77.75 [attributes_price] => -21.25 [tax_class_id] => 1 [attributes] => Array ( [2] => 34 ) ) [1] => Array ( [id] => 29{1}18 [name] => Single Copying Cassettes: C-10 & Other Lengths [model] => [image] => casstape.gif [price] => 0.3900 [quantity] => 5 [weight] => 0.06 [length] => [width] => [height] => [ready_to_ship] => [final_price] => 0.48 [attributes_price] => 0.09 [tax_class_id] => 1 [attributes] => Array ( [1] => 18 ) ) ) As you can see, none of the new fields (L,W,H,RTS) has any information stored in them, so there seems to be some kind of problem with entering the information. Do you know where this would happen? The weight for the cassette albums is wrong (the first array). It should be 20. This item was one from the pulldown menu. The 10 is from the page where you enter all the product information. Also, I just noticed that the module sets a default of 12 for all of the product dimensions. Since we aren't using the box dimensions for calculating, this won't affect anything. Right? Corinne
  12. cg-tbear

    New UPS XML Shipping Module available

    Hi Jan, John, and everyone! I'm back. I was here about a month ago asking about this module. I had some other projects I needed to attend to, but now I need to make this work. I've searched through the pages of this forum from August of last year and I can't find anything. If I've missed it, I apologize. I've installed the latest Feb. 7 version and the Attr w/ weights fix, but I'm still having two problems: First, the Ready-To-Ship option is not working (even though the box is checked), so it puts everything in one box. The second problem I think has to do with the Products Attributes Module. This creates a pulldown list of product options to choose what kind of product you want to put in the cart. For example, if you sell T-shirts the pull down could have the different sizes of S, M, L, & XL. Anyway, in my situation, each item in the pulldown list has a different weight. These items are cases of cassettes and the difference from the smallest case to the largest case is 10 lbs. This messes up the UPS quotes and we really eat it on the shipping. The UPSXML module is only adding the weight that you enter on the original product page and doesn't add the weight from each "attribute" in the pulldown list. The original UPS module that came with the cart had no problem with the attributes weights. Can anyone help? A little info: Cart version - 2.2ms2 Heavily Modded Tare - .03 lbs UPS Shipping Enabled - True Production Mode Dimensions Support - Ready-To-Ship only Handling Fee - Flat Rate, $0.00 Corinne
  13. cg-tbear

    UPSXML problem

    Hi Lobos34, The contribution support thread for this module has several discussions about this issue. You can probably find some help if you do a search on the thread. The search box is at the bottom lower left corner of the page and you have to be logged in to use it. Here is a link to the latest question posted: Gameprodigy's Post #950 - July 18, 2006 Good Luck! Corinne
  14. cg-tbear

    New UPS XML Shipping Module available

    Thanks for the module suggestion, John! I wrote it down on my module wish list for the future. On to coding. Corinne
  15. cg-tbear

    New UPS XML Shipping Module available

    Ted, I felt exactly the same way you did when I read the posts. I was less direct in my response, but you responded wonderfully! Good job! ******************************* Hey All! I spoke to my boss and its a go! I will be installing this module and also USPS Methods (for our international shipping). I have 19 modules already installed, so this could get really tricky if any of the code changes overlap. Wish me luck! Corinne
×