This module follows on from Ubercart Products Recommender and provides two default views:
- Users who ordered this product also ordered.
- Personal recommendation based on your previous purchase.
You can modify the default Views to meet your purpose.
The personalized recommendation view requires to read the user's purchasing history. If a user hasn't made any orders, it displays nothing. In that case, you might consider using the Browsing History Recommender to make recommendations based on users products viewing history.
For Drupal 7
http://drupal.org/sandbox/dwkitchen/1341616
git.drupal.org:sandbox/dwkitchen/1341616.git
Comments
Comment #1
rogical commentedMoving from a master to a major version branch is needed.
Comment #2
bfr commentedThis is your correct git clone line:
git clone http://git.drupal.org/sandbox/dwkitchen/1341616.git commerce_rec
It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master branch:
in commerce_rec.info: It's only necessary to declare files[] if they declare a class or interface.
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Comment #3
bfr commentedComment #4
dwkitchen commentedUpdated Git: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/dwkitchen/1341616.git commerce_rec
I believe all the actions are now done. I think the unix style terminators issue was just on the those that didn't end in a single new line.
Comment #5
patrickd commentedReview of the 7.x-1.x branch:
in commerce_rec.info: It's only necessary to declare files[] if they declare a class or interface.
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
Comment #6
dwkitchen commentedUsed dos2unix to sort out line endings.
No errors on PAReview.sh
Thanks
Comment #7
bojanz commentedI'll review this tomorrow.
Comment #8
bojanz commentedWent through the code, with a small delay.
Don't have experience with the Recommender API.
I see there's not a lot of code. Still, I have reservations about the sql query you are plugging into the API:
You are getting the product_id by joining line_items and products tables on l.line_item_label = p.sku.
This seems very fragile. While Commerce does indeed put the SKU as the label by default, there's no guarantee that the label won't be anything else.
It was never meant to be used this way. You'll also notice that there's no index on l.line_item_label.
My advice would be to join the table of the commerce_product reference field (attached to the line_item entity) and get the product_id from there.
It does mean you assume SQL storage for Field API fields, but it's a far better approach than joining based on labels.
Nitpicks (while we're at it):
similarity and prediction are indented with 4 spaces instead of 2.
Should be "Implements hook_help()".
Comment #9
klausiThere are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Go and review some other project applications, so we can get back to yours sooner.
manual review:
Comment #10
dwkitchen commented@bojanz
I have changed the SQL to the following:
Which makes much more sense.
@klausi
All but README.txt removed from head now.
I am happy for this to be a single promotion to full project.
The Recommender API does not contain any sub-modules and the integrations are all separate e.g. Browsing History Recommender, Fivestar Recommender etc.
Thanks
David
Comment #11
dwkitchen commentedChanging back to needs review
Comment #12
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Go and review some other project applications, so we can get back to yours sooner.
Otherwise I think this is ready for a single project promotion.
Comment #13
zzolo commentedHey @dwkitchen, you now have full Git access. Happy hunting.
Thanks to all the reviewers!