[Skip to main content](#vessel-content)

#   \[SOLVED\]custom product field in order confirmation

##

- **[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")**
- [![nico.van.leeuwen's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile") Topic Author
- [ Away](/forum/user/12404-nico-van-leeuwen)

Less More

- Posts: 344
- Thank you received: 28
-
-
- [](http://www.delinie-ict.nl)
-

10 years 11 months ago -  10 years 11 months ago [\#224718](#224718) by [nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")  *[\[SOLVED\]custom product field in order confirmation](/forum/35-orders-management/881200-solved-custom-product-field-in-order-confirmation#224718 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.6 -- PHP version -- : 5.6  Hi,  I'm trying to create a very stripped down version of the order creation email in plain text. Now I would like to add a field to the row with the product lines. This field is a custom field that is in the products and is called &quot;gewichtsklasse&quot;. It's only visible in the backend.  I've been reading and tried something like this: echo $data-&gt;cart-&gt;gewichtsklasse.&quot;&#92;n&quot;; But no luck yet. The line it should be appended to is now looking like this :  Thanks for any help.")* was created by *[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.6
-- PHP version -- : 5.6

Hi,

I'm trying to create a very stripped down version of the order creation email in plain text.
Now I would like to add a field to the row with the product lines.
This field is a custom field that is in the products and is called "gewichtsklasse". It's only visible in the backend.

I've been reading and tried something like this:
echo $data-&gt;cart-&gt;gewichtsklasse."\n";
But no luck yet. The line it should be appended to is now looking like this : Code:

&lt;?php foreach($data-&gt;cart-&gt;products as $item){ $price = $item-&gt;order_product_price*$item-&gt;order_product_quantity; echo strip_tags($item-&gt;order_product_name) . "&#124;" . $currencyHelper-&gt;format($item-&gt;order_product_price,$data-&gt;order_currency_id)."&#124;".$item-&gt;order_product_quantity."&#124;".$currencyHelper-&gt;format($price,$data-&gt;order_currency_id)."\n"; }

Thanks for any help.

Last edit: 10 years 11 months ago by [nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MTIwMC1zb2x2ZWQtY3VzdG9tLXByb2R1Y3QtZmllbGQtaW4tb3JkZXItY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

10 years 11 months ago [\#224757](#224757) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[custom product field in text order confirmation](/forum/35-orders-management/881200-solved-custom-product-field-in-order-confirmation#224757 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.6 -- PHP version -- : 5.6  Hi,  I'm trying to create a very stripped down version of the order creation email in plain text. Now I would like to add a field to the row with the product lines. This field is a custom field that is in the products and is called &quot;gewichtsklasse&quot;. It's only visible in the backend.  I've been reading and tried something like this: echo $data-&gt;cart-&gt;gewichtsklasse.&quot;&#92;n&quot;; But no luck yet. The line it should be appended to is now looking like this :  Thanks for any help.")*

Hi,

Can you provide a screenshot of the settings of your custom field ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MTIwMC1zb2x2ZWQtY3VzdG9tLXByb2R1Y3QtZmllbGQtaW4tb3JkZXItY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")**
- [![nico.van.leeuwen's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile") Topic Author
- [ Away](/forum/user/12404-nico-van-leeuwen)

Less More

- Posts: 344
- Thank you received: 28
-
-
- [](http://www.delinie-ict.nl)
-

10 years 11 months ago [\#224761](#224761) by [nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")  Replied by *[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")* on topic *[custom product field in text order confirmation](/forum/35-orders-management/881200-solved-custom-product-field-in-order-confirmation#224761 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.6 -- PHP version -- : 5.6  Hi,  I'm trying to create a very stripped down version of the order creation email in plain text. Now I would like to add a field to the row with the product lines. This field is a custom field that is in the products and is called &quot;gewichtsklasse&quot;. It's only visible in the backend.  I've been reading and tried something like this: echo $data-&gt;cart-&gt;gewichtsklasse.&quot;&#92;n&quot;; But no luck yet. The line it should be appended to is now looking like this :  Thanks for any help.")*

Sure, the image is attatched.
[ ![screenshot-gewichtsklasse.jpg](/forum/attachment/28561) ](/forum/attachment/28561 "...chtsklasse.jpg")

- [ ![screenshot-gewichtsklasse.jpg](/forum/attachment/28561) ](/forum/attachment/28561 "...chtsklasse.jpg") [ ](/forum/attachment/28561?download=1 "...chtsklasse.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MTIwMC1zb2x2ZWQtY3VzdG9tLXByb2R1Y3QtZmllbGQtaW4tb3JkZXItY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

10 years 11 months ago [\#224767](#224767) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[custom product field in text order confirmation](/forum/35-orders-management/881200-solved-custom-product-field-in-order-confirmation#224767 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.6 -- PHP version -- : 5.6  Hi,  I'm trying to create a very stripped down version of the order creation email in plain text. Now I would like to add a field to the row with the product lines. This field is a custom field that is in the products and is called &quot;gewichtsklasse&quot;. It's only visible in the backend.  I've been reading and tried something like this: echo $data-&gt;cart-&gt;gewichtsklasse.&quot;&#92;n&quot;; But no luck yet. The line it should be appended to is now looking like this :  Thanks for any help.")*

Hi,

If you want to include that in the code that you proposed in your first message, it would be: Code:

&lt;?php $productClass = hikashop_get('class.product'); foreach($data-&gt;cart-&gt;products as $item){ $product = $productClass-&gt;get($item-&gt;product_id); $price = $item-&gt;order_product_price*$item-&gt;order_product_quantity; echo strip_tags($item-&gt;order_product_name) . "&#124;" . $currencyHelper-&gt;format($item-&gt;order_product_price,$data-&gt;order_currency_id)."&#124;".$item-&gt;order_product_quantity."&#124;".$currencyHelper-&gt;format($price,$data-&gt;order_currency_id)."\n"; echo $product-&gt;gewichtsklasse; }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MTIwMC1zb2x2ZWQtY3VzdG9tLXByb2R1Y3QtZmllbGQtaW4tb3JkZXItY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")**
- [![nico.van.leeuwen's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile") Topic Author
- [ Away](/forum/user/12404-nico-van-leeuwen)

Less More

- Posts: 344
- Thank you received: 28
-
-
- [](http://www.delinie-ict.nl)
-

10 years 11 months ago -  10 years 11 months ago [\#224823](#224823) by [nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")  Replied by *[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")* on topic *[custom product field in text order confirmation](/forum/35-orders-management/881200-solved-custom-product-field-in-order-confirmation#224823 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.6 -- PHP version -- : 5.6  Hi,  I'm trying to create a very stripped down version of the order creation email in plain text. Now I would like to add a field to the row with the product lines. This field is a custom field that is in the products and is called &quot;gewichtsklasse&quot;. It's only visible in the backend.  I've been reading and tried something like this: echo $data-&gt;cart-&gt;gewichtsklasse.&quot;&#92;n&quot;; But no luck yet. The line it should be appended to is now looking like this :  Thanks for any help.")*

Hi Nicolas,

Thanks for your reply,

It looks like it's working now, great !
Will check more and then mark this post as solved after that.

Last edit: 10 years 11 months ago by [nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MTIwMC1zb2x2ZWQtY3VzdG9tLXByb2R1Y3QtZmllbGQtaW4tb3JkZXItY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.053 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
