♥Skittles Posted December 5, 2006 Share Posted December 5, 2006 Skittles,It could be like the buy now button on the page showing Products Available For Purchase......it takes you to the product page rather than actually adding it to the cart. Perhaps. And that would just be a matter of adding the text as part of the link, like this: echo '<br> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id_slave) . '">' . $products_name_slave . '<br>@ '. $products_price_slave . '<br>Buy Now!</a>'; This just changes the final text of the line from '</a>' to '<br>Buy Now!</a>' tbruelan, If that is what you're looking for, let us know. On the other hand, baddog, impulse buying could be useful. If the customer adds a product directly to the cart impulsively, like a candy bar in the checkout line of a grocery store, that could be a good thing for the shop owner... This may be worth pursuing, regardless of which function tbruelan is looking for. (Although, I wouldn't mix functions for the same terminology. If "Buy Now" takes your customers from product list to product page, I wouldn't use it to add product to the cart, even from the product page. On shops I manage, I use "Add to Cart" on the product page.) -Skittles Quote Link to comment Share on other sites More sharing options...
Guest Posted December 5, 2006 Share Posted December 5, 2006 On the other hand, baddog, impulse buying could be useful. If the customer adds a product directly to the cart impulsively, like a candy bar in the checkout line of a grocery store, that could be a good thing for the shop owner... This may be worth pursuing, regardless of which function tbruelan is looking for. (Although, I wouldn't mix functions for the same terminology. If "Buy Now" takes your customers from product list to product page, I wouldn't use it to add product to the cart, even from the product page. On shops I manage, I use "Add to Cart" on the product page.) -Skittles Skittles, I'd like to see it set up so that once a product is added to the cart, the optional related products are displayed and can be added to the cart as well. However, if a product has attributes, you just about have to take the customer to the product page first. If it was really sophisticated, it would add the item to the cart if there were no attributes and take them to the product page if there were attributes. BD Quote Link to comment Share on other sites More sharing options...
Guest Posted December 5, 2006 Share Posted December 5, 2006 This just changes the final text of the line from '</a>' to '<br>Buy Now!</a>' tbruelan, If that is what you're looking for, let us know. Not really, I would actually like to have a button :D The related products will have "no attributes" and I would set "go to cart" to false. Quote Link to comment Share on other sites More sharing options...
♥Skittles Posted December 5, 2006 Share Posted December 5, 2006 Not really, I would actually like to have a button :D The related products will have "no attributes" and I would set "go to cart" to false. Sounds like I understood what you wanted in the first place, then. I took a quick look at it this evening. We need to have a separate "form" for each product listed. So far, not a problem. Each will be named "something" + the iteration number, ie <form name="cross_sell0"...>, <form name="cross_sell1"...>, etc. Then include a submit button for each form. Will you be using an image? or would you like to use a CSS button? Do you want the image/name/price to be "clickable"? If so, should they go to the product, or add the product to the cart? -Skittles Quote Link to comment Share on other sites More sharing options...
Guest Posted December 5, 2006 Share Posted December 5, 2006 Sounds like I understood what you wanted in the first place, then. Will you be using an image? or would you like to use a CSS button? Do you want the image/name/price to be "clickable"? If so, should they go to the product, or add the product to the cart? I would be using an image button. I would like the picture, name and price to be clickable, to take them to the products-page. And the "Buy now" button to add the item to the cart. Quote Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted December 5, 2006 Share Posted December 5, 2006 Hi all, I just installed this contribution and it seemed really easy to install. Went to the admin panel and set it all up under configuration\related products I have the following setings Show Thumbnails - True Split Display Into Rows - True Defines Number of Items Per Row - 3 Defines Number of Items to Display - 3 Adds Random Display Order - True I setup a couple of tests, then when I look at the test products there is nothing there to show related products. I am probably missing something silly but I am sure I followed the install (latest one by skittles :D Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
Guest Posted December 5, 2006 Share Posted December 5, 2006 Hi all, I just installed this contribution and it seemed really easy to install. Went to the admin panel and set it all up under configuration\related products I have the following setings Show Thumbnails - True Split Display Into Rows - True Defines Number of Items Per Row - 3 Defines Number of Items to Display - 3 Adds Random Display Order - True I setup a couple of tests, then when I look at the test products there is nothing there to show related products. I am probably missing something silly but I am sure I followed the install (latest one by skittles :D Have you clicked on Related Products under Catalog in Admin and set up any related products? Quote Link to comment Share on other sites More sharing options...
♥Skittles Posted December 5, 2006 Share Posted December 5, 2006 I would be using an image button. I would like the picture, name and price to be clickable, to take them to the products-page. And the "Buy now" button to add the item to the cart. Okay. I'll see what I can do. It may be a couple of days, though. Rolling out a new site sometime this week. Lots of details to attend to... (But I will be ever so glad to have this one "done". There's more to do, but the pressure will be off.) -Skittles Quote Link to comment Share on other sites More sharing options...
Guest Posted December 5, 2006 Share Posted December 5, 2006 No problem, THANKS !! Quote Link to comment Share on other sites More sharing options...
♥Skittles Posted December 6, 2006 Share Posted December 6, 2006 No problem, THANKS !! tbruelan, I believe I have your buttons for you :) There are two files. One contains the instructions for adding this variation to Related Products 3.3-c. The second is the related products code in a separate file, to be installed in the includes/modules/ directory. I'm doing something new today. I'm attaching the files to the post. (One of the perks of being a community sponsor!) If you have any trouble getting these files, send me a PM with your email address, and I'll send them to you directly. -Skittles buy_now_variation_instructions.txt related_products.php Quote Link to comment Share on other sites More sharing options...
♥Skittles Posted December 6, 2006 Share Posted December 6, 2006 tbruelan, I believe I have your buttons for you :) There are two files. One contains the instructions for adding this variation to Related Products 3.3-c. The second is the related products code in a separate file, to be installed in the includes/modules/ directory. I'm doing something new today. I'm attaching the files to the post. (One of the perks of being a community sponsor!) If you have any trouble getting these files, send me a PM with your email address, and I'll send them to you directly. -Skittles Oops! There's one instruction missing from the text file: In application_top, find: if (DISPLAY_CART == 'true') { $goto = FILENAME_SHOPPING_CART; $parameters = array('action', 'cPath', 'products_id', 'pid'); } else { $goto = basename($PHP_SELF); if ($HTTP_GET_VARS['action'] == 'buy_now') { $parameters = array('action', 'pid', 'products_id'); } else { $parameters = array('action', 'pid'); } } And replace it with: if (DISPLAY_CART == 'true') { $goto = FILENAME_SHOPPING_CART; $parameters = array('action', 'cPath', 'products_id', 'pid'); // bof: Related Products Buy Now Variation; by Skittles. } elseif ($HTTP_GET_VARS['action'] == 'rp_buy_now') { $goto = FILENAME_PRODUCT_INFO; $parameters = array('action', 'pid', 'rp_products_id'); // eof: Related Products Buy Now Variation; by Skittles. } else { $goto = basename($PHP_SELF); if ($HTTP_GET_VARS['action'] == 'buy_now') { $parameters = array('action', 'pid', 'products_id'); } else { $parameters = array('action', 'pid'); } } And I thought I was being so careful, too. :blush: -Skittles Quote Link to comment Share on other sites More sharing options...
♥Skittles Posted December 6, 2006 Share Posted December 6, 2006 [ Skittles,I'd like to see it set up so that once a product is added to the cart, the optional related products are displayed and can be added to the cart as well. However, if a product has attributes, you just about have to take the customer to the product page first. If it was really sophisticated, it would add the item to the cart if there were no attributes and take them to the product page if there were attributes. BD Baddog, The changes per tbruelan's request are about halfway there! The button uses an 'action' based on the existing action switch "case 'buy_now'" in application_top.php. The new action is 'rp_buy_now'. It looks to see if the product has attributes. If it doesn't, the product is placed in the cart, otherwise the visitor is taken to the product page. As written, if you set 'Display Cart After Adding Product' to true, adding a Related Product to the cart would bring you right back to the cart. The next part of the puzzle is determining what product ID to use in determining the "Related Products". -Skittles Quote Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted December 6, 2006 Share Posted December 6, 2006 Have you clicked on Related Products under Catalog in Admin and set up any related products? Yes I have, I linked a router to a wifi adapter but when I look at either product nothing is displayed as a related product Router Wifi Adapter Screen Shot From Admin Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted December 6, 2006 Share Posted December 6, 2006 I fixed it Yaaaaaa On an unrelated problem I had that I also fixed i have fixed the related products aswell :D I had copied my live store into another folder and a new DB. I changed everything in the php files to point to the new folder and everything seemed fine, yet when I clicked on link it was taking me to my live store. I had omited to changed my .htaccess file to point to the new folder instead of my live store :-" All seem to work now Thanks to: Baddog Skittles For taking the time to try and help. I posted my resolution here as it may help other people on either this contrib or others. Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
♥Skittles Posted December 7, 2006 Share Posted December 7, 2006 I fixed it Yaaaaaa On an unrelated problem I had that I also fixed i have fixed the related products aswell :D Glad to hear you got it working now. The symptoms really looked like either the code hadn't been added to products_info.php or that no products had been "related". As both steps were completed, it was a real mystery. Glad it was something relatively simple. By the way, if you haven't figured it out yet, relationship only works one way. For example, you relate the Router (slave) to the Wireless Adapter (master). When viewing the product page for the Wireless Adapter, the router will be displayed with the Related Products. However, when viewing the product page for the Router, the Wireless Adapter will not be displayed with the Related Products. To relate both ways, you would also need to select the Router as the master product and relate the Wireless Adapter as the slave. This master/slave terminology isn't used (yet) in Admin/Catalog/Related Products. The master product is the left column, labeled "Product Name(To)". The slave is the right column. labeled "Product Name(From)". I haven't done any work in the Admin portion of the Contrib. When I do, I'll look into the possibility of adding a button that adds the relationship both ways at once. I suspect that would save a lot of work for a significant number of shops... Happy Holidays! -Skittles Quote Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted December 7, 2006 Share Posted December 7, 2006 I haven't done any work in the Admin portion of the Contrib. When I do, I'll look into the possibility of adding a button that adds the relationship both ways at once. I suspect that would save a lot of work for a significant number of shops... Happy Holidays! -Skittles Sounds like a fantastic idea :D Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
Guest Posted December 7, 2006 Share Posted December 7, 2006 I believe I have your buttons for you :) Thanks a LOT, that solved it :D Quote Link to comment Share on other sites More sharing options...
♥Skittles Posted December 7, 2006 Share Posted December 7, 2006 Thanks a LOT, that solved it :D Just glad I could help. Happy Holidays. -Skittles Quote Link to comment Share on other sites More sharing options...
garysgal Posted December 21, 2006 Share Posted December 21, 2006 BEAUTIFUL CONTRIBUTION!!! I love it! I do have one question however - I was able to remove the pricing, I just wanted the products listed... but is there a way to make a vertical divider line or some other way of separating the products in the list? HERE you can see what I mean... But I love this contribution!!! Quote Link to comment Share on other sites More sharing options...
♥Skittles Posted December 22, 2006 Share Posted December 22, 2006 BEAUTIFUL CONTRIBUTION!!! I love it! I do have one question however - I was able to remove the pricing, I just wanted the products listed... but is there a way to make a vertical divider line or some other way of separating the products in the list? HERE you can see what I mean... But I love this contribution!!! garysgal, I've done vertical lines in product listings, (example: futon covers, three to a row.) but I used CSS instead of tables. This contribution follows the traditional layout of osCommerce, which creates a table for the related products. I honestly do not have the time right now to convert this contrib to a css layout, or hybrid css/tabled layout. Sorry. The page you reference (above) has product images four to a row, but the related products are at three per row. You do know you can change that to four in the Admin, right? :) Merry Christmas! -Skittles Quote Link to comment Share on other sites More sharing options...
mark27uk3 Posted January 15, 2007 Share Posted January 15, 2007 Hi Skittles, This is a great contrib, love it to bits. I have 2 questions for you if you dont mind :thumbsup: Question 1: I have added class="infoBox" and class="infoBoxContent" to the related products table, the only problem is it displays the infobox borders even if there are no products selected to be displayed. I am presuming I need an if/else to differeniate between with related products and without related products, just not sure what to put and where? Question 2: I read in an early post that you were going to look into 2 way relationships between products, did you get any further with that? Many Thanks Mark Quote Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
♥Skittles Posted January 16, 2007 Share Posted January 16, 2007 (edited) Hi Skittles, This is a great contrib, love it to bits. I have 2 questions for you if you dont mind :thumbsup: Question 1: I have added class="infoBox" and class="infoBoxContent" to the related products table, the only problem is it displays the infobox borders even if there are no products selected to be displayed. I am presuming I need an if/else to differeniate between with related products and without related products, just not sure what to put and where? Question 2: I read in an early post that you were going to look into 2 way relationships between products, did you get any further with that? Many Thanks Mark Mark, Thank you, on behalf of the eight other contributors, as well as myself. It really has been a "team" effort. Answer 2: Not yet. But I really want to do it. Answer 1: Assuming you are using the latest version, there is already an "if" statement at the beginning of the code: if (mysql_num_rows($attribute_query)>0) { $attribute_query will only be greater than zero if there are one or more related products. If there are no related products, the code is skipped altogether. So if you are getting borders anyway, you've added the "class=infoBox" and "class=infoBoxContent" in the wrong place. Or so it would seem. Why not PM me the modified code and I'll be happy to take a peek. -Skittles Edited January 16, 2007 by Skittles Quote Link to comment Share on other sites More sharing options...
♥Skittles Posted February 3, 2007 Share Posted February 3, 2007 Answer 1: Assuming you are using the latest version, there is already an "if" statement at the beginning of the code: if (mysql_num_rows($attribute_query)>0) { $attribute_query will only be greater than zero if there are one or more related products. If there are no related products, the code is skipped altogether. So if you are getting borders anyway, you've added the "class=infoBox" and "class=infoBoxContent" in the wrong place. Or so it would seem. Why not PM me the modified code and I'll be happy to take a peek. -Skittles Just thought I should let you all know, mark27uk3 and I resolved his problem via PM. He did, in fact, have the styles in the wrong place. -Skittles Quote Link to comment Share on other sites More sharing options...
♥Skittles Posted March 5, 2007 Share Posted March 5, 2007 I'd just like to let everyone know, Version 4.0 had been released. Lots of new goodies: Most of the suggestions from this thread and some things that just made sense to me. I've started a new support thread just for Version 4: http://www.oscommerce.com/forums/index.php?showtopic=251243 Want a sneak peek, without having to download the archive? Check out the html User's Guide on my site. Includes images and screenshots! I had several forum members help by beta testing it before the release, so hopefully all the bugs have been found and squashed. And if you've ever had problems running the sql statements, or just forgetting to add them, you'll appreciate the new sql setup utility. I hope you all like the new release. -Skittles Quote Link to comment Share on other sites More sharing options...
Kevin.Dallas Posted March 12, 2018 Share Posted March 12, 2018 great addon however i try implementing on the advance_search due to id number not bing static i am having issues, has anyone implementing on advance_search ? 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.