Jump to content
jhilgeman

NEW! Complete Order Editing Tool!

Recommended Posts

@BrockleyJohn Please disregard this, I deleted the test product after the sale which I thing screwed it up

Leave this with me I think all is good

Share this post


Link to post
Share on other sites

@BrockleyJohn Ok now I have found the issue that a customer advised me about

It is to do with the freight options if I select them from the Shipping Quotes: section all is good

image.png.27f9c82efb54b859b4a4b81aea04bbb5.png

But if I manually change the freight price then the GST does not get updated

image.png.d0ae0a2ddcb7cbbc717d7bdb7026978f.png

Share this post


Link to post
Share on other sites

@SCH_001

 This appears to be a bug at all versions - perhaps it never worked! I'll have a look into it.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
8 hours ago, rupruprup said:

@BrockleyJohn did you have a look at 1.0.5.9.

what is to change in the

orders_edit_orders.php hook ?

Here is a version of includes/modules/hooks/admin/orders_edit_order.php that works on 1.0.5.9 as well, but you are also going to have to deal with includes/database.php not being there - either add an include into edit_orders.php and edit_orders_ajax.php or go through and edit all the sql statements.

orders_edit_order.php


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

thank you @john

I changed the script to

<script>
  $('.align-self-center').prepend('$button');
  $script
</script>

I cleaned both files edit_orders.php and edit_orders_ajax.php  a few weeks ago and it works fine

Share this post


Link to post
Share on other sites
4 minutes ago, rupruprup said:

thank you @john

I changed the script to

<script>
  $('.align-self-center').prepend('$button');
  $script
</script>

I cleaned both files edit_orders.php and edit_orders_ajax.php  a few weeks ago and it works fine

That might work now but there's a good chance you'll get buttons popping up all over the place at some point in the future - it will add them to the start of every html element with the class align-self-center


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

yes, I used your solution now. Testing around with your file helped me a lot to learn understanding how this hook works

Share this post


Link to post
Share on other sites

Hi;

Thank you for this wonderful addon can you please help me with this error- I am using 1.0.5.9 Phoenix

Notice: Undefined index: methods in /xxxxxx/admin/edit_orders.php on line 1857

Warning: sizeof(): Parameter must be an array or an object that implements Countable in /xxxxxx/adminedit_orders.php on line 1857

Awaiting your response;

Thank you in advance

Regds./

radhavallabh

Share this post


Link to post
Share on other sites

@radhavallabh it needs a lot of changes to get rid of warnings and notices - you should turn them off by changing admin/includes/application_top.php

error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED);

It's my hope to get a lot more of them eliminated by the next release which will be to go with 1.0.6.0


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
11 hours ago, BrockleyJohn said:

@radhavallabh it needs a lot of changes to get rid of warnings and notices - you should turn them off by changing admin/includes/application_top.php


error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED);

It's my hope to get a lot more of them eliminated by the next release which will be to go with 1.0.6.0

Eagerly await the next release dear 👍👍😊

Regds./

radhavallabh

Share this post


Link to post
Share on other sites

@djmonkey1

Seems like I would be able to find more information about using this mod in a v2.3.1 store with  SPPC and Quantity Discounts, but I'm not having great luck.  

The Quantity Discounts mod works great on the front side. In fact, I duplicated it, using one version for Category Discounts, and the other for Line Item discounts.  This way, both or either can be toggled on a customer group or customer id basis.  Again...works -great- as a visiting customer.

The problem comes when I try to edit an order.  Let's say I have an order for which neither discount (line or category) is toggled on, for either account or customer group.  If I edit the order and add enough product that the criteria for the discount is met, the discount applies itself.  Or...if they'd purchased enough to meet one or all of the criteria, once I open it in the editor and change anything, the discounts apply.

I can't even adjust shipping without having this happen.  I'm at a loss.

 

Share this post


Link to post
Share on other sites

I discovered recently that my "Edit" button has disappeared from my Order Details view in Admin, where the order's Summary, Products, and Status History are displayed.  I checked by toggling the Edit button feature in the Order Editor configuration and the Order Editor is functioning correctly.  I normally do not like to have that Edit button in the orders list view go directly to an order editing screen, but to the orders detail screen, instead.  So, I typically have that feature disabled in the configuration.  However, I get no "Edit" button at all in the order details view.

I first noticed this because the Details box has the following characters displayed erroneously at the bottom left of each Summary, Products, and Status History box: "  ');  "

I traced these three characters to this code in the HTML for orders.php when displaying the order details in Admin:

Quote

<script>$('h1.pageHeading + div').prepend('<span class="tdbLink"><a id="tdb5" href="https://www.mystore/catalog/admin/edit_orders.php?oID=3293" target="_blank">Edit</a></span><script>$("#tdb5").button({icons:{primary:"ui-icon-document"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script>');

Sure enough, what little I can interpret is that string of script code controls the appearance of the "Edit" button in the order details view.  I suspect those ending characters are invalidating the script code.  I believe that script should end in only " </script> " instead of " </script>'); "

