Post by ultraspoon » Wed Aug 12, 2015 1:11 pm

Hey all,

Im not sure if this is a bug or not but im trying to delete multiple orders at once, specifically missing orders as I have alot of them!

There is no 'multiple' delete button in the orders page, there is a delete button next to each order but not one at the top right like on products.

Is it supposed to be like this?

Cheers

Active Member

Posts

Joined
Mon Oct 18, 2010 5:56 pm

Post by straightlight » Sat Aug 15, 2015 1:14 am

If you don't see any checkmarks on the left side of each rows as the first entry, normally, then it is not a bug. It may be a different feature presented compared to the products but not a bug.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ultraspoon » Mon Aug 17, 2015 10:32 pm

Hi straightlight,

Thanks for your reply,

Thats the issue though, there is a checkbox next to the orders, it is possible to select them all, there is just no delete all button on that page.

Thats why I think its a bug, why is there the ability to select all the orders but then no way to interact with them all? Its like the button was just forgotten about.

This has been posted a couple of times also on the forum but those posts just got ignored.

Thanks

Active Member

Posts

Joined
Mon Oct 18, 2010 5:56 pm

Post by straightlight » Tue Aug 18, 2015 2:11 am

In admin/controller/sale/order.php file,

find:

Code: Select all

$data['add'] = $this->url->link('sale/order/add', 'token=' . $this->session->data['token'], 'SSL');
add after:

Code: Select all

$data['delete'] = $this->url->link('sale/order/delete', 'token=' . $this->session->data['token'], 'SSL');
In admin/view/template/sale/order_list.tpl file,

find:

Code: Select all

<button type="submit" id="button-shipping" form="form-order" formaction="<?php echo $shipping; ?>" data-toggle="tooltip" title="<?php echo $button_shipping_print; ?>" class="btn btn-info"><i class="fa fa-truck"></i></button>
add before:

Code: Select all

<button type="submit" id="button-delete" form="form-order" formaction="<?php echo $delete; ?>" data-toggle="tooltip" title="<?php echo $button_delete; ?>" class="btn btn-info"><i class="fa fa-trash-o"></i></button>
This should correct the problem.
Last edited by straightlight on Mon Sep 28, 2015 11:45 pm, edited 1 time in total.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by lordslave » Mon Sep 28, 2015 8:10 pm

Didn't work for me. The delete button appeared at the top, but when I click on it the admin is opened again in another tab without deleting any requests.

My Opencart 2.0.2.0

Newbie

Posts

Joined
Tue Oct 18, 2011 4:57 am

Post by straightlight » Mon Sep 28, 2015 11:45 pm

lordslave wrote:Didn't work for me. The delete button appeared at the top, but when I click on it the admin is opened again in another tab without deleting any requests.

My Opencart 2.0.2.0
I just modified the step above. It should work accordingly now.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by exit15 » Sat Nov 07, 2015 1:47 am

Can this be made into a mod? so that we don't have to remember to change with every upgrade. I was testing V 2.1 and this is still an issue there. Frankly an oversight by the developers since we all know too well that the "missing orders" quickly fills up by schmucks testing stolen credit cards.

New member

Posts

Joined
Sun Mar 03, 2013 2:05 am


Post by straightlight » Sun Dec 06, 2015 8:33 pm

exit15 wrote:Can this be made into a mod? so that we don't have to remember to change with every upgrade. I was testing V 2.1 and this is still an issue there. Frankly an oversight by the developers since we all know too well that the "missing orders" quickly fills up by schmucks testing stolen credit cards.
The point of posting code fixes on the forum is to avoid on remembering the change for next releases as it is already up to the Opencart team to add those corrections upon each releases since day one. Delays based on each releases that involves bug fixes is are not simply based on software error.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sully210 » Sat Dec 03, 2016 9:03 pm

I am using version 2.0.3.1 and I tried the steps above with the .tpl files and it didn't work for me. Any other suggestions? I know I can export my database, delete them there, and then import my databasse again but that is a pain.

Thank you,
Sully :)


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 4:46 am
Location - USA

Post by supak111 » Thu Mar 08, 2018 12:03 pm

Can someone please look at this FIX code because it does not work. When you add the code and you check off which orders you need deleted and CLICK DELEET button it just opens a new tab without still all orders checked but nothing deleted.

PLEASE PLEASE someone help. I'm on 2.0.1.1

~ OC 3.0.3.2 - OCmods only ~


Active Member

Posts

Joined
Fri Feb 13, 2015 12:09 pm

Post by straightlight » Wed Mar 14, 2018 1:53 am

