- Posts: 966
- Thank you received: 11
Send Notification Email ONLY After Payment
2 years 8 months ago - 2 years 8 months ago #358480
by MyWorld
Send Notification Email ONLY After Payment was created by MyWorld
Hi there,
1) How do I set things up so that an email notification is sent to the administrator and the customer ONLY after an order has been paid for?
2) Also, how do I add the BRAND name in the emails?
Thanks!
1) How do I set things up so that an email notification is sent to the administrator and the customer ONLY after an order has been paid for?
2) Also, how do I add the BRAND name in the emails?
Thanks!
Last edit: 2 years 8 months ago by MyWorld.
Please Log in or Create an account to join the conversation.
2 years 8 months ago #358488
by nicolas
Replied by nicolas on topic Send Notification Email ONLY After Payment
Hi,
1. Disable the "order admin notification" and the "order created notification" emails via the menu System>Emails. Both are sent when the order is created. The "order status notification" and the "payment notification" emails are sent after the payment has been made.
2. The brand name of the products ? That information is not easily available there. It will require loading the data in the preload of the emails. So edit the emails via System>Emails and in the preload area, before the line:
you can add something like that:
1. Disable the "order admin notification" and the "order created notification" emails via the menu System>Emails. Both are sent when the order is created. The "order status notification" and the "payment notification" emails are sent after the payment has been made.
2. The brand name of the products ? That information is not easily available there. It will require loading the data in the preload of the emails. So edit the emails via System>Emails and in the preload area, before the line:
Code:
$cartProduct['PRODUCT_NAME'] = $t;
Code:
$categoryClass = hikashop_get('class.category');
$brand = $categoryClass->get($product->product_manufacturer_id);
$t.='<p class="brand_name">'.$brand->category_name.'</p>';
Please Log in or Create an account to join the conversation.
2 years 8 months ago #358546
by MyWorld
Replied by MyWorld on topic Send Notification Email ONLY After Payment
Hi,
1) I just want to confirm.
If I disable the "order admin notification" and the "order created notification", when an order is made and paid for, what email(s) will the customer get, and what email(s) will the administrator get?
2) Thanks for the code. It worked, except it put the brand name after the product name, like this:
Poppy Floral Makeup Cosmetic Case Black Red Bag
Kate Spade
I would prefer it like this:
Kate Spade
Poppy Floral Makeup Cosmetic Case Black Red Bag
Thanks!
1) I just want to confirm.
If I disable the "order admin notification" and the "order created notification", when an order is made and paid for, what email(s) will the customer get, and what email(s) will the administrator get?
2) Thanks for the code. It worked, except it put the brand name after the product name, like this:
Poppy Floral Makeup Cosmetic Case Black Red Bag
Kate Spade
I would prefer it like this:
Kate Spade
Poppy Floral Makeup Cosmetic Case Black Red Bag
Thanks!
Please Log in or Create an account to join the conversation.
2 years 8 months ago #358549
by nicolas
Replied by nicolas on topic Send Notification Email ONLY After Payment
Hi,
1. The customer will get the order status notification email and the admin will get the payment notification email.
2. You can add such CSS to the HTML:
and it should do it;
1. The customer will get the order status notification email and the admin will get the payment notification email.
2. You can add such CSS to the HTML:
Code:
<style>.brand_name{display:block;}</style>
Please Log in or Create an account to join the conversation.
2 years 8 months ago #358590
by MyWorld
Replied by MyWorld on topic Send Notification Email ONLY After Payment
Hi,
1. Thank you. When is the "Order notification" used?
2) Sorry but that didn't work. Please see attached.
Thanks!
1. Thank you. When is the "Order notification" used?
2) Sorry but that didn't work. Please see attached.
Thanks!
Please Log in or Create an account to join the conversation.
2 years 8 months ago #358624
by nicolas
Replied by nicolas on topic Send Notification Email ONLY After Payment
Hi,
1. When you use the "email" button of an order in the order details page of the backend.
2. Sorry I had read too fast your previous message and I didn't see you wanted to reverse the order.
In that case, you want to change the line:
to:
1. When you use the "email" button of an order in the order details page of the backend.
2. Sorry I had read too fast your previous message and I didn't see you wanted to reverse the order.
In that case, you want to change the line:
Code:
$t.='<p class="brand_name">'.$brand->category_name.'</p>';
Code:
$t='<p class="brand_name">'.$brand->category_name.'</p>'.$t;
Please Log in or Create an account to join the conversation.
2 years 8 months ago #358703
by MyWorld
Replied by MyWorld on topic Send Notification Email ONLY After Payment
Thank you very much!
Please Log in or Create an account to join the conversation.
2 years 8 months ago #358775
by MyWorld
Replied by MyWorld on topic Send Notification Email ONLY After Payment
Sorry to bother you again...
1) The Brand Name code does not work in the cpanel_orders.php. I tried both as per below. What would the proper code be or am I placing it in the wrong place?
2) Any idea why when I change "Only display categories with products" to Yes, it's still showing the empty categories?
Thanks!
1) The Brand Name code does not work in the cpanel_orders.php. I tried both as per below. What would the proper code be or am I placing it in the wrong place?
Code:
<span class="hika_cpanel_product_name">
$t.='<p class="brand_name">'.$brand->category_name.'</p>';
$t='<p class="brand_name">'.$brand->category_name.'</p>'.$t;
<?php echo $product->order_product_name; ?>
</span>
2) Any idea why when I change "Only display categories with products" to Yes, it's still showing the empty categories?
Thanks!
Please Log in or Create an account to join the conversation.
2 years 8 months ago #358776
by nicolas
Replied by nicolas on topic Send Notification Email ONLY After Payment
Hi,
1. It's the correct place but you can't use the same code because the context is not the same.
There, in cpanel_orders the code should look like this:
2. I suppose that you're talking about the setting under the "Default parameter for categories". This only applies to new modules and menu items, or menu items and modules with the "Only with products" setting set to "inherit".
So if you don't see any change to the categories listing you're looking at, it means that the module or menu item displaying that categories listing has this "Only with products" setting turned off.
1. It's the correct place but you can't use the same code because the context is not the same.
There, in cpanel_orders the code should look like this:
Code:
$categoryClass = hikashop_get('class.category');
$brand = $categoryClass->get($this->products[$product->product_id]->product_manufacturer_id);
echo $brand->category_name;
2. I suppose that you're talking about the setting under the "Default parameter for categories". This only applies to new modules and menu items, or menu items and modules with the "Only with products" setting set to "inherit".
So if you don't see any change to the categories listing you're looking at, it means that the module or menu item displaying that categories listing has this "Only with products" setting turned off.
Please Log in or Create an account to join the conversation.
Time to create page: 0.266 seconds