View Single Post
  #46  
Old 01-15-2005, 10:37 AM
  shishapipe's Avatar 
shishapipe shishapipe is offline
 

Advanced Member
  
Join Date: Dec 2004
Location: London
Posts: 47
 

Default

Quote:
Originally Posted by funkydunk
modify away.....
Ok because Funkydunk has allowed me to modify the product, i have been sucessful on some of the code in X-cart 4.09

This is the shopcart/notify.php file for X-Cart 4.09
Code:
<?php # # $Id: notify.php, X-Cart 4.09 2005/01/18 Maxking Exp $ # require "./auth.php"; # # Put all product info into $product array # $product_info = func_select_product($productid, @$user_account['membership']); if (intval($cat) == 0) { $cat = $product_info["categoryid"]; } $main = "product"; $smarty->assign("main",$main); include $xcart_dir.DIR_CUSTOMER."/send_to_friend.php"; if(!empty($active_modules["Product_Configurator"])) include $xcart_dir."/modules/Product_Configurator/pconf_customer_product.php"; if(!empty($active_modules["Detailed_Product_Images"])) include $xcart_dir."/modules/Detailed_Product_Images/product_images.php"; if(!empty($active_modules["Product_Options"])) include $xcart_dir."/modules/Product_Options/customer_options.php"; if(!empty($active_modules["Upselling_Products"])) include $xcart_dir."/modules/Upselling_Products/related_products.php"; if(!empty($active_modules["Advanced_Statistics"])) include $xcart_dir."/modules/Advanced_Statistics/prod_viewed.php"; if($active_modules["Manufacturers"]) include $xcart_dir."/modules/Manufacturers/customer_manufacturers.php"; require $xcart_dir."/include/categories.php"; # NOW WE START WITH THE CHANGED FUNKYDUNKS CODE if(($login)&& ($product_info != "") && ($active_modules["stock_notify"])) { // ie they are logged in and have selected a product // echo "logged and ready to roll"; if (!empty($login)) $userinfo = func_userinfo($login,$login_type); // echo $userinfo['email']; // deletes their email if they are already watching this product db_query("DELETE FROM `xcart_notify` WHERE email='".$userinfo['email']."' AND productid= '$productid'"); // add them to the notify table db_query("INSERT INTO `xcart_notify` ( `email` , `productid` ) VALUES ('".$userinfo['email']."','$productid')"); } else { if (($guestemail) && ($product_info != "") && ($active_modules["stock_notify"])){ // ie they are NOT logged in and have selected a product // echo "NOT LOGGED and ready to roll"; // echo $guestemail // deletes their email if they are already watching this product db_query("DELETE FROM `xcart_notify` WHERE email='".$guestemail."' AND productid='$productid'"); // add them to the notify table db_query("INSERT INTO `xcart_notify` ( `email` , `productid` ) VALUES ('".$guestemail."','$productid')"); // $smarty->assign("guestlogged","true"); } else{ if ($guest!="true"){ header("Location: error_message.php?access_denied"); exit(); } } } # END OF THE CHANGED FUNKYDUNKS CODE $smarty->assign("productid", $productid); $smarty->assign("userinfo", $userinfo); $smarty->assign("product",$product_info); $smarty->assign("main","notify"); # Assign the current location line $smarty->assign("location", $location); func_display("customer/home.tpl",$smarty); ?>


If you go to
http://www.shisha.co.uk/shopcart/notify.php?productid=16246&guest=true

You will now see it works for guests and members, but not checked email side yet.

You need to add the below to the SQL database.
__________________
Regards Maxking

SERVER: Microsoft-IIS/5.0
MYSQL Server: 4.0.18-NT
PERL: 5.006001
PHP: 4.3.6
X-CART pro: 4.3
X-AOM: 4..3
X-RMA: 4..3X-FancyCategories 4.3
Skin: Own Design
Marketing Manager Professional 3.0 Bundle
Reply With Quote