Jump to content

Mailalert module implention to product-list.tpl


Recommended Posts

I am using this great module, bet it shows ability to mark unavailable items for reminds (mailalerts) just in product page (product.tpl) where customer who is browsing throw product lists and sees if item is unavailable mostly dont come.

 

I need ability to add remind (mailalert) in product-list.tpl near all products which are unavailable, but dont know hot to implent it.

 

In mailalert module where is aditional template file product.tpl, but how system knows how to use it and where to use it, I dont know.

 

Maybe I can use same way to add information in products-list.tpl which mailalaert?

 

Thank you for any help ;)

Link to comment
Share on other sites

Hello,

 

the Mail alerts sends the store owner a message if a product is out of stock.

 

To notify users of product availability you need to edit product.tpl with an input for customers to register their email address. Then you need to modify the AdminProducts.php, and in case the status changes from unavailable to available, you retrieve all email addresses registered to be notified and send them out the emails.

Link to comment
Share on other sites

Product.tpl is ok, it shows input for email address, but I want to insert same option if product unavalaible in product-list.tpl, near all unavailable products.

 

I dont know how to really do it, what parts of code from mailalerts are necassary for me. Can you help?

Link to comment
Share on other sites

You insert it in the product_list.tpl almost the same way as in product.tpl, with an if statement.

 

You do have to modify mail alert modules. When saving the product, before the update query would be executed, you need to check the current state of the product and the state it will be set to, so if you are setting a product from unavailable to being available you will send out the mails.

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...