Guest Posted March 22, 2003 Share Posted March 22, 2003 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted March 22, 2003 Share Posted March 22, 2003 Download at: http://www.oscommerce.com/community/contributions,1093 Quote Link to comment Share on other sites More sharing options...
kev Posted March 22, 2003 Share Posted March 22, 2003 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] Quote ----------- K E V I N ----------- Link to comment Share on other sites More sharing options...
Guest Posted March 22, 2003 Share Posted March 22, 2003 Seems like you have not installed the enable/disable categories contribution. Go to the admin > configuration > recommendations and turn off "Enable disable categories installed?" Quote Link to comment Share on other sites More sharing options...
kev Posted March 22, 2003 Share Posted March 22, 2003 that was lightning fast :) will do right now. are you in the chat room ? I need some help installing themes etc can you help me? [email protected] thanks! Quote ----------- K E V I N ----------- Link to comment Share on other sites More sharing options...
Guest Posted March 22, 2003 Share Posted March 22, 2003 Sorry, I'm busy doing my next contribution.... Quote Link to comment Share on other sites More sharing options...
Waza04 Posted March 24, 2003 Share Posted March 24, 2003 Id like a buy now link under every product listed in the box - is this possible? Quote Link to comment Share on other sites More sharing options...
Guest Posted March 24, 2003 Share Posted March 24, 2003 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 Quote Link to comment Share on other sites More sharing options...
Waza04 Posted March 24, 2003 Share Posted March 24, 2003 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted March 24, 2003 Share Posted March 24, 2003 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> Quote Link to comment Share on other sites More sharing options...
Waza04 Posted March 24, 2003 Share Posted March 24, 2003 Nope - That dont work! Any other methods? The reasons for forms, is so that Spiders dont fill up the cart when it follows the buy now link. Thanks, Warren Quote Link to comment Share on other sites More sharing options...
Guest Posted March 24, 2003 Share Posted March 24, 2003 Why doesn't it work? Does it give any error?? and if so which one? and if so, post the template you've made. Quote Link to comment Share on other sites More sharing options...
Dan1113 Posted March 25, 2003 Share Posted March 25, 2003 Great contribution. :) Nice work! Quote Dan1113 Tailfeathers Network Link to comment Share on other sites More sharing options...
Dan1113 Posted March 25, 2003 Share Posted March 25, 2003 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? Quote Dan1113 Tailfeathers Network Link to comment Share on other sites More sharing options...
Dan1113 Posted March 25, 2003 Share Posted March 25, 2003 By the way -- OSC 2.2 CVS, nov 2002 snapshot. Quote Dan1113 Tailfeathers Network Link to comment Share on other sites More sharing options...
Dan1113 Posted March 25, 2003 Share Posted March 25, 2003 I am really embarassed -- I cannot believe I didn't see the first reply to this topic with that same issue (and with an answer in the next reply!). My apologies. :) Great script! Quote Dan1113 Tailfeathers Network Link to comment Share on other sites More sharing options...
Dan1113 Posted March 25, 2003 Share Posted March 25, 2003 Ok, now an actual issue. :b Fatal error: Cannot redeclare class recommendations in ~edited~store/includes/classes/recommendations.php on line 13 However, if I remove class recommedatations, it says it's missing and needed. Any ideas? Quote Dan1113 Tailfeathers Network Link to comment Share on other sites More sharing options...
Guest Posted March 25, 2003 Share Posted March 25, 2003 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... Quote Link to comment Share on other sites More sharing options...
Dan1113 Posted March 25, 2003 Share Posted March 25, 2003 Whoops... Thanks. :) Quote Dan1113 Tailfeathers Network Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2003 Share Posted April 6, 2003 Version 0.6 now available for download... * includes buy_now button * some bug fixes * better install.txt Quote Link to comment Share on other sites More sharing options...
Dan1113 Posted April 6, 2003 Share Posted April 6, 2003 Thanks, ednique! :) Quote Dan1113 Tailfeathers Network Link to comment Share on other sites More sharing options...
dhecker Posted April 27, 2003 Share Posted April 27, 2003 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 Quote Link to comment Share on other sites More sharing options...
vesaire Posted April 29, 2003 Share Posted April 29, 2003 Something weid happened to header after intalling this conribution. Please check http://ww.vesaire.com, I could not find what the problem is Thanks Ugur Quote Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2003 Share Posted May 5, 2003 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 6, 2003 Share Posted May 6, 2003 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.