Código de producto en email

  • Posts: 86
  • Thank you received: 2
11 years 1 month ago #121729

Hola. ¿como puedo hacer para que en el email del pedido me llegue también el código de producto? Muchas gracias

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
11 years 1 month ago #121739

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

  • Posts: 86
  • Thank you received: 2
11 years 1 month ago #121748

Nicolas, muchas gracias por su respuesta. Estuve viendo el post que me indica, pero no se cual es el archivo que debo editar, ni la línea de código.

Le agredecere mucho su ayuda.

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
11 years 1 month ago #121752

it's the files of the emails in the folder media/com_hikashop/mail/ that you need to edit. The exact file depends on the exact email you want to edit.
The line is:
<p><?php echo $item->order_product_name; ?></p><?php

as explained in the other post.

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

  • Posts: 86
  • Thank you received: 2
11 years 1 month ago #121762

Nicolas, gracias por su respuesta.

Segun creo, el archivo a editar sería "Notificación del pedido al administrador"

La línea que encuentro es esta:

<p><?php echo $item->order_product_name;
                    if($group){
                      $display_item_price=false;
                      foreach($data->cart->products as $j => $optionElement){
                        if($optionElement->order_product_option_parent_id != $item->order_product_id) continue;
                        if($optionElement->order_product_price>0){
                          $display_item_price = true;
                        }

                      }
                      if($display_item_price){
                        if($config->get('price_with_tax')){
                          echo ' '.$currencyHelper->format($item->order_product_price+$item->order_product_tax,$data->order_currency_id);
                        }else{
                          echo ' '.$currencyHelper->format($item->order_product_price,$data->order_currency_id);
                        }
                      }
                    } ?></p>

Puede ser esta?

Muchas gracias desde ya

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
11 years 1 month ago #121771

Yes, it's that line in that code:
<p><?php echo $item->order_product_name;

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

  • Posts: 86
  • Thank you received: 2
11 years 1 month ago #121779

Nicolas, probé reemplazando la primer línea, el código me quedó así:

<p><?php echo $item->order_product_name . ' (' . $item->order_product_code . ')';
                    if($group){
                      $display_item_price=false;
                      foreach($data->cart->products as $j => $optionElement){
                        if($optionElement->order_product_option_parent_id != $item->order_product_id) continue;
                        if($optionElement->order_product_price>0){
                          $display_item_price = true;
                        }

                      }
                      if($display_item_price){
                        if($config->get('price_with_tax')){
                          echo ' '.$currencyHelper->format($item->order_product_price+$item->order_product_tax,$data->order_currency_id);
                        }else{
                          echo ' '.$currencyHelper->format($item->order_product_price,$data->order_currency_id);
                        }
                      }
                    } ?></p>

Pero al colocar este código no me funciona el último paso en el check out. Me da error que no encuentra la página...

Muchas gracias desde ya.

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
11 years 1 month ago #121846

I'm not sure if you're saying that it creates an error of if it doesn't display the code without any error.
If it doesn't display the code without any error, then you're probably not looking at the code of the email you want to change.
If it displays an error message, then what is the error ?

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

  • Posts: 86
  • Thank you received: 2
11 years 1 month ago #121920

Nicolas, lo probé ahora y funcionó!

No se...antes parece que había una falla en el servidor y me daba error, pero no era por este cambio en el código.

Muchas gracias por su ayuda!

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

  • Posts: 86
  • Thank you received: 2
7 years 10 months ago #256743

Hi.

I reopen this topic pirque I think things have changed ...

I am using Hikashop Starter 2.6.4 in Joomla 3.6.4 and I can not find the code that indicates this post in the file order_admin_notification.html.php

I would be grateful if you would indicate how I should modify the code so that the administrator can also email the product code (SKU).

Thank you very much from now.

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
7 years 10 months ago #256749

Hi,

The product code should already be in the email notifications unless you turned off the "display product code" setting of the HikaShop configuration.
If you want to have the product code even when that setting is turned off, then you would have to modify the preload of the email so that it would set the product_code in any case.
Please note that support is only for commercial editions.
And even more so for help regarding code modifications like these.

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

Time to create page: 0.053 seconds
Powered by Kunena Forum