Hello everyone,
First of all, I am learning Opencart Coding. I need you help. I have weired request here. I add new email address attached to products. Every time, when this product was purchased, an email will be send to this assoicated address. I just want to know how to do that by coding. In short, what is the main required code for email function? How to use the product-email on coding level?
Many thanks.
First of all, I am learning Opencart Coding. I need you help. I have weired request here. I add new email address attached to products. Every time, when this product was purchased, an email will be send to this assoicated address. I just want to know how to do that by coding. In short, what is the main required code for email function? How to use the product-email on coding level?
Many thanks.
A few simple steps:
1. get the email address(s) assiociated with that product(s) (but what if several products with different address bought ??)
2. add the new code to send after the lines which send already the order confirmation to the customer
All this is done in the model/order.php
1. get the email address(s) assiociated with that product(s) (but what if several products with different address bought ??)
2. add the new code to send after the lines which send already the order confirmation to the customer
All this is done in the model/order.php
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
I assume, that you already know about the additional Mail-Address Option in Opencart. If so, and
you are looking for something different, some (paid) Extensions for such already exist.
Good Luck!
Ernie
---
Notification emails by department
http://www.opencart.com/index.php?route ... n_id=27273
---
Additional Customer CC Emails OC
http://www.opencart.com/index.php?route ... n_id=22191
---
InstaCopy — Exact Copy of the Order Confirmation Mail
http://www.opencart.com/index.php?route ... n_id=18720
---
Contact us PRO - Contact Departments
http://www.opencart.com/index.php?route ... n_id=22292
---
you are looking for something different, some (paid) Extensions for such already exist.
Good Luck!
Ernie
---
Notification emails by department
http://www.opencart.com/index.php?route ... n_id=27273
---
Additional Customer CC Emails OC
http://www.opencart.com/index.php?route ... n_id=22191
---
InstaCopy — Exact Copy of the Order Confirmation Mail
http://www.opencart.com/index.php?route ... n_id=18720
---
Contact us PRO - Contact Departments
http://www.opencart.com/index.php?route ... n_id=22292
---
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Thank you, OSWorX and IP_CAM, for your reply. As I said, I am newbie and learning Opencart Coding. So, it is not necessary to buy the Paid Extension. I know that for the Paid Extension, I might still learn how it works. However, again, I am a newbie. The Paid Extensions probably are still complicated for me because there are many situation the developer need to consider. I need someone give me clear example code, and I will try to find out the logic way on the coding.
Simply, let's say I have one product with email associated. I know I should modify the model/checkout/order.php on the line of somewhere like "$mail->setTo($order_info['email']);". But I do not know how to use the product-associated-email into this line (how to query this associate-email from Product Table, and use it here)? That is what I am lost.
Please provide me the code if you can. Any suggest will be appreciated.
Simply, let's say I have one product with email associated. I know I should modify the model/checkout/order.php on the line of somewhere like "$mail->setTo($order_info['email']);". But I do not know how to use the product-associated-email into this line (how to query this associate-email from Product Table, and use it here)? That is what I am lost.
Please provide me the code if you can. Any suggest will be appreciated.
Well, beeing Newbie or not, we're talking about a strictly commercial Software, usually planned, to generate income.
This means, that certain Knowledge just does NOT come for free, because, if it would, nobody would ever be able to
make a Buck, exept for the Users of the OpenCart Software and Mod's. You just have to accept this, it's just like in
real Live, where even Newbies have to pay the same Price for a BigMac, as everyone else as well...
Just to mention it, nothing personal !
Ernie
This means, that certain Knowledge just does NOT come for free, because, if it would, nobody would ever be able to
make a Buck, exept for the Users of the OpenCart Software and Mod's. You just have to accept this, it's just like in
real Live, where even Newbies have to pay the same Price for a BigMac, as everyone else as well...

Just to mention it, nothing personal !
Ernie
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Ernie is an 'old' user here who knows what is going on.
So, if you are a developer, I am confident that yo uwill find out how your solution hs to build ...
Good that you know already (with or without my help above) that you have to use this file.
So what is the problem?
Simply query the database table where you have added (you already did?) the email addresses.
I do not know your database design, so you will know by yourself which table.
And fetch the addresses, create a loop and send the emails.
A simple example - if newbie or not, because you should already know how to make a database query and how to assign values.
Beside this (@IP_CAM), the extensions you have provided are useless in this case.
And 1 final note: we all here have seen to many times in the past, that someone is askign for help.
Because he is such a 'poor' boy.
And after a while he is selling extensions like a 'world master'.
So, if you are a developer, I am confident that yo uwill find out how your solution hs to build ...
Good that you know already (with or without my help above) that you have to use this file.
So what is the problem?
Simply query the database table where you have added (you already did?) the email addresses.
I do not know your database design, so you will know by yourself which table.
And fetch the addresses, create a loop and send the emails.
A simple example - if newbie or not, because you should already know how to make a database query and how to assign values.
Beside this (@IP_CAM), the extensions you have provided are useless in this case.
And 1 final note: we all here have seen to many times in the past, that someone is askign for help.
Because he is such a 'poor' boy.
And after a while he is selling extensions like a 'world master'.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Who is online
Users browsing this forum: No registered users and 2 guests