I started developing custom modules for clients 6 months ago and now I already have 2 which I would love to share with the community.
On of them being an add-on module for ubercart, a favorite order module. It basically lets any user of a site with ubercart save an order for quick use. It integrates smoothly with Ubercart and Drupal and my clients already love it. I've seen some requests out there for something like this so here I have it.
There is an alpha version in http://eqx-biz2.dns2au.com/~freshasf/drupal/
If you create an account log in and add product to the cart you can see what the idea is. And if you go to your account settings you should see a tab for favourite order.
The other module is in development and is an access control module for stores that sell articles where they need to give access to the snippet to non subscribers and an option to buy the article, but also give full access to users that have the appropriate permission. It kind of works on www.intermedium.com.au but that is the first version that I developed, I kept working on it and I hope I can make it available to everyone out there. It integrates with ubercart (again).
Check these links. They both are the same content type but one has restricted access. The other one is free to read by anyone.
http://www.intermedium.com.au/content/ict-expertise-under-represented-ap...
http://www.intermedium.com.au/content/free-article-education-receives-24...
I've already submitted some patches to other modules, and of you check you'll see the difference between my first posts and the last ones. I've improved a lot!
That and the fact that I just love Drupal and want to do all I can to make sure that we keep growing as a community and make of this the best CMS out there!
Also, right now I live in Australia, but in 6 month will be moving back to Colombia, where I am from, and I plan to really introduce Drupal there.
Hope you all have a nice day.
Federico
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | uc_favorder_3.zip | 5.55 KB | jm.federico |
| #16 | uc_favorder_6.x-0.2.zip | 5.23 KB | jm.federico |
| #11 | taxonomysp.zip | 3.6 KB | jm.federico |
| #9 | uc_favorder.zip | 5.01 KB | jm.federico |
| #4 | uc_favorder.zip | 5.34 KB | jm.federico |
Comments
Comment #1
jm.federico commentedAttaching Ubercart Favorite Order module
Not attaching the security access one because the code is a mess and somebody would cry if it is seen.
Cheers
Comment #2
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.
Comment #3
dman commentedThis is indeed a requested module, and I'm not aware of any duplication.
The code looks really tidy, and the docblocks are all accurate.
Mostly good use of t() and other Drupal API.
I'm not in favor of using serialized blobs in the database to store your array data, but that's your choice.
Curious indenting on some nested arrays, but I don't think it's wrong.
1
Unfortunately coder.module does not agree with all of the code style. :-(
It's all REALLY boring and trivial whitespace niggles, but try running coder.module over it to get in the habit.
Coder.module report below.
2
No. Must use Drupal DB API
3
Visually, this looks like a privacy breach? Anyone can see what any other user has favorited?
4
What's happening with the "e-" here looks like it needs documentation. Sure looks weird on review. Also it would appear the message is not always correct?
... I've not yet tried the module, just scanned the code visually for inconsistencies.
coder.module:
Comment #4
jm.federico commentedHello! I'm Back
Right, so I did some changes!
I agree with the serialize thing. It will eventually be a separate table. But for now will leave as is. Part of the todo list.
Using Drupal db API now.
I have no idea how I didn't see the access check.
If you installed the previous code, uninstall, delete files and enable new module. No update option yet and I changed the name.
Also, there were inconsistencies between .install and .module with some names. This is because "faf_fav_or" was the name of the module when first started for a client (faf being the initials of the client). Now it is all uc_favorder
Demo version here:
http://122.252.1.190/~freshasf/drupal
There are no links to the cart :( remember to use
http://122.252.1.190/~freshasf/drupal/cart
Federico
Comment #5
jm.federico commentedComment #6
avpadernoThe coding standards report to add a space before, and after the concatenation operator, as for other operators.
Comment #7
dman commentedYeah, looks like I need to update the install of coder.module on my testbed - if it's been updated to that change.
Comment #8
jm.federico commentedcoder initially reported
But will change anyway to include spaces before and after the operator, regardless of what is being concatenated.
Yes, it changed. It just works like a new module because I changed the name and the database schema. This would be the final name, so from now on should include updates if database changes.
Should I submit again with spaces for the concatenation operators?
Comment #9
jm.federico commentedAttached new files.
Removed code that was left form previous version where I had an extra Database field where I was storing a string to be used as a Ubercart CART LINK.
That was the initial module. Changed it now to use Ubercart functions and be able to control the redirect at the end of the submission (redirect with ubercart CART LINK was not working).
Right now there is no redirect. but in the future the idea is to have a block with the load favourite order link/button, and the redirect could be set using the admin section (which also is a TODO).
Well, the todo list is endless. But I hope you get the idea, this is the simplest version of the module. From now on is all about making it more powerful!
Comment #10
jm.federico commentedHello guys, just checking if you've had the time to check the module.
I'm very keen on keep working on it, and off course keep learning as I go. Comments, critiques and suggestions are more than welcome!
Cheers
Comment #11
jm.federico commentedHello
Adding another really simple module that I have, I know one exists already for this, but I felt it was to complex to what it needs to do. I already contacted the developer and gave him my code for him to decide if he wants to merge both options.
It lets a user limit the taxonomy tags to a single value or a single numeric value
Attaching here for you to check
Comment #12
avpaderno@jm.federico: We just review a module / theme per applicant.
Comment #13
jm.federico commented@kiamlaluno, didn't know, :P
Cheers
Comment #14
jm.federico commentedIf I have made improvements to the one you are reviewing, should I upload them?
Comment #15
tr commentedSeems like there's a lot of overlap between this and uc_reorder http://drupal.org/project/uc_reorder ? uc_reorder adds a button to the customer's order history so the customer can quickly replicate a previous order. The button adds the contents of the previous order to the cart, which allows the customer to modify the order (add items/delete items/change attributes) or just go straight to checkout. uc_reorder has been on drupal.org for more than a year (and on ubercart.org for another year prior to that), and is being actively maintained.
Comment #16
jm.federico commentedIt certainly seems like there is some overlapping. They are two different approaches though. uc_reorder is definitely handy [installed and in use ;)] but I still think a favourite order is needed. Even if you can reorder a previous order, the process a user has to go through to reorder their favourite articles is longer than it should be.
I'm attaching an update to the favourite order module. You'll see that I put a block that will give the user instant access to the orders content and a one-click solution to order it.
This module is still not compatible with attributes, that is in the TODO list too.
Cheers
Comment #17
avpadernoCVS requirements report that the proposed module must not duplicate the work done from existing project, which doesn't only mean duplicated code.
Comment #18
jm.federico commentedHi I undrestand there sholud be no 2 modules doing the same thing. And I think we have 2 different modules here.
I'll give you one example. Lets say you do your groceries online, and you have some basic products you always get, but every week you also get whatever is in special, or whatever you feel like ordering different to last time. You can't really use uc_reorder because you would have to:
While with favourite order:
Another example: If you are a new customer and you haven't ordered anything yet, you can't really re-order. With favourite order you can save it for future use if you want.
I guess my point is that even when they look like they do the same thing, the don't. Put yourself in the final user position. Would you find the "favorite order" option to be the same as "re order from last orders". I don't. I think thet both have their use, but are two different things.
Let me know what you think.
Federico
Comment #19
jm.federico commentedHello, me here again. I'm just wondering if there are some news.
:( I really want to put this up there and give back to others what others have given me.
Cheers ;)
Comment #20
dave reidTagging all CVS applications with ubercart-related code.
Comment #21
avpadernot().Comment #22
jm.federico commented@kiamlaluno
Thanks for your comments
Uploading improved version.
NOTE: This version stores data differently, there is no upgrade path. If you have an older one running, make sure you un-install and re-install.
Cheers
Comment #23
avpadernoThank you for your contribution!
I am going to update your account so you can opt into security advisory coverage now.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.
Comment #26
avpaderno