Jump to content

Edit History

TinoArts

TinoArts


additional info

I'm running Presta 1.7.5.0 and Mail Alerts module v2.1.1. I have SMTP configured and my store is sending e-mails just fine.

I am trying to set up "Notify me when available" option, but it doesn't seem to work. I put my e-mail address into the form, and the success message saying I will be notified displays. Then, when I update the stock for this product - so it is available again, I get no e-mail whatsoever.

Interesting thing is, when I put my e-mail into the form again (even though I've changed stock Qtys in the meantime - so the product was available, and unavailable again), it says "You already have an alert for this product". So, the email logging is just fine. What doesn't work is sending the e-mail and removing the logged addresses from the database. Or, perhaps - is setting the stock qty from 0 to positive number not considered available? Do I have to change other product parameters so it becomes available? (I can add it to cart and purchase it, it seems available to me)

I tried to look into email logs inside Advanced parameters > Email, and it is not there as well, even though email logging is turned on.

What could be the problem?

IMPORTANT EDIT: Mea culpa. It works when I edit the stock quantity (change it from 0 to positive number) in the back office. It does not work when I change it programatically using my stock sync functions.This is the function that updates qty every minute. What could be the problem?

// sync once per 60sec
        if ($lastsync+60 < time()) {
            $qty = \kncSync::getProductStock((int)$id_product);

            $context = Context::getContext();
            $shop = $context->shop;

            Db::getInstance()->insert('stock_available', array(
                'id_shop' => (int)$shop->id,
                'quantity' => (int)$qty,
                'lastsync' => time(),
                'id_product' => (int)$id_product,
                'id_product_attribute' => (int)$id_product_attribute
                ),
                false, true, Db::ON_DUPLICATE_KEY);

            Cache::store($key, $qty);
            Cache::store($key2, time());

            return $qty;
        }

 

TinoArts

TinoArts


additional info

I'm running Presta 1.7.5.0 and Mail Alerts module v2.1.1. I have SMTP configured and my store is sending e-mails just fine.

I am trying to set up "Notify me when available" option, but it doesn't seem to work. I put my e-mail address into the form, and the success message saying I will be notified displays. Then, when I update the stock for this product - so it is available again, I get no e-mail whatsoever.

Interesting thing is, when I put my e-mail into the form again (even though I've changed stock Qtys in the meantime - so the product was available, and unavailable again), it says "You already have an alert for this product". So, the email logging is just fine. What doesn't work is sending the e-mail and removing the logged addresses from the database. Or, perhaps - is setting the stock qty from 0 to positive number not considered available? Do I have to change other product parameters so it becomes available? (I can add it to cart and purchase it, it seems available to me)

I tried to look into email logs inside Advanced parameters > Email, and it is not there as well, even though email logging is turned on.

What could be the problem?

TinoArts

TinoArts

I'm running Presta 1.7.5.0 and Mail Alerts module v2.1.1. I have SMTP configured and my store is sending e-mails just fine.

I am trying to set up "Notify me when available" option, but it doesn't seem to work. I put my e-mail address into the form, and the success message saying "You already have an alert for this product" displays. Then, when I update the stock for this product - so it is available again, I get no e-mail whatsoever.

I tried to look into email logs inside Advanced parameters > Email, and it is not there as well, even though email logging is turned on.

What could be the problem?

×
×
  • Create New...