Jump to content

Customer Mail Alert Issue


rseigel

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...