shelby72 Posted November 21, 2008 Share Posted November 21, 2008 I cannot get the add to cart to work in new_products.php, products_new.php, or whats_new.php. It works fine in product_listing.php and product_info.php. I've searched google and all through the forums and still can't figure this out. I installed the Sharp-Grey-Osc template on my site and I've also installed the short description in products contribution. Here is what the code in my new_products.php looks like: <a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id']) . '">' . tep_image_button('cart_buy.gif', IMAGE_BUTTON_IN_CART) . '</a> I installed the add quantity to product listing contribution and this is the changes I had to make in my application_top.php code in order to get my product_listing.php and product_info.php add to cart to work: case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+ (int)$HTTP_POST_VARS['quantity'], $HTTP_POST_VARS['id']); Here is my configure.php file info: <?php define('HTTP_SERVER', 'http://sparklespot.com'); define('HTTPS_SERVER', 'https://sparklespot.com'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', 'sparklespot.com'); define('HTTPS_COOKIE_DOMAIN', 'sparklespot.com'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/catalog/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/var/www/vhosts/sparklespot.com/httpdocs/catalog/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', ''); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> I also tried turning register globals on and that doesn't help either. What else could be the problem? Quote Link to comment Share on other sites More sharing options...
shelby72 Posted November 21, 2008 Author Share Posted November 21, 2008 I solved my problem. It was in the application_top.php. I had installed the add quantity to product_listing.php contribution which messed everything up. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.