Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin voucher send and order complete status #3521

Closed
danijelGombac opened this issue Oct 19, 2015 · 7 comments
Closed

Admin voucher send and order complete status #3521

danijelGombac opened this issue Oct 19, 2015 · 7 comments

Comments

@danijelGombac
Copy link
Contributor

In opencart/upload/admin/model/sale/voucher.php function sendVoucher($voucher_id) is not added checking for order complete status

if (in_array($order_info['order_status_id'], $this->config->get('config_complete_status'))) {}

Now you can send the gift voucher even if the order not have complete status.

@OpenCartAddons
Copy link
Contributor

When an order is set to complete in the order history, the voucher is automatically sent. The admin should never have to run the sendVoucher command manually unless the voucher was created in the backend of the site and not assigned to an order, in which case the order status doesn't matter.

I believe the order status check was intentionally left out by Daniel in the sendVoucher function.

Regards,
Joel.

@danijelGombac
Copy link
Contributor Author

The send function is split in two part, for voucher assigned to an order and those was created in voucher form. But in voucher list and form you can't see which are assigned and which are not. So, employees can accidentally sent Voucher no matter of the order status.

From my point of view there must be or checking for order status or an alert like "The gift voucher order does not have complete status, are you sure that you want send the voucher?".

@OpenCartAddons
Copy link
Contributor

This would come down to user error as an employee should not send out voucher emails manually unless they just created the voucher via the backend.

If an employee does accidentally send out the voucher notification it's not the end of the world as the customer would not be able to use it until the voucher is marked as enabled once the order status is set to complete or the voucher is manually marked as enabled.

Regards,
Joel.

@OpenCartAddons
Copy link
Contributor

I just noticed the system also does not check to see if the voucher is enabled or disabled before sending out the email.

If Daniel does add in the order status check, a check for the voucher status should also be added.

Joel.

@danielkerr
Copy link
Member

GomDani, OpenCartAddons can you pm me your skype details as i think it would be good we can skype in case you guys need to know why i have set somethings they way i have done

@OpenCartAddons
Copy link
Contributor

@danielkerr Sent the details via the forum.

Cheers,
Joel.

@danielkerr
Copy link
Member

i did a little change so you can see which are vouchers created by orders. as for the sending of vouchers out. it should be down to the user to check if the order status is enabled or disabled. it does display the status in the list page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants