rseigel Posted September 19, 2012 Share Posted September 19, 2012 I have a simple script I use to update the quantities (from a dropshipper). It works fine but when a product goes from 0 to "something more than 0" Presta doesn't send the "Back in Stock" email to customers (I've tested this myself and it just doesn't work). Is there something I can do to force it to either fire the required code already built in or something I can add to make it happen outside of Presta? Here's the code (feel free to offer any suggestions to make it more efficient as well): $row = 0;$update_table = "product";$update_table_2 = "product_attribute";$handle = fopen("GeneratedList.csv", "r+");while (($data = fgetcsv($handle, 100000, ",")) !== FALSE) { $num = count($data); $row++; for ($c=0; $c < $num; $c++) { if ($c = 1) { $supplier_reference = $data[($c-1)]; } if ($c = 2) { $quantity = $data[($c-1)]; mysql_query("UPDATE $update_table SET quantity='$quantity' WHERE supplier_reference='$supplier_reference'"); mysql_query("UPDATE $update_table_2 SET quantity='$quantity' WHERE supplier_reference='$supplier_reference'") or die(mysql_error()); } [spam-filter]fclose($handle);echo " - - - B&F INVENTORY UPDATE SUCESSFULY COMPLETED - - - "; TIA! Link to comment Share on other sites More sharing options...
rseigel Posted September 19, 2012 Author Share Posted September 19, 2012 Hmmm.....would it be as simple as adding: include $_SERVER['DOCUMENT_ROOT']."/modules/mailalerts/mailalerts-ajax_check.php"; I'm going to try and see. Stay tuned..... Link to comment Share on other sites More sharing options...
rseigel Posted September 19, 2012 Author Share Posted September 19, 2012 Ok...that didn't work. Link to comment Share on other sites More sharing options...
rseigel Posted September 20, 2012 Author Share Posted September 20, 2012 Any ideas? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now