dreamscape Posted January 5, 2003 Share Posted January 5, 2003 I've just uploaded a contribution that changes the "buy now" links to forms. http://www.oscommerce.com/community/contributions,864 Q: Why would I want to do this? A: This mod is intended as a compliment to Ian's SID killer (http://www.oscommerce.com/forums/viewtopic.php?t=25595). Ian's mod kills the SID unless a user is logged in or something is in the cart. Since the "buy now" buttons are links, a spider or bot (like our friend googlebot) can add items into your cart, creating a SID. This is bad. Doing this mod will change those links to forms, making it pretty impossible for a spider or bot to fill up your cart. Enjoy :) Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
dreamscape Posted January 7, 2003 Author Share Posted January 7, 2003 Version 1.01: release date 01/07/2003 * A change in the directions made to Step 2 to avoid confusion. No actual coding changes. http://www.oscommerce.com/community/contributions,864 Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
Ian Posted January 7, 2003 Share Posted January 7, 2003 Joshua, Cheers mate, you just decreased my 'infinite' todo list by one. I haven't downloaded the code yet but hope to try it this weekend. A big thumbs up. (unfortunately infinity-1 = infinity) Quote Trust me, I'm an Accountant. Link to comment Share on other sites More sharing options...
CC Posted January 7, 2003 Share Posted January 7, 2003 (unfortunately infinity-1 = infinity) LOL! Aint that the same for everyone dude!! :( CC. Quote Link to comment Share on other sites More sharing options...
MikeMike Posted January 15, 2003 Share Posted January 15, 2003 Joshua, (unfortunately infinity-1 = infinity) Well, at least a little less infinity than before :shock: :shock: Quote Link to comment Share on other sites More sharing options...
scottymcloo Posted February 9, 2003 Share Posted February 9, 2003 Hi, Would I be correct in assuming that the following code in your instructions at step 3: <?php echo '<form name="buy_now" 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="' . $product_info_values['products_id'] . '">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></form> should be changed to <?php echo '<form name="buy_now" 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="' . $reviews_values['products_id'] . '">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></form> for the latest snapshot - ie the File: /catalog/product_review_info.php was changed on 6/02/2003 and uses $reviews_values instead of $product_info_values Thanks for the contribution - the work is greatly appreciated. Graeme Quote Link to comment Share on other sites More sharing options...
sokkerbob Posted February 10, 2003 Share Posted February 10, 2003 Hey thanks for the contribution. However, I am having troubles getting item to display in shopping cart after changing the HTTP_GET_VARS to HTTP_POST_VARS. Clicking the "Buy Now" button sends me to shopping_cart.php, but there is no information. However, I can go through the entire checkout process like there is an item in cart (It even sends me an email confirmation with no products listed and the "ghost" order shows up in the Admin section). After I have processed order, the cart will empty the "ghosts" and if I click on shopping cart button I will get message that "shopping cart is empty!" It seems like item is not getting added to properly to database (which I assume is the sessions DB) If I change back to HTTP_GET_VARS, everything is fine. I tried on two snapshots and both are post Nov 16. (One is Ian's November loaded) I found one thread http://www.oscommerce.com/forums/viewtopic.php?t=32946 that was having similar problems but they went away for some mysterious reason before the solution could be found Any ideas? I know just enough about PHP to be dangerous. Quote Link to comment Share on other sites More sharing options...
dreamscape Posted February 11, 2003 Author Share Posted February 11, 2003 ask Ian, if you follow the directions correctly, then it will accept the HTTP_POST method... if you didn't follow the directions, then I really cannot help you. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
Ian Posted February 11, 2003 Share Posted February 11, 2003 Ask Joshua:lol: I've just installed Joshua's code on a clean snapshot. I did get the problem you were talking about, but only because I didn't make sure that all $HTTP_GET_VARS were changed to $HTTP_POST_VARS. Now works with no problems Quote Trust me, I'm an Accountant. Link to comment Share on other sites More sharing options...
sokkerbob Posted February 11, 2003 Share Posted February 11, 2003 Thanks Ian and Josh. I will re-read the instructions again. But first I will make sure I have a good night's rest. As I mentioned before, I know just enough to miss the obvious. Keep up the good work Quote Link to comment Share on other sites More sharing options...
sokkerbob Posted February 11, 2003 Share Posted February 11, 2003 FYI. Problem was instead of having a product_listing.php file, I had a product_listing_col.php file. I changed code for product_listing per instruction, but did not change product_listing_col.php file. All is fine now. Works perfectly. Quote Link to comment Share on other sites More sharing options...
Tarnadair Posted February 13, 2003 Share Posted February 13, 2003 Graeme would be correct (I think [and hope] :shock: ) Had me puzzled for a few minutes. Step 3 needs to be changed a little if you're installing Joshua's button keeler. :-) You have to change your search string a little, and the change you make since Version 1.45 changed $product_info_values to $review_values in the specified line. Quote Link to comment Share on other sites More sharing options...
dreamscape Posted February 14, 2003 Author Share Posted February 14, 2003 Graeme would be correct (I think [and hope] :shock: ) Had me puzzled for a few minutes. Step 3 needs to be changed a little if you're installing Joshua's button keeler. :-) You have to change your search string a little, and the change you make since Version 1.45 changed $product_info_values to $review_values in the specified line. thats only in newer snapshots... I run a mid november 2002 snapshot and everything I develop I develop for that snapshot. I do not support or develop for newer snapshots... Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
toolcrazy Posted February 14, 2003 Share Posted February 14, 2003 I can't find this contrib. The link that is provided isn't anymore. Thanks. Quote Steve ------------------------- Link to comment Share on other sites More sharing options...
dreamscape Posted February 14, 2003 Author Share Posted February 14, 2003 oh thats cause Ian moved it on the same page as his SID killer... let me see here... here we go http://www.oscommerce.com/community/contributions,952 Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
toolcrazy Posted February 14, 2003 Share Posted February 14, 2003 Ok, ok! I missed it. I did find this page, but I didn't bother to read the whole page. :oops: So, I guess from now on I should read before I jump. Quote Steve ------------------------- Link to comment Share on other sites More sharing options...
smartwork Posted April 14, 2003 Share Posted April 14, 2003 I've installed the "buy now to forms" contribution and almost everything is working fine, BUT... I've got the product_listing_col contribution which displays my products in columns. So... I think I need to modify the product_listing_col file. Right now, click the buynow button results in going to the shopping cart with the "cart is empty message". I think this is where I need to modify - but I'm not sure what exactly should be inserted here - even after rereading all the install info for comparison sake in hopes of deducing a conclusion: if (PRODUCT_LIST_BUY_NOW) { $lc_text .= '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing_values['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $listing_values['products_name'] . TEXT_NOW) . '</a> '; } Anyone? Quote Link to comment Share on other sites More sharing options...
sokkerbob Posted April 14, 2003 Share Posted April 14, 2003 I had same problem. You are right on track. Just replace with code provided for product_listing.php. Quote Link to comment Share on other sites More sharing options...
smartwork Posted April 14, 2003 Share Posted April 14, 2003 Hmmm... well, I think I've got it but on a couple products (original testing products from installation), the buy now button takes you to the product page rather than putting the item in the cart. ??? -shaun Quote Link to comment Share on other sites More sharing options...
AG Posted May 23, 2003 Share Posted May 23, 2003 I've just uploaded a contribution that changes the "buy now" links to forms. http://www.oscommerce.com/community/contributions,864 quote] Could someone please tell me where I can find this contribution? It seems a recent contribution but can't find it. AG Quote Link to comment Share on other sites More sharing options...
dreamscape Posted May 23, 2003 Author Share Posted May 23, 2003 oh thats cause Ian moved it on the same page as his SID killer... let me see here... here we go http://www.oscommerce.com/community/contributions,952 Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
AG Posted May 23, 2003 Share Posted May 23, 2003 Thanks for the link but is that mean I have to install Ian's sid killer?? I've already got Burt's sid killer which may confuse the system :? AG Quote Link to comment Share on other sites More sharing options...
dreamscape Posted May 23, 2003 Author Share Posted May 23, 2003 no scroll down the list & you will see the file ""buy now" links to forms v1.01" Ian moved it to the same page as his Sid killer cause... well I really can't remember why it moved it there Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
AG Posted May 23, 2003 Share Posted May 23, 2003 Doh! Didn't realise it was right down the bottom of the sid killer contribution. It should have stayed!? where it was as a separate contribution. Bit confusing but never mind. Someone else will may be able to find it now too. I've been hammering my computer for nearly 14 hours today and my eyes are like one of those goldfish :shock: Thank you. AG Quote Link to comment Share on other sites More sharing options...
Guest Posted August 16, 2003 Share Posted August 16, 2003 I have read through this thread and all the others I can find having to do with this but I am still having a problem that seems like a common one, only I am not missing the http_post_vars like the person before. As you probably could guess when the buy now button is clicked I get a what is in my cart? type of message. I have gone over the directions several times over and tried to make it work but I keep having the same problem. Any help please? Dave 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.