Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Buy Now Button Error, Please Help


Danny1976

Recommended Posts

Posted

When I click on the menu on the left and I get the the item listed. I click on the BUY NOW button and I get Fatal error: Call to undefined function tep_has_product_attributes() in includes/application_top.php on line 367. Any idea what the problems can be.

Posted

Verify application_top.php has following line

require(DIR_WS_FUNCTIONS . 'general.php');

 

general.php defines the function

function tep_has_product_attributes($products_id)

 

Check code from switch in application_top.php, mentioned below is the default code

case 'buy_now' :	   
if (isset($HTTP_GET_VARS['products_id'])) {
if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
	  tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='.$HTTP_GET_VARS['products_id']));
} else {
 $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
	}
 }
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
  break;

Best Regards,
Gaurav

Posted

Thank you very much for your reply.....I was missing function tep_has_product_attributes($products_id) from the general.php in the includes/functions folder. I was going crazy trying to figure this out. Thank you again.

Archived

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

×
×
  • Create New...