Closed (fixed)
Project:
UC Discounts
Version:
5.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Oct 2008 at 20:33 UTC
Updated:
9 Nov 2008 at 13:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
joachim commentedSimplest thing is to implement hook_store_status.
A warning when users actually are on the page with the empty bits, or when users are at the start of the process of adding a discount would be good too -- since there's no point creating a discount if you have less than 1 condition and 1 action available.
Comment #2
psynaptic commentedI would say the most visible place for a warning would be on the discounts admin page itself. We could have a message on the install page too since that would save the admin navigating back to the modules page.
Comment #3
joachim commented/admin/store/discounts ?
Yup, since that's where you start trying to add discounts.
Still, it's not too hard to also do a status notice.
So we need to code:
- a sanity-checking function for the core discounts module. This checks there is at least one action and one condition available; returns TRUE or FALSE.
- something that calls this on the discounts admin page. Ideally, this should block the 'add discount' link too, since it's of no use.
- an implementation of hook_store_status which calls this too.
Comment #4
psynaptic commentedComment #5
joachim commentedTurns out there's already functions that get a list of actions and conditions: they're used to populate those lists that are showing up empty.
Implemented the hook, and checking on our admin page too with a message that sends the user to check status.
Here's a patch of what I've committed.
Comment #6
psynaptic commentedJust tested this and it works perfectly. Thanks!
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.