add Product Code to Admin notification email?

  • Posts: 218
  • Thank you received: 6
12 years 10 months ago #38562

How would i add the Product Code to each item in the Admin notification email?

thanks

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

  • Posts: 26166
  • Thank you received: 4029
  • MODERATOR
12 years 10 months ago #38583

Hi,

You can edit emails (with HikaShop business) and add the product code into.
Like:

<p><?php echo $item->order_product_name . ' (' . $item->order_product_code . ')'; ?></p>

www.hikashop.com/en/support/documentatio...shop-email-form.html

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 12 years 10 months ago by Jerome.
The following user(s) said Thank You: woonydanny, jrtoms

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

  • Posts: 218
  • Thank you received: 6
12 years 10 months ago #38690

thanks, i replaced:

<p><?php echo $item->order_product_name; ?></p><?php

with
<p><?php echo $item->order_product_name . ' (' . $item->order_product_code . ')'; ?></p>

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

  • Posts: 218
  • Thank you received: 6
12 years 10 months ago #38820

The code you gave hasn't seemed to work, i noticed there was a space after the ', so should the code actually be:

<p><?php echo $item->order_product_name . '(' . $item->order_product_code . ')'; ?></p>

??

Last edit: 12 years 10 months ago by woonydanny.

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

  • Posts: 26166
  • Thank you received: 4029
  • MODERATOR
12 years 10 months ago #38829

Sorry, I do not understand your question.


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 218
  • Thank you received: 6
12 years 10 months ago #38898

The code you gave does not work. I am thinking there is a spelling mistake??

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

  • Posts: 26166
  • Thank you received: 4029
  • MODERATOR
12 years 10 months ago #38996

Heum,

You said that you have replaced

<p><?php echo $item->order_product_name; ?></p><?php
By
<p><?php echo $item->order_product_name . ' (' . $item->order_product_code . ')'; ?></p>
So, you removed "<?php" at the end ?


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 218
  • Thank you received: 6
12 years 10 months ago #39169

ah ok, it looks like i accidentally may have deleted that. I will try putting that back.

thanks :) :)

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

  • Posts: 30
  • Thank you received: 2
11 years 4 months ago #118441

I have exactly the same question, but I suspect there may have been some code changes since this exchange took place.

I do NOT display the product code on the product pages and do not wish to do so. However, I would like for administrative email order notifications to show the product name AND the product code.

I have tried this solution proposed in this thread with no luck. I will explain what I did. The current css in my version of Hikashop (business) is at line 100 of the php

<p><?php echo $item->order_product_name;

It goes on, but based upon the prior responses, I simply altered that to:

<p><?php echo $item->order_product_name . ' (' . $item->order_product_code . ')';

leaving all else the same.

I saved and did a test and did not see the product code in the notice email. I promise I have been looking for a more recent thread and could not locate one. THANK you for your help. Nadine at Solia.

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 4 months ago #118462

That's the correct modification even with the latest version of HikaShop.
Are you sure that you edited the correct email and looked at the correct email resulting from the change ?

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

  • Posts: 30
  • Thank you received: 2
11 years 4 months ago #118464

Friends: I do not know what or why, but I worked this precise solution again and it worked FINE.

So, hopefully this will help.

I did NOT configure the product configuration to show the code on the product list and also the customer email does NOT include the product code.

But the changes above DO result in the admin email including the product code as a parenthetical.

Issue resolved.

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

  • Posts: 30
  • Thank you received: 2
11 years 4 months ago #118465

Thank you Nicholas. I just posted and indicate success.

You all are wonderful. Thanks.

Nadine at Solia.

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

  • Posts: 33
  • Thank you received: 0
10 years 11 months ago #141183

Hallo,
I want to add the product code in the notification Email, too, and tried to find the same text to edit but I couldnt.

I opened the "order creation notification" and could only find:

<?php
foreach($data->cart->products as $item){
$price = $item->order_product_price*$item->order_product_quantity;
echo strip_tags($item->order_product_name) . "\t" .


Am I wrong there? - How do I add the product code to the notification Email I get after an order.

thanks

regards

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

  • Posts: 33
  • Thank you received: 0
10 years 11 months ago #141191

I chose the 3rd one (screenshot) in intention to add the product code to the order notification Email like that:

old version:
<?php echo JText::_('CART_PRODUCT_NAME')."\t".JText::_('CART_PRODUCT_UNIT_PRICE')."\t".JText::_('CART_PRODUCT_QUANTITY')."\t".JText::_('HIKASHOP_TOTAL');?>

new:

<?php echo JText::_('CART_PRODUCT_NAME')."\t".JText::_('ORDER_PRODUCT_CODE')."\t".JText::_('CART_PRODUCT_UNIT_PRICE')."\t".JText::_('CART_PRODUCT_QUANTITY')."\t".JText::_('HIKASHOP_TOTAL');?>

was that the right way?

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
10 years 11 months ago #141243

You're looking at the text version of the email.
Since a few versions, the HTML version of the emails uses a templating system so the code is totally different from what you have written here.

But it's even simpler. You just have to add the tag {LINEVAR:PRODUCT_CODE} after the tag {LINEVAR:PRODUCT_NAME} and you'll get the product code after the product name in the email.

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

  • Posts: 33
  • Thank you received: 0
10 years 11 months ago #141262

Hi,
in the order notification email I found already that tag... (screenshot)... so it´s right?

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
10 years 10 months ago #141307

Hi,
A solution can be to change this line :

{LINEVAR:PRODUCT_NAME}<!--{IF:ORDER_PRODUCT_CODE}--> {LINEVAR:PRODUCT_CODE}<!--{ENDIF:ORDER_PRODUCT_CODE}-->
By :
{LINEVAR:PRODUCT_NAME}            {LINEVAR:PRODUCT_CODE}

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

  • Posts: 33
  • Thank you received: 0
10 years 10 months ago #141413

sorry, but the product code is still not seen in the Email... and I just got told that the coupon code is also not seen, only that a coupon is used.

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

  • Posts: 33
  • Thank you received: 0
10 years 10 months ago #141638

Hi,
the problem is still not solved and I would please need a solution.

In the notification email that I get after an order should be also seen:

the order number
the product code
and if the case - the number of the coupon

which file (a screenshot would be helpfull cause I have the german version :( ) do I have to edit and how? I have not enough knowledge of html or php so I am quiet helpless.

thanks

Attachments:
Last edit: 10 years 10 months ago by medean. Reason: wrong pic

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

  • Posts: 12953
  • Thank you received: 1778
10 years 10 months ago #141725

Hi,
Sorry for the late reply. Can you tell me in which email you're checking that the product code is displayed ? (Order creation notification/Order administrator notification/Order status notification).
Can apply the modifications that I gave you through these 3 emails and tell me if your product code is displaying ?

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

Time to create page: 0.123 seconds
Powered by Kunena Forum