- Posts: 15
- Thank you received: 1
email Template
- kenny_robb
-
Topic Author
- Offline
Less
More
5 years 10 months ago #326670
by kenny_robb
email Template was created by kenny_robb
-- HikaShop version -- : 4.4.0
-- HikaMarket version -- : 3.1.1
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.3
Hi there I would like to customise the order emails that go out to the customer to make them more Vendor focused rather than marketplace focused.
Is this possible.
Specifically the lines
Thank you for your order at https://
Would love to put the vendors name in there
Similarly in the footer of the mail
Once again, thank you for your order at https://
We hope to see you again soon.
Best Regards
xxxxxxxx
Again I would love to put the vendors name in there.
Thanks
Kenny
-- HikaMarket version -- : 3.1.1
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.3
Hi there I would like to customise the order emails that go out to the customer to make them more Vendor focused rather than marketplace focused.
Is this possible.
Specifically the lines
Thank you for your order at https://
Would love to put the vendors name in there
Similarly in the footer of the mail
Once again, thank you for your order at https://
We hope to see you again soon.
Best Regards
xxxxxxxx
Again I would love to put the vendors name in there.
Thanks
Kenny
Please Log in or Create an account to join the conversation.
5 years 10 months ago #326707
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic email Template
Hello,
To be able to display the vendor name in the customer email, it requires that you have just one vendor for the order.
If you have two vendors (or potentially your "main vendor'), the information cannot be retrieved by an algorithm.
When everything is in the right configuration, we can imagine a little PHP code to paste in the email in order to populate a variable with the vendor name, variable which could be used in the "email templating" system.
Regarding the subject, that requires a similar modification but you would need to re-define the subject of the email "code" itself.
Regards,
To be able to display the vendor name in the customer email, it requires that you have just one vendor for the order.
If you have two vendors (or potentially your "main vendor'), the information cannot be retrieved by an algorithm.
When everything is in the right configuration, we can imagine a little PHP code to paste in the email in order to populate a variable with the vendor name, variable which could be used in the "email templating" system.
Regarding the subject, that requires a similar modification but you would need to re-define the subject of the email "code" itself.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- kenny_robb
-
Topic Author
- Offline
Less
More
- Posts: 15
- Thank you received: 1
5 years 10 months ago #327012
by kenny_robb
Replied by kenny_robb on topic email Template
That sounds great.
I have set up one vendor per order and have no plans to change that.
I have also upgraded to the business edition so I have the email customisation system.
Do you happen to have any sample code I can use?
Kenny
I have set up one vendor per order and have no plans to change that.
I have also upgraded to the business edition so I have the email customisation system.
Do you happen to have any sample code I can use?
Kenny
Please Log in or Create an account to join the conversation.
5 years 10 months ago #327092
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic email Template
Hello,
In the email "preload" part you will see a loop on the cart products.
You have access to "all products" (content from the HikaShop product table) in the variable
The idea is to get the vendor_id from the products (best is to take the first $item and get the content from all_products).
Once you have your vendor id (in "product_vendor_id" field) you can load the object object via
And access the various fields such as "vendor_name", etc.
Regards,
In the email "preload" part you will see a loop on the cart products.
Code:
foreach($data->cart->products as $item) {
Code:
$productClass->all_products
The idea is to get the vendor_id from the products (best is to take the first $item and get the content from all_products).
Once you have your vendor id (in "product_vendor_id" field) you can load the object object via
Code:
$vendorClass = hikamarket::get('class.vendor');
$vendor = $vendorClass->get($vendor_id);
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.146 seconds