Jump to content

Tanaka

Members
  • Content count

    16
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Joseph
  • Location
    St.Cloud, MN (USA)
  • Website
  1. Tanaka

    Multi_Vendor_Shipping new thread

    Hello everyone! I was using this module and suddenly I found out that after an order is placed, I can't seem what shipping methods were used for that order (it just shows up as 'combined shipping'). This is a really bad thing because when I print the order invoice, I don't know how to ship the products. Am I missing a setting somewhere? I am currently using 0.9rc2.1. I looked at the newer versions but couldn't tell if this was something that has been fixed/changed. Thanks in advance for all the help, Joseph
  2. Hello, This modification is ONLY for the code around line 196. This is because it effects the functionality of the percentage discount. The fixed discount is not effected by this bug (as far as I can tell). If you are wondering what it should look like in the end, after all the bug fixes I submitted, look at the contribution homepage. I uploaded my updated ot_coupon.php file there. If you have questions, I'll get back to you faster if you e-mail me (I don't check the boards very often). Regards, Joseph
  3. Hello once again, This is the next bug fix. When calculating the correct tax deduction (when tax needs to be recalculated), if a product was in a valid subcategory, the discount applied but the tax was not deducted. This change in code fixes that. Changes applied to /includes/modules/order_total/ot_coupon.php around line 257 Original code: if ($get_result['restrict_to_categories']) { $cat_ids = split("[,]", $get_result['restrict_to_categories']); for ($c = 0; $c < sizeof($cat_ids); $c++) { $cat_query = tep_db_query("select products_id from products_to_categories where products_id = '" . $products_id . "' and categories_id = '" . $cat_ids[$i] . "'"); if (tep_db_num_rows($cat_query) !=0 ) $valid_product = true; } } New code: if ($get_result['restrict_to_categories']) { // Tanaka 2005-4-30: Original Code /*$cat_ids = split("[,]", $get_result['restrict_to_categories']); for ($c = 0; $c < sizeof($cat_ids); $c++) { $cat_query = tep_db_query("select products_id from products_to_categories where products_id = '" . $products_id . "' and categories_id = '" . $cat_ids[$i] . "'"); if (tep_db_num_rows($cat_query) !=0 ) $valid_product = true; }*/ // Tanaka 2005-4-30: New code, this correctly identifies valid products in subcategories $cat_ids = split("[,]", $get_result['restrict_to_categories']); $my_path = tep_get_product_path($t_prid); $sub_cat_ids = split("[_]", $my_path); for ($iii = 0; $iii < count($sub_cat_ids); $iii++) { for ($ii = 0; $ii < count($cat_ids); $ii++) { if ($sub_cat_ids[$iii] == $cat_ids[$ii]) { $valid_product = true; continue 2; } } } } Regards, Joseph
  4. Hello again, This time there is a bug that double counts the percentage discount for products in subcategories if both the parent category and the subcategory are listed in the valid category list. Lets give an example so people understand: This is the category tree: Stuff (cat_id 1) -More Stuff (cat_id 2) -Even More Stuff (cat_id 3) -Product X Now if we have a valid category list that consists of: 1, 2, 3 Then any products in More Stuff or Even More Stuff will get discounted twice (for a 10% discount, each product actually gets a 20% discount). This is BAD. To fix this, we need to add/change the following lines to the /includes/modules/order_total/ot_coupon.php file Original code around line 196 $pod_amount = round($pr_c*10)/10*$c_deduct/100; $od_amount = $od_amount + $pod_amount; } else { $od_amount = $c_deduct; } Modified code: $pod_amount = round($pr_c*10)/10*$c_deduct/100; $od_amount = $od_amount + $pod_amount; continue 3; // Tanaka 2005-4-30: to prevent double counting of a product discount } else { $od_amount = $c_deduct; continue 3; // Tanaka 2005-4-30: to prevent double counting of a product discount } Only 2 new short lines are needed. There is also a bug with the tax deduction. These tax deductions are only applied if the product is in one of the categories listed, not in a sub-category. Next post should show how to fix this. Regards, Joseph
  5. Hello everyone, Its time to fix some bugs: First of all, the problem I mention with the tax not being deducted from products if they are in restricted categories: To fix this, we replace line 258 in /includes/modules/order_total/ot_coupon.php original: $cat_query = tep_db_query("select products_id from products_to_categories where products_id = '" . $products_id . "' and categories_id = '" . $cat_ids[$i] . "'"); New line: $cat_query = tep_db_query("select products_id from products_to_categories where products_id = '" . $t_prid . "' and categories_id = '" . $cat_ids[$c] . "'"); Also, if anyone is using a Tax Exempt Module, I can show them how to incorporate this module with the tax exempt one (if they are having trouble). Hopefully more bug fixes to come.... Joseph
  6. Hello everyone! I just installed 5.13 (upgraded from a really old version) and almost everything works perfectly. The bug that is bothering me right now is this: If you create a discount coupon that is restricted to certain categories, it seems that the tax IS NOT recalculated after applying the discount (and yes, the tax recalculation is set to 'standard'). Like so: Sub-Total: $13.00 Discount Coupons:test1234: -$1.30 Sales Tax: $0.91 (THIS IS WRONG!!!!!!!!!) First-Class Mail: $2.60 Total: $15.21 However, if you create a coupon that has the same discount (10%) and do not restrict the categories, the tax is recalculated perfectly. And yes, the product being purchased is in one of the categories. Later tonight I'll look at the specific code and hopefully post a fix. I just thought I'd let everyone know what I found first. Regards, Joseph
  7. Tanaka

    Multi_Vendor_Shipping new thread

    Jim, After looking at the code for a while, isn't this more of what we want? $vendors_data_query = tep_db_query("select v.vendor_country, v.vendors_zipcode from " . TABLE_VENDORS . " v, " . TABLE_COUNTRIES . " c where v.vendors_id = '" . (int)$vendors_id . "' and v.vendor_country = c.countries_id" ); $vendors_data = tep_db_fetch_array($vendors_data_query); This gives us the numeric country ID (which is what we need to use for the USPS module). Then we can replace SHIPPING_ORIGIN_COUNTRY with $vendors_data[vendor_country] Let me know if I'm missing/overlooking something. Joseph
  8. Tanaka

    Multi_Vendor_Shipping new thread

    There is a small typo in the replacement code. It should be this: $vendors_data_query = tep_db_query("select c.countries_iso_code_2 as vendor_country, v.vendors_zipcode from " . TABLE_VENDORS . " v, " . TABLE_COUNTRIES . " c where v.vendors_id = '" . (int)$vendors_id . "' and c.countries_id = v.vendor_country" ); The typo is the 'c' was on the wrong side of the quotation mark in the 4th line. Joseph
  9. Tanaka

    Multi_Vendor_Shipping new thread

    Jim, Unfortunately, I have break your advice as well. I have a heavily modified site for a client that needs a TINY bit of the functionality that this module provides. I'm skilled enough at module hacking that any problems I run into should be quickly fixed. Anyways, if I run into anything that I can fix, I'll let you guys know. Keep up the great work! Joseph
  10. Tanaka

    Multi_Vendor_Shipping new thread

    Hello all, Great work on this module, it seems to be shaping up very well, and also is going to be a great addition to oscommerce. I'm curious when the next beta release/release canidate will be packaged up. Is there a chance it will be before March 31st? If so, then great! If not, no problems, I'll just have to do more legwork. Thanks, Joseph
  11. Tanaka

    EFSNet CVV2

    How large is the demand for this? I can add the CVV2 stuff to the code. I'm currently going to add gift cards to the code, so they can be redeemed online as well. Please let me know how many people need/want the CVV2 and the gift card code. You can contact me at j w dalton aT g mail. com Thanks, Joseph
  12. Does anyone out there need a EFSnet Payment module? (for EFSnet merchant accounts) I have created one (and it works!), but I was wondering if there was any demand to post it quickly, rather than clean up the code so its 'perfect' before posting it. Let me know, Joseph
  13. I was running all around this post and the forum looking for that tidbit. I could not figure out why it was not showing the checkbox. I was just about to delve into order_totals.php myself, thankfully I didn't have to do that! This fixes the checkbox not showing up (one of the .= was actually a = in the file) Thanks!
×