ilario Posted February 16, 2015 Share Posted February 16, 2015 good morning I'd need a module... but I just added a codeI would like to send an email when the order confirmation, if one of the products available are some belonging to certain categories thank you very muchilario Link to comment Share on other sites More sharing options...
bellini13 Posted February 16, 2015 Share Posted February 16, 2015 (edited) This function will return true if the product exists in one of the provided categories Product::idIsOnCategoryId(id_product, array_of_category_id) So I would suggest you create a new module that implements the 'actionValidateOrder' hook. When a new order is created, your module will be executed, and you will have a chance to send your email. In your hookActionValidateOrder function, you would then need to iterate through each product, executing the 'idIsOnCategoryId' I noted above. If that function returns true for any of your products, then you can execute your email. Providing you a module or code for this is way outside the scope of a forum topic, so I hope you are just asking for some guidance. Edited February 16, 2015 by bellini13 (see edit history) Link to comment Share on other sites More sharing options...
ilario Posted February 16, 2015 Author Share Posted February 16, 2015 This function will return true if the product exists in one of the provided categories Product::idIsOnCategoryId(id_product, array_of_category_id) So I would suggest you create a new module that implements the 'actionValidateOrder' hook. When a new order is created, your module will be executed, and you will have a chance to send your email. In your hookActionValidateOrder function, you would then need to iterate through each product, executing the 'idIsOnCategoryId' I noted above. If that function returns true for any of your products, then you can execute your email. Providing you a module or code for this is way outside the scope of a forum topic, so I hope you are just asking for some guidance. thanks for the reply and for the advice but you managed to make me work (paid)? Link to comment Share on other sites More sharing options...
bellini13 Posted February 16, 2015 Share Posted February 16, 2015 Yes, I am available to hire if you are looking for a paid solution. I was just trying to give you direction incase you wanted to do this yourself. Feel free to send me PM or contact me on my website with all your requirements, and I can provide you with an estimate. 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