I am trying to create a "Notify me" feature if the stock is unavailable.
On search on admin panel, I could find only that a user should sign up / log in
to get notified about the stock availability.
But I just want to let the user (a guest) enter only his/her email address to get notified.
How should I do this?
Please give suggestions..
EDIT:
I have got this link, which gives me a way to start.
Till now what I did is added the following code in my template file which is creating a url for redirect (thinking to do it in ajax way, to stop page refreshing).
<?php
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$base64 = strtr(base64_encode($actual_link), '+/=', '-_,');
$postUrl = "http://$_SERVER[HTTP_HOST]/efk/productalert/add/stock/product_id/" . $simpleProduct->getId() . "/uenc/". $base64;
?>
In the above code, efk
is my project folder name.
After this, I have gone to productalert/add/stock
controller method i.e stockAction()
which is calling sign up / login
form (I think so) using $model->save();
.
How should I disable this save calling and add my own small overlay which holds a textbox to enter a email address?