Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Buy Now button on home page problem


luckyphil

Recommended Posts

Hi to all!

 

Hoping someone could point me in the correct direction with this problem.

 

Just configuring a new oscommerce and it seems that the buy now button on the home page adds the same product to the cart no matter which buy now product button is used.

 

What I mean is, that there is 4 different products on the home page and it doesn't matter which button is used, it adds the same product each time.

 

This is the url that appears from the buy now buttons www.mywebstore.com/store/product_info.php?action=add_product there is no product identifying info. This appears to be only on the home page. I'm using a template but I have tried using the original product_info.php and it seems to be the same.

 

Any ideas would be much appreciated.

 

Thanks

 

Phil

Link to comment
Share on other sites

Hi to all!

 

Hoping someone could point me in the correct direction with this problem.

 

Just configuring a new oscommerce and it seems that the buy now button on the home page adds the same product to the cart no matter which buy now product button is used.

 

What I mean is, that there is 4 different products on the home page and it doesn't matter which button is used, it adds the same product each time.

 

This is the url that appears from the buy now buttons www.mywebstore.com/store/product_info.php?action=add_product there is no product identifying info. This appears to be only on the home page. I'm using a template but I have tried using the original product_info.php and it seems to be the same.

 

Any ideas would be much appreciated.

 

Thanks

 

Phil

 

 

EXACTLY, i got the exact same problem. This is a bug with the new version because the same code works with the older version.

i know exactly what you are talking about.

 

please, if you found the answer, please post it here, and i will do the same if i have it.

 

thank you

and thank you all for helping

Link to comment
Share on other sites

Thanks for the reply antiquestore, I've spent hours going through files and I just can't see what it is that is causing this problem.

 

Some advice about what to look for or any ideas from anyone, would really be appreciated.

 

The test store is here and as you can see, if you select buy now on any of the four items, the item in the bottom right corner, the fans, are added to the cart.

 

The program is not passing on the id info of the product selected, can anyone help with where to look and what I might need to look for, to find and rectify the problem.

 

Thanks

 

Phil

Link to comment
Share on other sites

Hi,

 

Can anyone tell me if there is a problem in this line of code that would cause the problem as per the first post please?

 

<td width="56">' . tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')) . tep_draw_hidden_field('products_id', $new_products['products_id']) . tep_image_submit('BuyIt.jpg', IMAGE_BUTTON_IN_CART) . '</td>

 

This code is located in includes/modules/new_products.php

 

Phil

Link to comment
Share on other sites

Hi,

 

I have the same problem, in my case, my index file call /include/modules/product_listing.php. Buy Now button not working in index page. In other places, such as product_info.php, new_product.php is fine. Maybe the problem come from index.php. Hope someone can help with the solution.

 

 

 

 

Regards.

:blink:

Link to comment
Share on other sites

Unfortuanately I can't spend any more time trying to fix this at the moment so I have removed the buy it now button from the home page. But I would like to have the buy now button active on the home page. If someone does come up with an answer, I really would appreciate the info.

 

Thanks

 

Phil

Link to comment
Share on other sites

I ended pay someone to fix it. :blink:

 

In my case, there was a missing codes for the product number, so item was not added to cart when click because no reference to which item should be added. To fix it, look in the index.php to which file it call to display the main page, possibly 1 of these

 

products_new.php

/includes/modules/new_products.php

/includes/modules/product_listing.php

 

Hope it help.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...