Discount VIA roles uses the current user, not the order's user

japerry - May 4, 2009 - 17:34
Project:UC Discounts
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

When using the discount module, the order admin page will use the credentials of the current store admin, which may belong to groups that have discounts that the actual customer doesn't have. This causes the discount to be applied no matter what, which makes it impossible to edit an invoice.

Since uc_discounts_role_check doesn't pass in the $order variable, its not possible yet to get the user object into the check function. I'm working to figure out a way to do this, but it'll require some hook/api modifications.

 
 

Drupal is a registered trademark of Dries Buytaert.