Closed (fixed)
Project:
UC Down Payment
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
23 Mar 2011 at 19:26 UTC
Updated:
7 Oct 2011 at 00:13 UTC
Jump to comment: Most recent file
Just installed the module and added a downpayment feature to a product in our test store.
It would be nice to specify a "number of days" that the full payment must be received by, i.e. whenever a product is ordered by a customer the final payment would be due 60 days from the day they ordered. This should be an option in addition to using a specific date.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | uc_downpayment.module.patch | 6.73 KB | alansch |
| #5 | uc_downpayment.install.patch | 1014 bytes | alansch |
Comments
Comment #1
sokrplare commentedWe've toyed with this idea, but can't decide whether it is better to split a "by day" vs. "by date" feature into a separate module. Will need to make an architecture decision in not too long, but for now we want to make sure the date version is stable and working for everyone before we start adding more features. If you'd like to start work on this, I'd be happy to test and commit it!
Comment #2
deslack commentedI personally think the by day and by date shouldn't be put into a separate module. The feature is not that significant, and can only be applied to this module only.
Comment #3
JoshOrndorff commentedI would love to see this feature too. I'm not taking deposits for events, but for services, and I want to do something like Deposit due now, balance due in 60 days.
I, like Deslack, think that splitting it into a separate module would be overkill. It seems like just a small addition. If code is available for this feature I would be happy to test it, but I won't be able to code anything myself until the more important features of my site are in place. I'll keep following this thread.
Thanks!
-Josh
Comment #4
sokrplare commentedMakes sense to me. Just waiting on the module to be approved before kicking off any new feature work. Happy to commit working patches though if you're inspired!
Comment #5
alansch commentedFor what it's worth, here is my attempt at implementing a "by number of days" interface for final payments.
I have set it up so the store administrator can decide whether to allow entry by number of days or by cut off date by adding the "number of days" option as a separate product feature (which means that both can be enabled for a product, leaving the choice to the purchaser).
The only remaining implementation quirk at this stage is a default of 30 days when the "number of days" feature is enabled. I have set this up so it can be overridden by a Drupal variable "downpayment_default_days" but I have not implemented an admin interface to create/set this variable. Of course the store administrator can override this to any desired number of days when the feature is enabled for a product.
This patch also includes the fix I posted earlier today (http://drupal.org/node/1281100) for the uc_downpayment_payments record deletion issue.
Comment #6
sokrplare commentedThanks for the patch - awesome! Will check it out and merge in hopefully!
Also moved this issue over to the live module queue (since we had an issue with promoting the sandbox project http://drupal.org/node/1104470#comment-4901344).
Comment #7
alansch commentedOkay, here's a bit of code to provide a configuration interface at admin/store/settings for the uc_downpayment module.
In uc_downpayment.module's hook_menu (uc_downpayment_menu) add the lines...
and in uc_downpayment.admin.inc add the function...
This will allow the easy configuration of "downpayment_default_days" and also provides a structure for the addition of any further configuration or default values for the uc_downpayments module.
Note that if the hook or callback function are changed, you will need to clear caches before the changes will become visible. (Derned quirk had me chasing my tail for a few hours *sigh*)
FWIW the Drupal manual reference for this is http://drupal.org/node/206761.
Comment #8
sokrplare commentedMany thanks for all your help. We have included your patch in comment 5 into the most recent dev version, but slightly modified, and taking into account some other changes that have recently been made, unrelated to this issue. Also, we added the interface configuration in comment 7. Thanks again!