Send Notification Email ONLY After Payment

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
9 months 1 week ago #358480

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!

Last edit: 9 months 1 week ago by MyWorld.

Please Log in or Create an account to join the conversation.

  • Posts: 82683
  • Thank you received: 13337
  • MODERATOR
9 months 1 week ago #358488

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:

$cartProduct['PRODUCT_NAME'] = $t;
you can add something like that:
$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.

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
9 months 6 days ago #358546

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!

Please Log in or Create an account to join the conversation.

  • Posts: 82683
  • Thank you received: 13337
  • MODERATOR
9 months 5 days ago #358549

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:

<style>.brand_name{display:block;}</style>
and it should do it;

Please Log in or Create an account to join the conversation.

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
9 months 5 days ago #358590

Hi,

1. Thank you. When is the "Order notification" used?

2) Sorry but that didn't work. Please see attached.

Thanks!

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82683
  • Thank you received: 13337
  • MODERATOR
9 months 2 days ago #358624

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:

$t.='<p class="brand_name">'.$brand->category_name.'</p>';
to:
$t='<p class="brand_name">'.$brand->category_name.'</p>'.$t;

Please Log in or Create an account to join the conversation.

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
9 months 1 day ago #358703

Thank you very much!

Please Log in or Create an account to join the conversation.

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
8 months 4 weeks ago #358775

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?

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

  • Posts: 82683
  • Thank you received: 13337
  • MODERATOR
8 months 4 weeks ago #358776

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:

$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.070 seconds
Powered by Kunena Forum