♥Dan Cole Posted May 21, 2017 Share Posted May 21, 2017 Eveline....I'm not sure if you fully resolved your issues or not but you can also install the compatibility add on which will resolve these missing filenames for any of the older add-ons. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Denkster Posted May 21, 2017 Share Posted May 21, 2017 7 hours ago, Dan Cole said: Eveline....I'm not sure if you fully resolved your issues or not but you can also install the compatibility add on which will resolve these missing filenames for any of the older add-ons. Dan Hi Dan, Thank you, yes, I know about the compatibility add-on. But I reckon it is not very nice to name a contribution " ..for_2.3.4_BS" and still need a compatibility add-on. The version v1.2.4.1 of this (Order editor) contribution is not really old, is it? So I started to replace the FILENAME_.. and DIR_WS... occurrences as good as I could. Until now I did not have issues with the items that I could not replace FILENAME_EMAIL_STATUS, FILENAME_EMAIL_ORDER_TEXT, FILENAME_ORDERS_LABEL, FILENAME_GOOGLE_MAP I did not find these names in the compatibility add-on anyway. I checked http://addons.oscommerce.com/info/9506 "Add-On Compatibility support for OsCommerce 2.3.4 BS EDGE versions since September 2016" I suppose above mentioned file names have effect only with a contribution which I do not use? Thanks for caring! Eveline 7844_Denkster_3th_corrections on 7844_Order_editor_for_2.3.4BS.zip Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted May 21, 2017 Share Posted May 21, 2017 I think all that is trying to say is it wasn't needed in prior versions of EDGE or Gold but in any case, if you got it working that is all that matters. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Denkster Posted May 21, 2017 Share Posted May 21, 2017 2 minutes ago, Dan Cole said: I think all that I was trying to say is it wasn't needed in prior versions of EDGE or Gold but in any case, if you got it working that is all that matters. Dan Hi Dan, Yes, you are right, I have got it working now. Translations for those: FILENAME_EMAIL_STATUS, FILENAME_EMAIL_ORDER_TEXT, FILENAME_ORDERS_LABEL, FILENAME_GOOGLE_MAP are not required, it seems. What do you think, should I post my version of the package (as a full package for order editor) to http://addons.oscommerce.com/info/7844 ? Eveline Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted May 21, 2017 Share Posted May 21, 2017 It can't hurt....go for it. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Denkster Posted May 27, 2017 Share Posted May 27, 2017 On 22-5-2017 at 0:51 AM, Dan Cole said: It can't hurt....go for it. I want to do it right.. Made mistakes before.. Can you please explain what the purpose is of statements like this: <?php if (FILENAME_GOOGLE_MAP !== 'FILENAME_GOOGLE_MAP' ) { ?> Thanks in advance.. Eveline Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted May 27, 2017 Share Posted May 27, 2017 The test looks a little odd to me but in any case it looks like it was added along the way to support a Google Map Add on. I don't use that addon so I really don't know anything about what it's purpose is....I'm guessing that it will show or give you directions to the delivery address. But that is just a guess on my part. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Denkster Posted May 30, 2017 Share Posted May 30, 2017 On 27-5-2017 at 6:53 PM, Dan Cole said: The test looks a little odd to me but in any case it looks like it was added along the way to support a Google Map Add on. I don't use that addon so I really don't know anything about what it's purpose is....I'm guessing that it will show or give you directions to the delivery address. But that is just a guess on my part. Dan Thanks Dan, Apart from the purpose of the unknown add on it seems to be related to, I was wondering how a statement like this was meant to work: if (FILENAME_EMAIL_STATUS !== 'FILENAME_EMAIL_STATUS' ) { I guess it checks if the variable FILENAME_EMAIL_STATUS is defined? How would that work in the new situation, where filenames are no longer represented with variables, but hard coded? Eveline Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted May 31, 2017 Share Posted May 31, 2017 I think the second part would just be hard coded so 'FILENAME_EMAIL_STATUS' would become something like email_status.php or whatever the filename was suppose to be. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Denkster Posted June 3, 2017 Share Posted June 3, 2017 On 31-5-2017 at 0:46 AM, Denkster said: Thanks Dan, Apart from the purpose of the unknown add on it seems to be related to, I was wondering how a statement like this was meant to work: if (FILENAME_EMAIL_STATUS !== 'FILENAME_EMAIL_STATUS' ) { I guess it checks if the variable FILENAME_EMAIL_STATUS is defined? How would that work in the new situation, where filenames are no longer represented with variables, but hard coded? On 31-5-2017 at 4:06 AM, Dan Cole said: I think the second part would just be hard coded so 'FILENAME_EMAIL_STATUS' would become something like email_status.php or whatever the filename was suppose to be. You mean the code would become: if (FILENAME_EMAIL_STATUS !== 'email_status.php') { Sorry, I don't want to be a nuisance, I may just be stupid, but I still don't get it. Suppose filenames are no longer defined. In that case the variable FILENAME_EMAIL_STATUS is supposed to not be in use anywhere. It is meaningless. What would be the meaning of the above code then? Wouldn't it be better to use something like this: if ( file_exists('email_status.php') ) { Or am I missing the point again? Eveline Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted June 4, 2017 Share Posted June 4, 2017 Eveline...like I said in my first note the test looks a bit odd to me. You'll need to look at the code to see if you can figure out what the author intended but it just looks like a test to see if the define is set....if so it probably then tests to see if the contribution is enable and if so it is executed....if not it likely does something else....likely what the original code was intended to do in the first place. Could it be done in a different way?...most likely. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Denkster Posted June 4, 2017 Share Posted June 4, 2017 (edited) Ok Dan, I can agree and will go with your explanation. I found 8 occurrences of this odd test. If I look at the occurrences where I recognize the file name, I see that the code is intended to place a button on screen, with a link to the file mentioned in the test. So I will assume that the test is meant to check if the corresponding file (and hopefully the module) exists.. Thanks for guiding me through the discovery process. Eveline Edited June 4, 2017 by Denkster Quote Link to comment Share on other sites More sharing options...
Denkster Posted June 4, 2017 Share Posted June 4, 2017 The next problem... When I open an order for editing I get a URL like this: ../edit_orders.php?page=1&oID=1695&action=edit I normally find four order total lines on that page. Having changed NOTHING, When I click on the update button below the order total lines the system updates the order in a very peculiar way.I get an extra set of 4 order total lines, identical to the set of 4 which I already had! When I click once again, 4 more order total lines appear! Is this a known problem? I checked the parse time log, these queries are executed: 04/06/2017 19:12:33 [QUERY] DELETE FROM orders_total WHERE orders_id = '1695' 04/06/2017 19:12:33 [QUERY] insert into orders_total (orders_id, title, text, value, class, sort_order) values ('1695', 'Zone tarieven (Naar NL : 165 kg):', '€ 7,20', '7.2', 'ot_shipping', '1') 04/06/2017 19:12:33 [QUERY] insert into orders_total (orders_id, title, text, value, class, sort_order) values ('1695', 'BTW hoog:', '€ 3,85', '3.8528937768595', 'ot_tax', '2') 04/06/2017 19:12:33 [QUERY] insert into orders_total (orders_id, title, text, value, class, sort_order) values ('1695', 'Subtotaal incl. BTW:', '€ 15,00', '15.000007', 'ot_subtotal', '3') 04/06/2017 19:12:33 [QUERY] insert into orders_total (orders_id, title, text, value, class, sort_order) values ('1695', 'Totaal:', '<strong>€ 22,20</strong>', '22.200007', 'ot_total', '4') But the 4 inserts are done multiple times! I am perplexed! Any idea? Eveline Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted June 4, 2017 Share Posted June 4, 2017 Get your hands on an original copy of that file and replace your existing file with it (keep a copy of your file if you've made changes to it) and see what happens. I'm not seeing that problem with my version. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Denkster Posted June 7, 2017 Share Posted June 7, 2017 (edited) Dear Dan, Your advice worked out (after some adjustments) fine! Strange, if someone had asked me the question I asked you, I probably would have given the same answer you did. Somehow I needed you to convince me ... Of course I needed to change the change the original copy of that file, replace the FILENAME_... variables with hard coded filenames and the folder variable names with hard coded names of the folders. And I needed to replace the odd tests of this kind: if (FILENAME_EMAIL_STATUS !== 'email_status.php') { with statements of this shape: if ( file_exists('email_status.php') ) { But after those changes, I did not get double sets of order_totals anymore. So I am quite happy again, thanks to you , Dan, Thank you! Edited June 7, 2017 by Denkster forgot thank you Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted June 7, 2017 Share Posted June 7, 2017 (edited) You seem to be getting a good handle on the coding thing Eveline. Before you know it we'll be seeing new add-ons authored by @Denkster. Well done. Dan Edited June 7, 2017 by Dan Cole Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥BrockleyJohn Posted February 6, 2018 Share Posted February 6, 2018 I've just been looking at this and see that it has an extra field on order for shipping method, that gets populated in checkout_process.php However, that's not the only place where orders get created - several payment methods (notably paypal but others too) bypass this processing altogether. Has this caused anyone any problems? Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
♥BrockleyJohn Posted February 19, 2018 Share Posted February 19, 2018 I have just uploaded a version of this addon to https://apps.oscommerce.com/Apps&wwEZ9&order-editor-for2-3-v1-0 It is reworked to use a header tags module instead of making changes to the checkout files to record the shipping method. This will also record it when the order was created by a payment method and not in checkout_process. It also uses the hooks mechanism to change admin orders. It is only necessary to change core code to make the order editor accessible from the list view of admin orders (by extending the hooks) or if the store records credit card information another change is required. I recommend that people who have installed previous versions take edit_orders_ajax.php from this version. Tsimi 1 Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Peper Posted February 21, 2018 Share Posted February 21, 2018 @BrockleyJohn In edit_order.php, how to get "ot_custom_ " value included into the tax calculations, and then to update Total? So if you add a line in Order Totals with either positive or negative value currently it only gets added to the Total and not subtracted or added against Tax value. Display Prices with Tax = false Quote Getting the Phoenix off the ground Link to comment Share on other sites More sharing options...
♥BrockleyJohn Posted February 21, 2018 Share Posted February 21, 2018 @Peper what exactly are you wanting to happen? Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Peper Posted February 22, 2018 Share Posted February 22, 2018 (edited) @BrockleyJohn See the calculations, the Tax part remains the same when adding a line or modifying a line ot_custom_ Edited February 22, 2018 by Peper Quote Getting the Phoenix off the ground Link to comment Share on other sites More sharing options...
♥BrockleyJohn Posted February 22, 2018 Share Posted February 22, 2018 @Peper Yes I understand what it doesn't do. In order to be applied as you ask it needs to know: whether your custom subtotal is inclusive or exclusive of tax what tax rate applies Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Peper Posted February 22, 2018 Share Posted February 22, 2018 @BrockleyJohn John, i'm not sure if there is a setting somewhere for this that needs to be adjusted I tried applying TAX calculation fix but did not work - 1: amount entered as exclusive of tax 2: TAX rate as per customer shipping address Quote Getting the Phoenix off the ground Link to comment Share on other sites More sharing options...
♥BrockleyJohn Posted February 22, 2018 Share Posted February 22, 2018 Sorry, you're right the rate is zone-specific; I should have asked what tax class applies. From a quick look at it, that fix should work as long as you add the extra subtotal after the shipping subtotal because it uses the tax rate from the shipping module to calculate the tax on the custom subtotal. If the custom subtotal is added before shipping, it'll come out zero. Your sample data doesn't seem to have a shipping subtotal at all. A proper solution would add a field on the additional custom order total for tax class. No class = no tax, otherwise apply tax based on class on subtotal. You have to be able to display the applicable tax rate on the invoice too. Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
♥Tsimi Posted February 22, 2018 Share Posted February 22, 2018 (edited) @BrockleyJohn Which part exactly is the fix for the Ajax file? I can see a few new added (int) in the queries. Is that it? Edited February 22, 2018 by Tsimi Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.