- Posts: 45
- Thank you received: 2
Expand order status notification
14 years 4 months ago - 14 years 4 months ago #49423
by klimmbimm
Expand order status notification was created by klimmbimm
Hi,
my aim is to expand the order status notification email (possible in HikaShop Business) like this:
a) add a specific text if status is changed to confirmed
b) add a specific text if status is changed to confirmed AND a specific product (product_name: "My first product") from a specific product_category was bought
So far I solved a) like this (or possibly the code existed in the mail before):
To solve b) I am lacking the if condition for my product in the specific product category.
I would appreciate any helping sample code.
Best,
KB
my aim is to expand the order status notification email (possible in HikaShop Business) like this:
a) add a specific text if status is changed to confirmed
b) add a specific text if status is changed to confirmed AND a specific product (product_name: "My first product") from a specific product_category was bought
So far I solved a) like this (or possibly the code existed in the mail before):
Code:
if($data->mail_status === 'bezahlt') {
echo JText::sprintf('Confirming order number. %s on %s.',$url,HIKASHOP_LIVE);
}
else {
echo JText::sprintf('ORDER_STATUS_CHANGED_TO',$url,$data->mail_status);
}
}
To solve b) I am lacking the if condition for my product in the specific product category.
I would appreciate any helping sample code.
Best,
KB
Last edit: 14 years 4 months ago by klimmbimm.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
14 years 4 months ago - 14 years 4 months ago #49466
by Mohamed Thelji
Replied by Mohamed Thelji on topic Re: Expand order status notification
Hello,
I think that you can use this sample code for your condition :
Furthermore, you will have to use your code in the file " media/com_hikashop/mail/order_status_notification.html.php ".
I think that you can use this sample code for your condition :
Code:
foreach($data->cart->products as $item){
if($data->mail_status === 'bezahlt' && $item->order_product_name == 'My first product' ){
echo '......';
}
else{
echo '......';
}
}
Furthermore, you will have to use your code in the file " media/com_hikashop/mail/order_status_notification.html.php ".
Last edit: 14 years 4 months ago by Mohamed Thelji.
The following user(s) said Thank You: klimmbimm
Please Log in or Create an account to join the conversation.
Time to create page: 0.180 seconds