Jump to content

insaini

Members
  • Content count

    207
  • Joined

  • Last visited

Everything posted by insaini

  1. insaini

    NEW! Complete Order Editing Tool!

    ok the handling fee in your shipping module .. in the customer side that is simply added to the cost of shipping.. in the admin side it will do the same.. the Handling Fee input box is for an additional handling fee if you want add an additional fee if any. However when your shipping module quotes you.. if you have a handling fee set in the module.. this fee should be added to the cost of shipping.. likewise if you have it set to include taxes in the price of shipping.. taxes on shipping wouldnt be calculated.. The only problem I believe is that your not getting it to quote you correctly.. ive done a few changes since 4.0.1.1 ill list them here in a few minutes
  2. insaini

    NEW! Complete Order Editing Tool!

    Well I havent changed any other adminfunctions even though they are a little different from the catalog ones. Can you try this.. disable your custom shipping module and use the flat fee module that comes with OSC. Try and check first to see if adding products calculates all the fields correctly. I will check the handling fee.
  3. insaini

    NEW! Complete Order Editing Tool!

    Hi Mike, this was something I forgot to remove which was specific to my shipping module. edit oe_order.php you will see online 113 (around there) p.products_weight_type, p.products_dim_type, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship, remove this section as well as on line 136 (around there) 'weight_type' => $products['products_weight_type'], 'dim_type' => $products['products_dim_type'], 'length' => $products['products_length'], 'width' => $products['products_width'], 'height' => $products['products_height'], 'ready_to_ship' => $products['products_ready_to_ship'], remove this section as well
  4. insaini

    NEW! Complete Order Editing Tool!

    ok first find this if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } and change to if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country_id'], $order->delivery['zone_id']); } --------------- it seems I also am not setting the $total_weight correctly.. its a global variable but doesnt appear until after the code has requested a quote.. open your edit_orders.php file and place this under line 37 if (isset($_POST['total_order_weight'])) { $total_weight = $_POST['total_order_weight']; } else { $total_weight = 0; } Let me know how this works out. J
  5. insaini

    NEW! Complete Order Editing Tool!

    Are you testing this with a domestic delivery or international delivery? according to the code sample you posted the last bit was just for international so i dont know if you modified the bit for domestic or not.. can you post the entire Quote function from your shipping module so I can have a closer look.. a screen shot of what you are seeing would be helpful as well
  6. insaini

    NEW! Complete Order Editing Tool!

    Sorry change all those 'iso_code_2' to 'countries_iso_code_2' everywhere
  7. insaini

    NEW! Complete Order Editing Tool!

    yup.. do you see the part above $dest_country = $order->delivery['country']['iso_code_2']; change that to $dest_country_array = tep_get_countries_iso($order->delivery['country_id'], true); $dest_country = $dest_country_array['iso_code_2']; -------------------- change this // ONLY Other countries AUS HIDE if ($order->delivery['country']['iso_code_2'] <> 'AU') { to // ONLY Other countries AUS HIDE if ($dest_country_array['iso_code_2'] <> 'AU') { ------------------- Find this $frompcode = MODULE_SHIPPING_AUSPOSTAIR_SPCODE; $topcode = $order->delivery['postcode']; $dest_country=$order->delivery['country']['iso_code_2']; AND remove the last line (just delete that last line) ------------- ALSO in your class function at the top you have this line near the middle MODULE_SHIPPING_AUSPOSTAIR_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); Change this to MODULE_SHIPPING_AUSPOSTAIR_ZONE . "' and zone_country_id = '" . $order->delivery['country_id'] . "' order by zone_id"); basically you change $order->delivery['country']['id] to $order->delivery['country_id'] ----------------- it seems like there may be a bit more code in your quote function that might need to be changed..
  8. insaini

    NEW! Complete Order Editing Tool!

    Slight update guys you can choose to do it or not it doesnt change anything besides cut down on some sql queries.. Fine near line 1826 <td class="dataTableContent" valign="top"><?php echo tep_draw_pull_down_menu('update_customer_country_id', tep_get_countries(), tep_get_country_id($order->customer['country']), 'onchange="update_zone(this.form, \'update_customer_country_id\', \'update_customer_zone_id\', \'customerStateInput\', \'customerStateMenu\');"'); ?></td> Change to: <td class="dataTableContent" valign="top"><?php echo tep_draw_pull_down_menu('update_customer_country_id', tep_get_countries(), $order->customer['country_id'], 'onchange="update_zone(this.form, \'update_customer_country_id\', \'update_customer_zone_id\', \'customerStateInput\', \'customerStateMenu\');"'); ?></td> ------------------------------------------------------ The change? tep_get_country_id($order->customer['country']) => $order->customer['country_id'] no need for that function call when the id already exists.. better to just use it.. there are two other places this occurs.. so just do a search and change it up.. they all happen below line 1826 again upto you if you want to or not... but better that you do imo J
  9. insaini

    NEW! Complete Order Editing Tool!

    Great, believe it or not I knew you would get this error. It seems that the developers didnt consider it a possibility that in the admin section you would ever create orders or update any shipping methods or need real-time quotes. So you have inconsistent functions between catalog/includes/general.php and admin/includes/general.php for example in catalog/includes/general.php you have a function which returns the country with its iso code.. the same function in admin doesnt.. this is the problem. I have added the custom function in admin/includes/oe_functions.php the function is tep_get_countries_iso you have to go into your shipping module (the ones that keep saying cannot determine or calculate) ... go to the quote method in the module and find this bit of code $country_name = tep_get_countries(STORE_COUNTRY, true); $this->_canadapostOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']); $this->_canadapostDest($order->delivery['city'], $order->delivery['state'], $order->delivery['country']['countries_iso_code_2'],$order->delivery['postcode']); and change it to $country_name = tep_get_countries_iso(STORE_COUNTRY, true); $dest_country_name = tep_get_countries_iso(tep_get_country_id($order->delivery['country']), true); $this->_canadapostOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']); $this->_canadapostDest($order->delivery['city'], $order->delivery['state'], $dest_country_name['countries_iso_code_2'],$order->delivery['postcode']); (the canadapost is specific to my canada post module hence you have it there) .. you will need to change this accordingly to shipping modules) and again.. that should do it =D J
  10. insaini

    NEW! Complete Order Editing Tool!

    DOH! I missed a crucial edit I had this in application_top.php under admin/includes should have been placed in the edit_orders.php file.. look for require(DIR_WS_FUNCTIONS . 'oe_functions.php'); require(DIR_WS_CLASSES . 'oe_order.php'); around line 24 and place this below it // include order cart class require(DIR_WS_CLASSES . 'order_cart.php'); this should resolve that issue.. sorry about that guys.
  11. insaini

    NEW! Complete Order Editing Tool!

    seems like you didnt copy the order_cart.php file to your admin/includes/classes folder check to see if its there.. that should resolve this issue.
  12. insaini

    NEW! Complete Order Editing Tool!

    I hope I didnt trash the code too much B)
  13. insaini

    NEW! Complete Order Editing Tool!

    Im pretty sure that was the problem.. infact it looks like you only really need the flat.php shipping module because you seem to have that installed... but again.. any shipping module you install needs to be installed in both Admin and Catalog if you want to use the shipping module with the order editor
  14. insaini

    NEW! Complete Order Editing Tool!

    Hi Mike, yeah I guess I should have put this in the install.txt as well.. you need to copy over the shipping modules from catalog/includes/modules/shipping to admin/includes/modules/shipping there is no directory for shipping modules under admin so just copy the whole shipping folder into admin/includes/modules likewise copy over all the language files for the shipping modules from catalog/includes/languages/english/modules/shipping to admin/includes/languages/english/modules/shipping This should fix the error. J
  15. insaini

    NEW! Complete Order Editing Tool!

    I did some minor corrections to the code and slight updates. Im done at 4.0.1.1. Check the contribution page. Ive also included the upgrade documentation. Would appreciate testing by anyone. Thanks J
  16. insaini

    NEW! Complete Order Editing Tool!

    heh well I guess I should have read this post before posting :blink: I just finished uploading it as 4.0 Alpha http://www.oscommerce.com/community/contributions,1435 no upgrade documentation has been included as of yet. This release assumes a fresh install of OSC 2.2RC1 The Manual Order Maker (sorry not Creator) was combined because it seemed to make sense that both really do go hand in hand.. but i guess thats open to interpretation. I look forward to your version and definitely would be best to merge the best features of each. =D J
  17. insaini

    NEW! Complete Order Editing Tool!

    :thumbsup: Were on track, take a look at the image below just to go through how the numbers add up, the shipping charge + handling fee is taxed according to the shipping taxes (neither are added to the subtotal) the subtotal is a products subtotal. You can see the shipping taxes charged on the shipping + handling fees then you see the taxes charged on the products.... finally you see an after tax discount add up everything and you have your total. =D hope to have this up for everyone to test in a couple days. J
  18. insaini

    NEW! Complete Order Editing Tool!

    Just an update on my modifications.. shipping quotes now working in real-time. However the cost of the shipping method you choose has to be entered manually. Im working on this as I type.. this can be fixed by javascript im sure but you will still need to hit update to update the totals. As soon as you enter a value into the delivery field and hit update it will calculate taxes on that separately and display those separately as well. I have removed the update button below the delivery field because it wasnt necessary. I have included two new check boxes.. one to request shipping quotes and one to finalize your order and process payment (still to be implemented). When you click request shipping quotes and hit update. Shipping quotes will be fetched in real-time and displayed. Products must also be added inorder for the quotes to be fetched. I added the checkbox so that it doesnt request a quote as soon as you add a product.. that would be too much lag each time you add a product. when you finalize the order, as it stands now it takes you to the details page.. but once implemented it will process your payment via your payment module and then take you to the details page. I will release all these modifications in a new contribution in a couple days.. I still havent had time to document all the changes.. and there are a lot of changes to the original code. It will be released as 4.0alpha1 (without payment module implementation). If anyone thinks I shouldnt release it via this version number let me know. J
  19. insaini

    NEW! Complete Order Editing Tool!

    I have just finished integrating the shipping module. I have removed the 'Tax%' heading for shipping tax. Renamed the section to 'Shipping' .. changed the Shipping Tax field to Handling Charge and included a button to update the shipping charge when ready. I only have the one shipping module so this will need to be tested by others. I will try to get this up for others to try by the end of today. There is quite a bit of modification so I am suggesting people just replace the files and add in their custom mods to the new code as it is very different in some places. J
  20. insaini

    NEW! Complete Order Editing Tool!

    Yes you shouldnt need to charge a shipping tax.. this has been updated in my code as well. I hope to have something up by end of today.
  21. insaini

    NEW! Complete Order Editing Tool!

    I will do a comparison to the original from i believe 3.0.2.1 .. to my versions. I will document the changes. There are several files with specific changes.. its interesting that there are some files under admin/includes that are older versions than those of catalog/includes. Specifically shopping_cart.php is under admin/ is an older version. These need to be replaced with the 'newer' versions. As well as certain functions which are not up to date. Not sure why these werent updated in RC1 .. doesnt make sense but ah well. I will continue to work on it.. and should have something to post in a couple days.
  22. insaini

    NEW! Complete Order Editing Tool!

    Update: Code has been cleaned up and the semantics have been improved. I have removed the Tax: field completely. It will automatically add itself as a named tax once a product is added if it is taxable. It will be updated when another product is added or when the update button is pressed. If your customer is outside of the country you generally don't charge tax and there for it has no need to be on the invoice. I have provided the screen shots below. The customer here is in the US. My Store is located in Canada. No products added: products added: Now a customer located in Ontario (same as the store). products added: you can see the GST and PST. This works for compounded taxes as well. So for you Quebecois it should work fine. I have also gone ahead and integrated the shopping cart (purpose of this is to be able to get realtime shipping quotes.. the prices saved in the cart will not reflect Single Pricing Per Customer or pricing changes in the invoice edit form.. however this is irrelevant as the carts only purpose is to help in providing a shipping quote. The cart is emptied and deleted once the order is complete.) Shipping Module was not yet integrated so I am still working on that. There are still three places for custom charges / discounts. I am thinking about removing the shipping tax field and just putting Handling Charge as a value instead of percentage. realtime quote from Canada Post does not include taxes.. upon receiving that quote the system will add in taxes.. which should display below GST and PST .. respectfully GST SHIPPING and PST SHIPPING .. (the taxes I have setup) .. My Order Editor includes the Manual Order Creator contribution and its basically now fully interconnected as far as im concerned should be one package / contribution. I have not uploaded this version just yet. I will once realtime shipping quotes are functioning J
  23. insaini

    NEW! Complete Order Editing Tool!

    Hey all, Ive been going through this code and there are some coding flaws in the code.. im working on cleaning it up right now.. for instance the bizarro code.. totally unnecessary.. it stems from the variable $order being overwritten by an array of a different type. Near the top of the file you have $order = new oe_order($oID); or something like this.. then around like 300 you have $order = tep_db_fetch... .. whats even more interesting is $order is never used inbetween .. nor does $order need to = new oe_order($oID); .. this only needs to happen once the Order has been updated. Ive renamed $order (at about line 300) to $orders_product .. because this makes more sense in its context. I am also interested in adding the actual shipping and payment modules so that they function exactly like the customer checkout. I am currently working on cleaning up the code and displaying taxes individually. I prefer this for the invoice as well. Next I will try and integrate the shopping cart (or some of its code) to the 'add product' case .. this will allow the use of the shipping module easily which will come next. I also propose that the shipping details only be updated once all products wanted have been added. Thus a "Calculate Shipping" button which will call your shipping modules and give you the options. Next once you have basically finalized your order that you MUST click a "Finalize Order" button. Which in turn will allow your payment module to be activated. Your payment module can also have a "Verify Payment" button if its credit card / online debit / etc.. and once approved "Save Order" instead of just update order buttons =D How does this sound to everyone else?? J
  24. insaini

    Seperate Pricing Per Customer v3.5

    Hey all, this is a great contribution.. im implementing it right now for RC1. For the most part its working just fine however I have found some problems maybe you guys can help me with Im getting this error: 1054 - Unknown column 'p.products_id' in 'on clause' select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials_retail_prices s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '10' Ive traced it to this code.. in catalog/index.php // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; /* $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; */ } // end else { // either retail... // EOF Separate Pricing per Customer Now the second $listing_sql in the else which is commented out is the original line of code for that part .. if I replace the new line (right above it) with the original.. the page loads just fine.. if I use the new line of code.. it gives that error. This section of code provided is the last part of the last modification for catalog/index.php for a new installation of SPPC 4.1.6 any ideas? im thinking all that needs to be done is to use the original.. and change where it says TABLE_SPECIALS to TABLE_SPECIALS_RETAIL_PRICES .. ive tried this it works just fine.. but just thought id clarify with everyone else. AND it seems that this needs to be done in every else section of code (there are 4 $listing_sql = ) where this needs to be done i believe J
  25. insaini

    Tax displayed on seperate lines

    Hey all, I have done some modifications to display the taxes on separate lines. So far it is working good although it still doesnt work for Quebec (Compounded Taxes) or for Taxes included with the price of the product. I will work on these time permitting. Here is a link http://www.oscommerce.com/community/contributions,5279
×