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

#   need know a product name, category name, unit pric

##

- **[aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")**
- [![aspkiddy's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7749-aspkiddy "View aspkiddy's Profile") Topic Author
- [ Offline](/forum/user/7749-aspkiddy)

Less More

- Posts: 98
- Thank you received: 1
-
-

12 years 8 months ago [\#145055](#145055) by [aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")  *[need know a product name, category name, unit pric](/forum/27-checkout/866064-need-know-a-product-name-category-name-unit-pric#145055 "-- url of the page with the problem -- : http://127.0.0.139 -- HikaShop version -- : x2.2.3 -- Joomla version -- : Joomla! 2.5.11 -- PHP version -- : 5.4.5  I need know a product name, category name, unit price and quantity in an order :  In last step of transaction (in my end page (checkout/end.php)  I would write :  I find the transaction Id, site name , bill total, bill tax and shipping but I can not find information of each items : product id, product name, product category name, product price, product quantity  I put this code in my end.php :  But I added also information of Items transaction.  How can I have it ?  I tried it with this code but I have anything : :oops:  but these variables are null :oops: How can I get its values ? :unsure:  Thanks")* was created by *[aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")*

-- url of the page with the problem -- : http://127.0.0.139
-- HikaShop version -- : x2.2.3
-- Joomla version -- : Joomla! 2.5.11
-- PHP version -- : 5.4.5

I need know a product name, category name, unit price and quantity in an order :

In last step of transaction (in my end page (checkout/end.php)

I would write :

> transaction Id = 1234
> Site name = Toto Inc Web Site
> bill total = 25.00
> bill tax = 2.50
> shipping = 5
>
> ---
>
> Items :
> product id = 123456789
> product name = tostos
> product category name = computer
> product price = 10.00
> product quantity = 1
>
> Items :
> product id = 323456789
> product name = toptop
> product category name = computer
> product price = 7.50
> product quantity = 1

I find the transaction Id, site name , bill total, bill tax and shipping but I can not find
information of each items : product id, product name, product category name, product price, product quantity

I put this code in my end.php : Code:

$app = JFactory::getApplication(); $order_id = $app-&gt;getUserState('com_hikashop.order_id'); $orderClass = hikashop_get('class.order'); $this-&gt;order = $orderClass-&gt;loadFullOrder($order_id,true,false); $transaction_id = $order_id; $conf = JFactory::getConfig(); if(HIKASHOP_J30) { $siteName=$conf-&gt;get('sitename'); } else { $siteName=$conf-&gt;getValue('config.sitename'); } $site_name = $siteName; /* Site name */ $order_total = $this-&gt;order-&gt;order_full_price; $bill_total = $order_total; /* bill total */ $shipping_price_without_tax = $this-&gt;order-&gt;order_shipping_price-$this-&gt;order-&gt;order_shipping_tax; $shipping = $shipping_price_without_tax; /* shipping */ $taxes = $bill_total-$shipping-$this-&gt;order-&gt;order_subtotal_no_vat; $bill_tax = $taxes; /* bill tax */

But I added also information of Items transaction.

How can I have it ?

I tried it with this code but I have anything : :oops: Code:

$product_id = $this-&gt;product-&gt;order_product_code; $product_name = $this-&gt;product-&gt;order_product_name; $product_category_name = $this-&gt;product-&gt;order-&gt;product_category-&gt;category_name; $product_price = $this-&gt;product-&gt;order_product_price+$this-&gt;product-&gt;order_product_tax; $product_quantity = $this-&gt;product-&gt;order_product_quantity;

but these variables are null :oops:
How can I get its values ? ![:unsure:](/media/kunena/emoticons/18.png ":unsure:")

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjA2NC1uZWVkLWtub3ctYS1wcm9kdWN0LW5hbWUtY2F0ZWdvcnktbmFtZS11bml0LXByaWM/dG1wbD1tYXJrZG93bg==) 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: 86359
- Thank you received: 14296
-
-

12 years 8 months ago -  12 years 8 months ago [\#145078](#145078) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[need know a product name, category name, unit pric](/forum/27-checkout/866064-need-know-a-product-name-category-name-unit-pric#145078 "-- url of the page with the problem -- : http://127.0.0.139 -- HikaShop version -- : x2.2.3 -- Joomla version -- : Joomla! 2.5.11 -- PHP version -- : 5.4.5  I need know a product name, category name, unit price and quantity in an order :  In last step of transaction (in my end page (checkout/end.php)  I would write :  I find the transaction Id, site name , bill total, bill tax and shipping but I can not find information of each items : product id, product name, product category name, product price, product quantity  I put this code in my end.php :  But I added also information of Items transaction.  How can I have it ?  I tried it with this code but I have anything : :oops:  but these variables are null :oops: How can I get its values ? :unsure:  Thanks")*

You should do like that: Code:

foreach($this-&gt;order-&gt;products as $product){ echo $product-&gt;order_product_name; }

Last edit: 12 years 8 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")

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

- **[aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")**
- [![aspkiddy's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7749-aspkiddy "View aspkiddy's Profile") Topic Author
- [ Offline](/forum/user/7749-aspkiddy)

Less More

- Posts: 98
- Thank you received: 1
-
-

12 years 8 months ago [\#145197](#145197) by [aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")  Replied by *[aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")* on topic *[need know a product name, category name, unit pric](/forum/27-checkout/866064-need-know-a-product-name-category-name-unit-pric#145197 "-- url of the page with the problem -- : http://127.0.0.139 -- HikaShop version -- : x2.2.3 -- Joomla version -- : Joomla! 2.5.11 -- PHP version -- : 5.4.5  I need know a product name, category name, unit price and quantity in an order :  In last step of transaction (in my end page (checkout/end.php)  I would write :  I find the transaction Id, site name , bill total, bill tax and shipping but I can not find information of each items : product id, product name, product category name, product price, product quantity  I put this code in my end.php :  But I added also information of Items transaction.  How can I have it ?  I tried it with this code but I have anything : :oops:  but these variables are null :oops: How can I get its values ? :unsure:  Thanks")*

Thanks Nicolas,

It works and I find : ![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

> product id = 123456789
> product name = tostos
>
> product price without tax = 10.00
> product quantity = 1

Code:

foreach($this-&gt;order-&gt;products as $product){ echo $product-&gt;order_product_code; //product id echo $product-&gt;order_product_name; //product name echo $product-&gt;order_product_price //product price without tax echo $product-&gt;order_product_quantity; //product quantity

But I can't find name of product category and product price with tax : ![:(](/media/kunena/emoticons/22.png ":(")

> product category name = computer
> product price without tax = 12.50

I tried for' product category name" ( = computer) Code:

echo $product-&gt;order_product_category-&gt;order_category_name; echo $product-&gt;order_product_category-&gt;category_name; echo $product-&gt;product_category-&gt;order_category_name; echo $product-&gt;product_category-&gt;category_name;

I tried for' roduct price with tax" ( = computer) Code:

echo $product-&gt;order_product_price+$product-&gt;order_product_tax;

But I have anything ![:(](/media/kunena/emoticons/22.png ":(")
How can I find its values for '**product category name**' and '**product price with tax**' ? :ohmy:

thanks

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

- **[aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")**
- [![aspkiddy's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7749-aspkiddy "View aspkiddy's Profile") Topic Author
- [ Offline](/forum/user/7749-aspkiddy)

Less More

- Posts: 98
- Thank you received: 1
-
-

12 years 8 months ago [\#145239](#145239) by [aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")  Replied by *[aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")* on topic *[need know a product name, category name, unit pric](/forum/27-checkout/866064-need-know-a-product-name-category-name-unit-pric#145239 "-- url of the page with the problem -- : http://127.0.0.139 -- HikaShop version -- : x2.2.3 -- Joomla version -- : Joomla! 2.5.11 -- PHP version -- : 5.4.5  I need know a product name, category name, unit price and quantity in an order :  In last step of transaction (in my end page (checkout/end.php)  I would write :  I find the transaction Id, site name , bill total, bill tax and shipping but I can not find information of each items : product id, product name, product category name, product price, product quantity  I put this code in my end.php :  But I added also information of Items transaction.  How can I have it ?  I tried it with this code but I have anything : :oops:  but these variables are null :oops: How can I get its values ? :unsure:  Thanks")*

I have a also an other problem with this : :ohmy:
When I have many items, for example 2, **I see only last item** : :blush:
In my cart :

> **1 Items :**
> product id = 123456789
> product name = tostos
>
> product price without tax = 10.00
> product quantity = 1
>
> **2nd Items :**
> product id = 323456789
> product name = toptop
>
> product price without tax = 7.50
> product quantity = 1
>
>
> bill total = 25.00
> bill tax = 2.50
> shipping = 5.00

but on my screen, on last step of transaction (in my end page (checkout/end.php), I see only last item :

> transaction Id = 1234
> Site name = Toto Inc Web Site
> bill total = 25.00
> bill tax = 2.50
> shipping = 5
>
>
> product id = 323456789
> product name = **toptop**
> product category name = **\[missing value\]**
> product price without tax = 7.50
> product price with tax = **\[missing value\]**
> product quantity = 1

I can not see any information on 1st item : missing 1st item ![:(](/media/kunena/emoticons/22.png ":(")
Code:

foreach($this-&gt;order-&gt;products as $product) { echo $product-&gt;order_product_code; //product id echo $product-&gt;order_product_name; //product name echo $product-&gt;order_product_price //product price without tax echo $product-&gt;order_product_quantity; //product quantity echo $product-&gt;order_product_price+$product-&gt;order_product_tax; //product price with tax[color=#ff0000] [missing value][/color] echo $product-&gt;order_product_category-&gt;order_category_name; //product category name" ( = computer) [color=#ff0000][missing value][/color] }

Can you help me

thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjA2NC1uZWVkLWtub3ctYS1wcm9kdWN0LW5hbWUtY2F0ZWdvcnktbmFtZS11bml0LXByaWM/dG1wbD1tYXJrZG93bg==) 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: 86359
- Thank you received: 14296
-
-

12 years 8 months ago [\#145258](#145258) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[need know a product name, category name, unit pric](/forum/27-checkout/866064-need-know-a-product-name-category-name-unit-pric#145258 "-- url of the page with the problem -- : http://127.0.0.139 -- HikaShop version -- : x2.2.3 -- Joomla version -- : Joomla! 2.5.11 -- PHP version -- : 5.4.5  I need know a product name, category name, unit price and quantity in an order :  In last step of transaction (in my end page (checkout/end.php)  I would write :  I find the transaction Id, site name , bill total, bill tax and shipping but I can not find information of each items : product id, product name, product category name, product price, product quantity  I put this code in my end.php :  But I added also information of Items transaction.  How can I have it ?  I tried it with this code but I have anything : :oops:  but these variables are null :oops: How can I get its values ? :unsure:  Thanks")*

echo $product-&gt;order_product_price+$product-&gt;order_product_tax;
will indeed display the full unit price.

For the category, it's more complex....You'll have to use the product_id attribute to load the category_id from the hikashop_product_category table and then do another query to load the category name from the hikashop_category table based on the category_id from the first query result.

The following user(s) said Thank You: [aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")

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

- **[aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")**
- [![aspkiddy's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7749-aspkiddy "View aspkiddy's Profile") Topic Author
- [ Offline](/forum/user/7749-aspkiddy)

Less More

- Posts: 98
- Thank you received: 1
-
-

12 years 8 months ago [\#145763](#145763) by [aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")  Replied by *[aspkiddy](/forum/user/7749-aspkiddy "View aspkiddy's Profile")* on topic *[need know a product name, category name, unit pric](/forum/27-checkout/866064-need-know-a-product-name-category-name-unit-pric#145763 "-- url of the page with the problem -- : http://127.0.0.139 -- HikaShop version -- : x2.2.3 -- Joomla version -- : Joomla! 2.5.11 -- PHP version -- : 5.4.5  I need know a product name, category name, unit price and quantity in an order :  In last step of transaction (in my end page (checkout/end.php)  I would write :  I find the transaction Id, site name , bill total, bill tax and shipping but I can not find information of each items : product id, product name, product category name, product price, product quantity  I put this code in my end.php :  But I added also information of Items transaction.  How can I have it ?  I tried it with this code but I have anything : :oops:  but these variables are null :oops: How can I get its values ? :unsure:  Thanks")*

Thanks Nicolas

It works

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjA2NC1uZWVkLWtub3ctYS1wcm9kdWN0LW5hbWUtY2F0ZWdvcnktbmFtZS11bml0LXByaWM/dG1wbD1tYXJrZG93bg==) 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.180 seconds

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