jsm

Members
  • Content count

    37
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jsm

Profile Information

  • Real Name
    James Montgomery
  • Location
    Columbus, MS

Contact Methods

  1. Thanks Jim! That sloved my cart issue too! I went over my install at least 6 times using a compare and merge program and knew it wasn't there, although I didn't know what the problem was. :thumbsup: BTW I started my Mobile Tool Service 5-1-2005 and it's been keeping me so swamped and I haven't had time to do anything but that, but I'll make the time this weekend to finish updating the instructions, now I know it wasn't something I broke. :P Regards, James
  2. Well it seems I broke it.... I've went over this 3 times now, here's what I get: Warning: Division by zero in /includes/classes/vendor_shipping.php on line 93 Warning: Division by zero in includes/classes/vendor_shipping.php on line 94 Also the UPS says: We are unable to obtain a rate quote for UPS shipping. Please contact the store if no other alternative is shown. Any Ideas? James
  3. Hello Jim & Craig, I'm working on instructions for the new update and I have a question about the catalog/checkput_confirmation.php file... I couldn't find any changes! :'( If one of you can look into this I'll be done with them. :D I added a Update.txt file to the package and also need to get one of you two to look thru all of them to make sure I got the info correct. I'll PM both of you to let you know where to download them. In the future if you'll shoot me a copy, I'll gladly update the instructions so when you include them in a release they won't be for a earlier version to avoid filling up the forum and avoid some confusion for some folks. :P Regards, James
  4. Craig & Jim! It lives quite nicely too! You two and the others who have been helping out are doing a Fantastic Job! Keep up the GREAT work! I only wished I could do more to help you guys and if I can ever be of any help, please feel free to call on me. Regards, James
  5. Gladly Craig! Instructions: Step 1. Add the "add-weight-to-product-attributes v0.2" mod as per instructions. Step 2. In catalog/includes/classes/shipping_cart.php (starting at line 328 in stock MVS) make the 3 following changes marked by: "//START: add-weight-to-product-attributes v0.2 into MVS" // Add/subtract attributes prices (if any) if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); foreach ($this->contents[$products_id]['attributes'] as $option => $value) { $attribute_price_query = tep_db_query("select options_values_price, //START: add-weight-to-product-attributes v0.2 into MVS price_prefix, options_values_weight //END: add-weight-to-product-attributes v0.2 into MVS 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'] == '+') { $this->vendor_shipping[$vendors_id]['cost'] += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); //START: add-weight-to-product-attributes v0.2 into MVS $this->vendor_shipping[$vendors_id]['weight'] += ($quantity * $attribute_price['options_values_weight']); //END: add-weight-to-product-attributes v0.2 into MVS } else { $this->vendor_shipping[$vendors_id]['cost'] -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); //START: add-weight-to-product-attributes v0.2 into MVS $this->vendor_shipping[$vendors_id]['weight'] -= ($quantity * $attribute_price['options_values_weight']); //END: add-weight-to-product-attributes v0.2 into MVS } } } } return $this->vendor_shipping; } //MVS End Enjoy! James
  6. I just noticed your followup post... I had it as you first posted it and was working fine, so I made the changes below, retested it, but seems to have no affect. Works either way. :huh: $this->vendor_shipping[$vendors_id]['cost'] += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); $this->vendor_shipping[$vendors_id]['weight'] += ($quantity * $attribute_price['options_values_weight']); Thanks Again, James
  7. Thanks Jim! Tested and Working like a charm! :thumbsup: All of my Items I'm using this for is price breaks for quantity orders, like a single peice or half case or case, so this works perfect for me. Saves me from having to list the same item 3 different times...lol Thanks again Jim! James
  8. Hello Jim & Craig, I'm trying to get the "add-weight-to-product-attributes v0.2" mod to work with MVS. I've added the mod and it's returning the product quantity price just fine, but I'm having a problem with the quaitity weight being added to the cart. I think my problem is in the catalog/includes/classes/shopping_cart.php I've added the code into this file as instructed by the add-weight-to-product-attributes mod and I also realize that in the MVS mod also address "Add/subtract attributes prices (if any)" in the code below. // attributes price if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { //START: add-weight-to-product-attributes v0.2 $attribute_price_query = tep_db_query("select options_values_price, price_prefix, options_values_weight from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'"); //END: add-weight-to-product-attributes v0.2 $attribute_price = tep_db_fetch_array($attribute_price_query); if ($attribute_price['price_prefix'] == '+') { $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } else { $this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } //START: add-weight-to-product-attributes v0.2 if(!empty($attribute_price['options_values_weight'])) { $this->weight += ($qty * $attribute_price['options_values_weight']); } //if(!empty($attribute_price['options_values_weight'])) { //END: add-weight-to-product-attributes v0.2 } } } } ////// //MVS Start // New method to provide cost, weight, quantity, and product IDs by vendor ////// //Output array structure (example): //shoppingcart Object //( // [vendor_shipping] => array // ( // [0] => array //Number is the vendor_id // ( // [weight] => 22.59 // [cost] => 12.95 // [qty] => 2 // [products_id] => array // ( // [0] => 12 // [1] => 47 // ) // ) // [12] => array // ( // [weight] => 32.74 // [cost] => 109.59 // [qty] => 5 // [products_id] => array // ( // [0] => 2 // [1] => 3 // [2] => 37 // [3] => 49 // ) // ) // ) //) function vendor_shipping() { if (!is_array($this->contents)) return 0; //Cart is empty $this->vendor_shipping = array(); //Initialize the output array reset($this->contents); // and reset the input array foreach ($this->contents as $products_id => $value) { //$value is never used $quantity = $this->contents[$products_id]['qty']; $products_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight, vendors_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'" ); if ($products = tep_db_fetch_array($products_query)) { $products_price = $products['products_price']; $products_weight = $products['products_weight']; $vendors_id = ($products['vendors_id'] <= 0) ? 1 : $products['vendors_id']; $products_tax = tep_get_tax_rate($products['products_tax_class_id']); //Find special prices (if any) $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$products_id . "' and status = '1'" ); if (tep_db_num_rows ($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } //Add values to the output array $this->vendor_shipping[$vendors_id]['weight'] += ($quantity * $products_weight); $this->vendor_shipping[$vendors_id]['cost'] += tep_add_tax($products_price, $products_tax) * $quantity; $this->vendor_shipping[$vendors_id]['qty'] += $quantity; $this->vendor_shipping[$vendors_id]['products_id'][] = $products_id; //There can be more than one product } // Add/subtract attributes prices (if any) if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); foreach ($this->contents[$products_id]['attributes'] as $option => $value) { $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'] == '+') { $this->vendor_shipping[$vendors_id]['cost'] += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } else { $this->vendor_shipping[$vendors_id]['cost'] -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } } } } return $this->vendor_shipping; } //MVS End My attempt to do this in the MVS section is: // Add/subtract attributes prices (if any) 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, options_values_weight from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' 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'] == '+') { $this->vendor_shipping[$vendors_id]['cost'] += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } else { $this->vendor_shipping[$vendors_id]['cost'] -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); //START: add-weight-to-product-attributes mod: } if(!empty($attribute_price['options_values_weight'])) { $this->weight += ($qty * $attribute_price['options_values_weight']); } //END: if(!empty($attribute_price['options_values_weight'])) { } } } } return $this->vendor_shipping; } //MVS End I know you guys are busy trying to get a final release, but maybe someone else can give me a hand with this. James
  9. Hi All, Sorry for the earlier post, I finaly found my problem, Was doing a compare and mege on the admin/includes/functions/general.php file and I put the code in... But I finally realized I put it in the wrong place! All's working well again, Sorry for bothering anyone, and thanks For your GREAT work on this contrib Jack! Regards, James
  10. Hi All, Well, this problem does exsist in both of my stores, I have no problem adding 1 Product Attribute, but when I try to add a second one, even if it's on a different product, I receive the error. Thanks, James
  11. Hi All, I've ben beating my brains on a problem I'm getting and I have 2 identical modified stores and all is fine on one store but the other in product attribures I can add the first one just fine but when I try to add a second one I receive this warning: Fatal error: Cannot redeclare tep_get_products_head_title_tag() (previously declared in /home/gtrmall/public_html/steelesenterprises/admin/includes/functions/general.php:530) in /home/admin/includes/functions/general.php on line 530 I've even copied the entire files minus just the config files from my store that's working, copied over to this store and I still have the same result :( It's probally something simple, but I just can't see it, maybe someone can lead me in the right direction. Thanks, James
  12. Hey Jim, Forget my previous post, I have now found out in order to set the "Handling Fee" I must set it in both the "Vendor Admin" and also in the "UPS" mod as well. :'( Sorry for the Brain Fart! Thanks, James
  13. Hi Jim, I figured it out... lol... If you set the fee in the "Vendor Admin" It works great! I guess it's just a little confusing for the "Handling Fee" being in the ups module as well. Maybe a good idea to remove the printed section "Handling Fee" Option in the ups mod so others won't get confused. I looked but couln't figure how to remove it. Regards, James
  14. Hi Jim, Yea I was having problems also but thought I just didn't have the proper "UPS Pickup Method" set properly. I made the corrections to the ups mod from your earlier post and seems to be getting the proper shipping amounts now. :thumbsup: But now I've noticed something else, 1 vendor I use has a 1.99 Handling Fee, so I set the fee in admin under the proper vendor in ups, but it's not applying the fee durning the checkout process. :( Regards, James
  15. Thanks Craig, You was right I somehow missed the edit in html_output.php and I used a compare & merge program again this morning on the invoice.php and still had the same results.... so I just overwrote it from the file and everything works well now! Sorry for being a pain! Thanks, James