Can anyone direct me to which file that script is developed, so that I can try to find the error?  I've checked orders.php and edit_orders.php and it doesn't appear that any of that code is included in those files.

My orders.php file was somehow modded, because I have it archived under a "FixEditButton" folder.  Unfortunately, it doesn't appear that I commented the code and I can't remember what was done. 😕

 

Share this post


Link to post
Share on other sites

It comes from a file you're unlikely to have changed: catalog/includes/modules/hooks/admin/orders_edit_order.php

What version of the shop are you running? It occurs to me I've not tested the latest version I posted to the thread on bs3 shops.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

If you view the source of the page where the script has been included, it looks likely that there is something extra in the string coming out of the draw button function.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Thanks for replying, John.  I'm running Phoenix 1.0.5.0.  You actually gave or told me how to modify the orders_edit_order.php file back on 12/24.  I think you uploaded it all in your 1.2.8 version.  Note that your later versions after Denkster still can't be found on the Apps Marketplace.  I went searching earlier this morning and couldn't find anything.

 This worked at the time, when I installed this from you:

Somewhere along the way to 1.0.5.0 and Supporters Code updates, I lost the Edit button again, but don't know when - or obviously, how.

Share this post


Link to post
Share on other sites

@BrockleyJohn (on Phoenix 1.0.1.4 (please don't judge))

I have Order Editor v1.2.6 installed and working. I also just installed Create Account and Order Maker for 0sC 2.3.1 v3.0 (yes, this is an old add-on, and required a lot of updating to get it to work with Phoenix). Create Account and Order Maker requires Order Editor in order to work.

1) I have customers with more than one address (one for ship to, one for bill to, etc). When a customer places an order (via phone or email), I enter the order through Order Maker, which drops me into Order Editor. Order Editor pulls in the default address into all three address blocks. What would it take to have a drop-down selector for each of the address blocks, so I could select one saved address for billing, and another one for shipping?

2) You added a hook into Order Editor, I suppose to avoid core changes (my core is so hacked up, it could probably qualify as original code!). However, when I hacked the buttons in /admin/orders.php (I moved the 'invoice' button to the first place, moving the 'edit' button down to the second row), the hook over-rode my 'Invoice' button, sending me to 'edit_orders.php' instead. When I commented out the hook, the problem when away. Any thoughts as to why that happened?

TIA

Malcolm


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

@ArtcoInc I guess you're talking about the buttons on the selected order in the list view. IIRC it just overrides the link of the first button - or the first yellow one, or something along those lines. There's a config setting for this which you can turn off instead of clobbering the hook. If you want it to pick a different button we'd need to work out a different jquery selector - if you copy the source code of the buttons section from your browser I can figure what it could be.

I believe order editor does nothing with customers, addresses and so on, it simply manipulates the fields on an existing order and allows you to change the order products and totals. The place to do what you're asking would be the Order Maker addon which must be where the default address is getting pulled into all three when the order is created.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@BrockleyJohn Just for some clarification ...

1) The Order Maker add-on has the choice of adding a new customer, or selecting an existing customer. If I'm entering a new order for an existing customer, Order Maker fills in the default address into all three address blocks, and dumps me into Order Editor. Here, I get to add the products, shipping, comments, etc.

What I am saying is, if an existing customer has more than one address in their address book, it would be useful to be able to have a drop-down selector for each of the address blocks.

90923793_ScreenCapture2020-06-11-A.jpg.2331fec26f1fb42c7ea1d5c51417b825.jpg

 

2) In the stock /admin/orders.php screen, when you display the orders, there are 4 buttons on the right hand side of the screen. If you click on the 'Edit' button, it displays the order, but there is no way to actually edit it.

746007893_ScreenCapture2020-06-11-B.jpg.6dc1f1b031cf8ecf75692e2a5e488221.jpg

After I installed Order Editor, the 'Edit' button takes you to /admin/edit_orders.php (the Order Editor screen). This is where I think you used the hook.

437500856_ScreenCapture2020-06-11-C.jpg.e8494f34d022ceaf64f961968f1fad8a.jpg

This worked fine, until I hacked up the /admin/orders.php file, to move the buttons around.

836328541_ScreenCapture2020-06-11-D.jpg.edcbb9fc0f90905812a7a282b41ec455.jpg

Since I moved the 'Invoice' button first, the Hook was redirecting it to /admin/edit_orders.php, instead of to /admin/invoice.php. When I commented out the Hook, the link worked fine.

Like I said, I've already hacked up the core quite a bit. It just took me by surprise trying to figure out why the link wasn't working.

Malcolm


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

Hi,

Probably not using the most up to date version, but on Phoenix 1.0.5.0 if there is a discount value (i.e. using a discount code addon) it doesn't seem to handle the tax/order total values correctly when re-calculating.

Works perfectly if not.

Might be worth catering for this for any future update.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×