Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Buy now button from categories not working, Add to cart Does!

button add to cart buy now

4 replies to this topic

#1 coolpot

  • Community Member
  • 2 posts
  • Real Name:steve

Posted 21 January 2012, 12:10

Hi, I just installed a fresh install of OSCommerce, the 2.x latest version, not the 3.x

I have a problem that i see others have had, but no fixes for it?

Basically the items when displayed in category view have "buy Now" buttons, they just dont work, and say " your cart is empty"

If i add a product via the product details page, i get a "add to cart" button, that works just fine!

I only really want the add to cart buttons, is there a easy fix for this?

Thanks, Steve!

also, i have not changed any file or anything, clean install, only thing i changed is i deleted the existing catagories, and added new ones via the admin panel.

#2 geoffreywalton

  • Community Sponsor
  • 7,731 posts
  • Real Name:Geoffrey Walton
  • Gender:Male
  • Location:Norfolk, UK (close to the centre of the universe)

Posted 21 January 2012, 12:41

Chat Result

Works now, spooky.

Also diredcted to show cart after adding prod param in admin

G
Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

Virus Threat Scanner
My Contributions
Basic install answers.
Click here for Contributions / Add Ons.
UK your site.
Site Move.
Basic design info.

For links mentioned in old answers that are no longer here follow this link Useful Threads.

If this post was useful, click the Like This button over there ======>>>>>.

#3 coolpot

  • Community Member
  • 2 posts
  • Real Name:steve

Posted 23 January 2012, 13:33

the problem randomly comes and goes, what i dont understand is this problem exists from others since 2006, but there have been no solutions, and yet its widespread?

i dont even understand why the catagory view gives the "buy now" buttons, that are so flakey, why cant you just have add to cart? these buttons have never gone wrong for me..

i should also note that this problem exists on multiple internet connections, browsers, computers, etc. its just random.

Edited by coolpot, 23 January 2012, 13:34.


#4 forgetmenot

  • Community Member
  • 2 posts
  • Real Name:Paula

Posted 09 February 2012, 13:04

I am experiencing the same trouble.
Working with oscommerce V2.3.1 (due to ancient php version on host), Windows7, applied German language package.

Usually, after placing an order from a product detail page with the "add to cart" button, the "buy now" button in the category product overview works. Rare exceptions. This procedure seems to change the code run by the "buy now" button. If the "products_id" parameter (variable value?) for the action "buy_now" contains an additional "&osCsid=..." then the shopping cart will be emptied completely, even if there were articles in it before. If the "products_id" parameter contains only the identification number of the product, then the article will be placed in the cart correctly.

e.g.
"action=buy_now&products_id=31" >> will work
"action=buy_now&products_id=31&osCsid=gqe0qwrc03rjup5bv8nl766ole5" >> will NOT work

The internet browser will usually indicate the "buy_now" call when you move the mouse pointer over the "buy now" button, so you can easily see what will happen when you actually click the button.
Now, I am trying to figure out where the code comes from, or the parameter value, respectively. I am no programmer...

Maybe my information will be of some help for tracking down the problem. And, of course, I would be very glad if some programmer Merlin could solve the problem :-)

#5 forgetmenot

  • Community Member
  • 2 posts
  • Real Name:Paula

Posted 09 February 2012, 15:04

Ok, "osCsid" is the session id. Nothing to do with "buy_now" action.

It's the "href=" part of the link <a> that is creating the trouble with the "buy now" button.
If the "href=" entry contains the session id (osCsid=...) at the end, the button does not work correctly.
Without the session id the button works ok.

@coolpot: which version of php does your host provide?
I am on 5.2.17 (Windows NT WL22 5.2 build 3790)