Quote:
Originally Posted by funkydunk
http://www.prodynamix.co.uk/customer/product.php?productid=14&cat=20&page=1
It is available for purchase and download online.
|
I cant find this Stock Notify mod there, i have the old 3.4 Mod i think and i am trying to convert it to X-Cart 4.09., a friend of mine gave me this MOD to play with. Anyway i would prefer to buy this Mod for X-cart 4.09 as this is taking a lot of my time in trying to sort it out.
I have managed to get somewhere with this modification, but problem now on the email side.
I have changed the directory position of some of the files, for example notify.php is not in shopcart/customer/notify.php as per instructions its is now in shopcart/notify.php
Also the shopcart/skin1/main/product_modify.tpl as per instructions for X-Cart 3.4 was not changed but i inserted the code into shopcart/skin1/main/product_details.tpl for X-Cart 4.09 as i beleive this is the right place for it. (Open to suggestions

)
Code:
<?
# START - FROM SHOPCART/PRODUCT.PHP CODE X-CART 4.09
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";
# END - FROM SHOPCART/PRODUCT.PHP CODE X-CART 4.09
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 looged in and have selected a product
// echo "logged and ready to roll";
$userinfo = func_userinfo($login,$login_type);
# $userinfo = func_userinfo($login, $current_area, true);
// 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"])){
// 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();
}
}
}
$smarty->assign("productid", $productid);
$smarty->assign("userinfo", $userinfo);
$smarty->assign("product",$product_info);
$smarty->assign("main","notify");
# END OF THE CHANGED FUNKYDUNKS CODE
# START - FROM SHOPCART/PRODUCT.PHP CODE X-CART 4.09 AT THE END
# Assign the current location line
$smarty->assign("location", $location);
func_display("customer/home.tpl",$smarty);
# END - FROM SHOPCART/PRODUCT.PHP CODE X-CART 4.09 AT THE END
?>
Any help will be appriciated or a place where i can buy the complete version for X-cart 4.09 as this is a very good mod for x-cart.