Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Recommendations


Guest

Recommended Posts

This is an extended "also bought" module.

 

The differences:

* Products already bought by the customer won't be shown

* Products already in basket won't be shown

* recommendations are ordered by nr of orders found, products ordered, productes viewed (only if name or description is enabled), order date

* Products already shown in the main page should not be shown as recommendation

 

Enhancements:

* Should have admin configuration

* Should work on any page (like on basket and checkout pages)

* Should try to fetch as many products as possible

* Should have a template for displaying 1 product

* Should be able to disable

* Should work with the disable/enable categories (if a categorie is disabled it should assume that the sub categories are disabled)

* Should strip html tags, when displaying descriptions

* Should recommend products related to and in this order:

step 1: product ids of products shown on the page... product_info, product_reviews, product_reviews_info, reviews, basket, product_listing, specials, products_new, checkout_confirmation, checkout_success, order history

step 2: manufacturers if on the manu page

step 3: categories if category id is available, serach for related products in the selected category and it's sub categories.

step 4: if nothing found in above qry's; fetch relations from all orders; means this page is a non-product page

We will only go to the next step if the number of recommendations already found is less than the maximum allowed

* The more orders their are, the better it should recommend and the faster it runs as it will skip steps 2 to 4

 

To do's:

* There's a problem with linked products.

The current database doesn't support the idea of a main category for a product.

If you link a product to another category the order by "nr of orders found" is incorrect in certain cases.

Should wait for update of main database... add extra where main = 1

* Build an amazon like "my recommendations" page and also allow users to set "already own" and "don't like this"

* Should check if this contribution works if other contributions are installed (The products_query in reviews page is a too general name that might be used by others; already conflicted with order_history)

* Check if this conbtribution won't take too much resources when used with big databases.

* Instead of finding relations between products in one single order, try to expand it to all orders of a certain user.

If the user buys a mouse in one order and later a keyboard in a second order, than their is a relation between those products.

* What to do with orders that contain non relative items? like buying a mouse and a dvd.

* Maybe we should fetch the categories not only from the selected category, but also from the categories of the products we already found in previous steps.

* Maybe we should fetch the manufacturers not only from the selected manufacturer, but also from the manufacturers of the products we already found in previous steps.

* Mail your customers their recommendations

Link to comment
Share on other sites

Hi there

 

I'm getting the ffg error after the installation & following the install file.

 

this error appears at the bottom of my screen/site.

------------

1054 - Unknown column 'categories_status' in 'where clause'

 

select categories_id from categories where categories_status = 1 and parent_id = 0

 

[TEP STOP]

-----------

K E V I N

-----------

Link to comment
Share on other sites

Seems like you have not installed the enable/disable categories contribution.

 

Go to the admin > configuration > recommendations

 

and turn off "Enable disable categories installed?"

Link to comment
Share on other sites

In de language file is the template for displaying an item.

 

You can add the image there and use this link:

product_info.php?products_id=|recs[products_id]

&action=add_product

 

I already note this down on my todo list for next release, but untill then, you can use that link

Link to comment
Share on other sites

Hi - Thanks - It works, except I use the form POST method for the add to cart buttons,

 

Based on this:

<form name="buy_now_' . $xsell['products_id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now', 'NONSSL') . '"><input type="hidden" name="products_id" value="' . $xsell['products_id'] . '">' . tep_image_submit('button_buy_now.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) . '</form>'

 

How would I implent this?

 

Thanks,

Warren

Link to comment
Share on other sites

You can try useing it inside the template...

 

But i can't guarantee that it will work....

just test it and post back your results...

 

1) define in the template where you want to insert the button

 

2) add the code as follows

<form name="buy_now_|recs[products_id]" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now', 'NONSSL') . '"><input type="hidden" name="products_id" value="|recs[products_id]">' . tep_image_submit('button_buy_now.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) . '</form>

 

This will do a post on the same page where your contribution is inserted...

I don't think it will work if you include it on another page that doesn't accept action=buy_now

 

So I would still recommend the use of the link which will work on any page...

<a href="'.tep_href_link(FILENAME_PRODUCT_INFO, '&products_id=|recs[products_id]','NOSSL').'">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>

Link to comment
Share on other sites

Everything works fine but for one error under the recommended products:

 

1054 - Unknown column 'categories_status' in 'where clause'

 

select categories_id from categories where categories_status = 1 and parent_id = 0

 

[TEP STOP]

 

The recommended products, like I said, do show though.

 

Any ideas?

Link to comment
Share on other sites

This error means that you try to include the recommendations twice ...

 

Where did you include the recommendations?

 

In my install i describe to put it in the footer, to be able to see it on every page....

OR

put in in the pages you want it to display...

 

Don't do both at the same time...

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Hello -

 

This is my first day with OSC so I hope this isn't such a dumb question. I am installing the contribution and everything seems to be in order.

 

When I put that line in the footer, everything works fine until I reach a page containing a product that has been purcahsed (I just installed today so only a couple of test orders have gone through) it shows the following error:

 

Warning: mysql_data_seek(): supplied argument is not a valid MySQL result resource in /home/virtual/site68/fst/var/www/html/estore.revmedia.net/catalog/includes/functions/database.php on line 107



Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site68/fst/var/www/html/estore.revmedia.net/catalog/includes/functions/database.php on line 99

 

Any tips?

thanks, dh

Link to comment
Share on other sites

Hi,

 

I installed the recommendation_contrib without bigger problems, but the buy_now_button doesn?t function properly, it seems. It adds the product to the shoppin_cart - so fine, so good- but then doesn?t display the appropiate product on the "main-page". It says "Product not found".

 

I?m using the latest snapshot.

 

Furthermore: Did anyone combine this contribution with family_products ? Is it difficult to change the recommendations.php to exclude the products shown by family_products ?

 

Regards,

J?rgen

Link to comment
Share on other sites

Hello again,

 

I actually found out, that no product was shown, because the recommendation.php was located in the footer (as mentioned for demonstration purposes) :oops:

 

But what about he exclusion of the family-products in the recommendation box ?

 

Regards,

J?rgen

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...