Hi Guys

I'm loving this module and did some mods to it that I hope get commited:

1. Make use of a test function (fourth parameter in recommender_top_prediction() ) to check whether to show a node or not. In this case I check if the node is being shown in the page already, and if it is, it gets excluded. The reason I do this is because every node is shown wrapped in a DIV with a unique ID "node-#". Hence, if the node has been shown we do not want to repeat the ID AND also because if we show a node twice in a page, we loose a chance to show a different product.

2. Separate in the setting page the number of nodes to show in "related" block and in "recommended" block

3. Number of nodes to show is now a text box, maximum 2 digits, and it validates to see if it is numeric, and converts whatever you input to an integer - in case you decide to set 0.8 :P

Love to all

Federico

CommentFileSizeAuthor
#2 history_rec-6.x-1.1.patch6.65 KBjm.federico
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jm.federico’s picture

WAIT, patch incomplete

I'm looking for some code that left out of it and will repost!!!

jm.federico’s picture

FileSize
6.65 KB

Ok

Here it is, ignore the previous patch. Was missing some code

Keep in mind that I use HOOK_nodeapi to count the nodes that have been viewed. Do not know if there is a more efficient way of doing it. If there is please let me know.

I'm using this in an online store with medium traffic on a dreamhost shared account, and works no problems.

jm.federico’s picture

hum a friend asked me how in hell you might have a node more than once showing on a page with this module.
Well, it will happen if you have more modules showing content. I for example, have this module, and also have the ubercart product recommender. PLUS we have some nodes that we show arbitrarily (for whatever reason, might be discounted? or special product of the week, or whatever) and we show them all as nodes.

Federico

danithaca’s picture

@jm.dederico: great! thanks. i'll look at the patch and apply it soon. btw, may i acknowledge your contribution in the readme.txt file?

jm.federico’s picture

@danithaca

Actually that would be awesome.
If you can put my website I would love it
federicojm.com (it is quite empty right now :( but one day I'll take the time to make it good)

I'm glad I can help ;)

Cheers

jm.federico’s picture

Status: Active » Needs review

Hello

Was doing some clean-up on my issues listing, was wondering it you have had time to check and commit.

danithaca’s picture

@jm.federico: would you please create a CVS account. I'm trying to add you as co-maintainer, if you think it's fine. Also, please credit yourself as co-maintainer in the readme file as well :)

jm.federico’s picture

I'm glad I can help.
I'll apply for account and post back.

Cheers

jm.federico’s picture

user for cvs

jmfederico

Cheers

danithaca’s picture

@jm.federico: added to maintainers. thanks for your interest in the project. looking forward to collaboration and make the module work better :)

cheers

jm.federico’s picture

Status: Needs review » Closed (fixed)

Well

Finally I'm back.
Committed the patch (after reviewing).

Good luck with your projects!