Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

a problem with "buy now" in product_listing.php


Guest

Recommended Posts

hello everone

i get error.when i click the button "buy now" in product_listing.php,it leads to the cart but the product isn't in it : your cart is empty. i tested and the button buy now in product_info and new_products is ok.what is the problem with product_listing.php?

here my product_listing.php,any help would be appreciate!

 

thanks in advance

<tr><td colspan=2 align=center><a href="'.tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image_button('small_view.gif', IMAGE_BUTTON_BUY_NOW) . '</a> <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('[b]button_in_cart.gif[/b]', IMAGE_BUTTON_BUY_NOW) . '</a></td></tr>

 

and here's in new_products.php

<tr><td colspan=2 align=center><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image_button('small_view.gif', IMAGE_BUTTON_BUY_NOW) . '</a> <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id']) . '">' . tep_image_button('[b]button_in_cart.gif[/b]', IMAGE_BUTTON_BUY_NOW) . '</a></td></tr>
							 <tr><td colspan=2 height=12></td></tr>

Link to comment
Share on other sites

probably has something to do with your configuration. Is the session id the same? (listing page and shopping cart page)

 

thanks for your answer.can you tell me how to know whether the session id of listing page and shopping cart page are same?

Link to comment
Share on other sites

here's the link of buy now button in listing page:

http://localhost/shop/productname-c-21.html?products_id=2553&action=buy_now&sort=2a&osCsid=c5849f13b733c5604d936d2c02af00c0

after pressing button buy now,it leads to the shopping cart page with the link in the address bar:

http://localhost/shop/shopping_cart.php?sort=2a&osCsid=c5849f13b733c5604d936d2c02af00c0

and no product is in cart :((

Link to comment
Share on other sites

  • 11 months later...

Hey,

 

I do have the same issue... the buy now button links to the product and when I click on it it takes me to the shopping cart page with the empty car message only.

 

Please help!!

 

Sincerely,

 

Gvilla.

Link to comment
Share on other sites

Never mind, it had to see with application top and httaccess. :thumbsup: :rolleyes:

Hey,

 

I do have the same issue... the buy now button links to the product and when I click on it it takes me to the shopping cart page with the empty car message only.

 

Please help!!

 

Sincerely,

 

Gvilla.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...