Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Biy now buttons not working


Silverado05

Recommended Posts

Hello on my product listing page I have noticed the other day that my Buy Now or Add to cart button is not working on my product listing page. Can someone take a look and see if their is anything wrong. I have made no changes to it lately.

 

 

here is the code from the product_listing.php

 

	 $lc_align = 'center';
		if ((STOCK_CHECK == 'true')&&(tep_get_products_stock($listing['products_id']) < 1)) {
		  $lc_text = ' ';
		} else {
		  $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . '<table  cellSpacing="0" cellPadding="0" width="100%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=2 maxlength=2') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle') . '</td>
</tr></table></form>';
		}

 

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

I have made no changes to it lately.

Funny :D

 

The portion you show is definitely no stock osC product_listing.php so you have made changes in the past. It might help if you tell what contribs, or your own custom changes, you have put into the product_listing.php and show the whole code as this says nothing.

Link to comment
Share on other sites

Well for one I never said I didn't change the file. Like you quoted me I said "I have made no changes to it LATELY. It has worked for the past 6-7 months and I have not made any changes to it LATELY to prior to it not working.

 

Regardless of what contribution I have installed if their is a problem with the coding for the button then it wouldn't work. Can anyone look over the code and see if you notice anything?

 

case 'PRODUCT_LIST_BUY_NOW':
		$lc_align = 'center';
		if ((STOCK_CHECK == 'true')&&(tep_get_products_stock($listing['products_id']) < 1)) {
		  $lc_text = ' ';
		} else {
		  $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . '<table  cellSpacing="0" cellPadding="0" width="100%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=2 maxlength=2') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle') . '</td>
</tr></table></form>';
		}
		break;

 

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Just trying to help but suit yourself.

 

 

Doesn't appear to seem that way.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Anyone?

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Have there been any recent changes to the application_top.php ?

If you go to the products_new.php does the buy now button work on that page?

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

No I have not made any changes to application_top.php. I have not made any changes to my shop for at least 3-4 months All my other buy now or add to cart buttons work with the exception of the product listing page. Any ideas or suggestions?

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

have you tried closing the link with the missing </a> tag

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...