By re-reading this topic, there would be no point on setting a batch deleted orders list to select since the payment provider would still have a copy of those orders when customers purchases the goods. Which is why, it is rather best to keep the orders on the list. Otherwise, you can also remove them from PHPMyAdmin since a merchant still has control over its domain but still not suggested if the order status did changed on the payment provider's end.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by supak111 » Fri Dec 04, 2020 8:18 am

Sorry for an old thread but I also need this on 3.0.3.2. Main reason is to delete many many maaany missing orders. doing in database is also hard and dangerous. Is there a work around for this on CO3xxx?

~ OC 3.0.3.2 - OCmods only ~


Active Member

Posts

Joined
Fri Feb 13, 2015 12:09 pm

Post by IP_CAM » Fri Dec 04, 2020 8:26 am


I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site: https://github.com/IP-CAM
4'160 + FREE OC Extensions, on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by supak111 » Fri Dec 04, 2020 8:28 am

Oh awesome thanks. I didn't know there was another one. I tried the first one some time ago and it didn't work on 3.0.3.2, will try the second one now.

ps i guess the second one is only to delete order history.

~ OC 3.0.3.2 - OCmods only ~


Active Member

Posts

Joined
Fri Feb 13, 2015 12:09 pm

Post by straightlight » Fri Dec 04, 2020 8:13 pm

supak111 wrote:
Fri Dec 04, 2020 8:28 am
Oh awesome thanks. I didn't know there was another one. I tried the first one some time ago and it didn't work on 3.0.3.2, will try the second one now.

ps i guess the second one is only to delete order history.
It's already built-in the core in v3.x releases ...
All authorized users can check mark the order IDs from the order list and delete the orders dynamically.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by OSWorX » Fri Dec 04, 2020 9:11 pm

straightlight wrote:
Fri Dec 04, 2020 8:13 pm
It's already built-in the core in v3.x releases ...
All authorized users can check mark the order IDs from the order list and delete the orders dynamically.
As the subject says: "Delete multiple orders" this answer is ony partly correct.
Per default (and builtin) with OpenCart 3.x versions you can delete only one (1) order per action.
To delete more at once (bulk) an Extension is needed.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by straightlight » Fri Dec 04, 2020 9:48 pm

OSWorX wrote:
Fri Dec 04, 2020 9:11 pm
straightlight wrote:
Fri Dec 04, 2020 8:13 pm
It's already built-in the core in v3.x releases ...
All authorized users can check mark the order IDs from the order list and delete the orders dynamically.
As the subject says: "Delete multiple orders" this answer is ony partly correct.
Per default (and builtin) [v]with OpenCart 3.x versions you can delete only one (1) order per action[/b].
To delete more at once (bulk) an Extension is needed.
I wasn't aware that:

Code: Select all

<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
and:

Code: Select all

<td class="text-center"> {% if order.order_id in selected %}
                    <input type="checkbox" name="selected[]" value="{{ order.order_id }}" checked="checked" />
                    {% else %}
                    <input type="checkbox" name="selected[]" value="{{ order.order_id }}" />
                    {% endif %}
                    <input type="hidden" name="shipping_code[]" value="{{ order.shipping_code }}" /></td>
arrays would delete only one (1) order per action. I rather thought that an array would actually delete in bulk already like the customers and other pages in the admin already have. I guess an array could be restricted into one row as well, but in this particular scenario, I don't see one.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by supak111 » Sat Dec 05, 2020 7:10 am

Yea you can checkmark as many as you like but there is no DELETE button on the top right to delete all of them at once like many other things you can do that for. Gets annoying deleted empty missing orders one by one.

~ OC 3.0.3.2 - OCmods only ~


Active Member

Posts

Joined
Fri Feb 13, 2015 12:09 pm

Post by straightlight » Sat Dec 05, 2020 10:32 am

supak111 wrote:
Sat Dec 05, 2020 7:10 am
Yea you can checkmark as many as you like but there is no DELETE button on the top right to delete all of them at once like many other things you can do that for. Gets annoying deleted empty missing orders one by one.
This was already reported before on the forum. However, the reason why it's not showing is due to the API requirements where only the catalog/controller/api/order.php file deletes the orders. It is indeed a bit confusing that admin users can simply delete the orders from the admin but also having to use an API to delete the orders. Deleting the orders manually doesn't get tracked from the catalog's activity event while playing with customers' transactions like that. This issue's already on my to-do list to fix it since there seem to be a lack of concept regarding this issue.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by OSWorX » Sat Dec 05, 2020 4:02 pm

straightlight wrote:
Fri Dec 04, 2020 9:48 pm
I wasn't aware that ..
Also not, that you can check as many as you want, but delete always only one (1) because - as others already mentioned here: there is NO Delete button at the top right.
So don't confuse people here with "sophisticated" answers nobody has a benefit.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: No registered users and 4 guests