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

#   Order Name vs. Order Number (Community Plugin)

##

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

Less More

- Posts: 61
- Thank you received: 2
-
-

13 years 2 months ago -  13 years 2 months ago [\#121766](#121766) by [xsbucks](/forum/user/22196-xsbucks "View xsbucks's Profile")  *[Order Name vs. Order Number (Community Plugin)](/forum/26-product-category-display/861655-order-name-vs-order-number-community-plugin#121766 "Hey guys, wondering on the HikaShop JomSocial Plugin, if there is an easy way to change the 'Order Number' table to an 'Order Name'?  It would be a lot more feasable for what i think a lot of shops have. Would look a little nicer in Jomsocial as well.  Thanks")* was created by *[xsbucks](/forum/user/22196-xsbucks "View xsbucks's Profile")*

Hey guys, wondering on the HikaShop JomSocial Plugin, if there is an easy way to change the 'Order Number' table to an 'Order Name'?

It would be a lot more feasable for what i think a lot of shops have. Would look a little nicer in Jomsocial as well.

Thanks

Last edit: 13 years 2 months ago by [xsbucks](/forum/user/22196-xsbucks "View xsbucks's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjE2NTUtb3JkZXItbmFtZS12cy1vcmRlci1udW1iZXItY29tbXVuaXR5LXBsdWdpbj90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14305
-
-

13 years 2 months ago [\#121773](#121773) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Order Name vs. Order Number (Community Plugin)](/forum/26-product-category-display/861655-order-name-vs-order-number-community-plugin#121773 "Hey guys, wondering on the HikaShop JomSocial Plugin, if there is an easy way to change the 'Order Number' table to an 'Order Name'?  It would be a lot more feasable for what i think a lot of shops have. Would look a little nicer in Jomsocial as well.  Thanks")*

You can edit the file plugins/community/hikashop/hikashop.php and change the code:
&lt;?php echo JText::_('ORDER_NUMBER'); ?&gt;

to the text you want.

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

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

Less More

- Posts: 61
- Thank you received: 2
-
-

13 years 2 months ago [\#121782](#121782) by [xsbucks](/forum/user/22196-xsbucks "View xsbucks's Profile")  Replied by *[xsbucks](/forum/user/22196-xsbucks "View xsbucks's Profile")* on topic *[Order Name vs. Order Number (Community Plugin)](/forum/26-product-category-display/861655-order-name-vs-order-number-community-plugin#121782 "Hey guys, wondering on the HikaShop JomSocial Plugin, if there is an easy way to change the 'Order Number' table to an 'Order Name'?  It would be a lot more feasable for what i think a lot of shops have. Would look a little nicer in Jomsocial as well.  Thanks")*

Thanks Nicolas for the quick reply, what i was hoping to do was to grab the name of the file from the DB instead of the Order_Number

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 2 months ago [\#121827](#121827) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Order Name vs. Order Number (Community Plugin)](/forum/26-product-category-display/861655-order-name-vs-order-number-community-plugin#121827 "Hey guys, wondering on the HikaShop JomSocial Plugin, if there is an easy way to change the 'Order Number' table to an 'Order Name'?  It would be a lot more feasable for what i think a lot of shops have. Would look a little nicer in Jomsocial as well.  Thanks")*

Hi,

Of which name are your talking about ?

Regards,

---

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

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

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

Less More

- Posts: 61
- Thank you received: 2
-
-

13 years 2 months ago [\#121835](#121835) by [xsbucks](/forum/user/22196-xsbucks "View xsbucks's Profile")  Replied by *[xsbucks](/forum/user/22196-xsbucks "View xsbucks's Profile")* on topic *[Order Name vs. Order Number (Community Plugin)](/forum/26-product-category-display/861655-order-name-vs-order-number-community-plugin#121835 "Hey guys, wondering on the HikaShop JomSocial Plugin, if there is an easy way to change the 'Order Number' table to an 'Order Name'?  It would be a lot more feasable for what i think a lot of shops have. Would look a little nicer in Jomsocial as well.  Thanks")*

From the hikashop_order_product table,
order_product_name

Do i need just an INNER join? .a and .b DB exception in the module for that?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjE2NTUtb3JkZXItbmFtZS12cy1vcmRlci1udW1iZXItY29tbXVuaXR5LXBsdWdpbj90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14305
-
-

13 years 2 months ago [\#121842](#121842) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Order Name vs. Order Number (Community Plugin)](/forum/26-product-category-display/861655-order-name-vs-order-number-community-plugin#121842 "Hey guys, wondering on the HikaShop JomSocial Plugin, if there is an easy way to change the 'Order Number' table to an 'Order Name'?  It would be a lot more feasable for what i think a lot of shops have. Would look a little nicer in Jomsocial as well.  Thanks")*

I don't think that most shop have that since it's not practical and not really nice to display all the products of each order on the order listing. I might be for simple ecommerce extensions which don't handle shopping carts and thus where you can only purchase one product at a time.
If that's the case on your website (all orders have only one product), simply change:
$query = 'FROM '.hikashop_table('order').' AS a WHERE '.implode(' AND ',$filters).$order;
to:
$query = 'FROM '.hikashop_table('order').' AS a LEFT JOIN #__hikashop_order_product AS b ON a.order_id=b.order_id WHERE '.implode(' AND ',$filters).$order;

and then change :
&lt;?php echo $row-&gt;order_number; ?&gt;
to:
&lt;?php echo $row-&gt;order_product_name; ?&gt;

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

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

Less More

- Posts: 61
- Thank you received: 2
-
-

13 years 2 months ago [\#121871](#121871) by [xsbucks](/forum/user/22196-xsbucks "View xsbucks's Profile")  Replied by *[xsbucks](/forum/user/22196-xsbucks "View xsbucks's Profile")* on topic *[Order Name vs. Order Number (Community Plugin)](/forum/26-product-category-display/861655-order-name-vs-order-number-community-plugin#121871 "Hey guys, wondering on the HikaShop JomSocial Plugin, if there is an easy way to change the 'Order Number' table to an 'Order Name'?  It would be a lot more feasable for what i think a lot of shops have. Would look a little nicer in Jomsocial as well.  Thanks")*

Thanks Nicolas,

I changed the code as you mentioned... It is still not showing...

I can't seem to find where it is missing, but it should be working as mentioned.

&lt;?php
/**
* @copyright Copyright (C) 2010-2011 HIKASHOP SARL - All rights reserved.
* @license [ www.gnu.org/licenses/gpl-3.0.html](http://www.gnu.org/licenses/gpl-3.0.html) GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
if(!defined('DS'))
define('DS', DIRECTORY_SEPARATOR);
if(!@include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')){
return;
};

if(!class_exists('plgCommunityHikaShop')){
class plgCommunityHikaShop extends CApplications{
var $name = "My Orders";
var $_name = "orders";

function plgCommunityHikaShop(&amp; $subject, $config){
parent::__construct($subject, $config);
}

function onProfileDisplay(){
$my = &amp; JFactory::getUser();
$user =&amp; CFactory::getActiveProfile();
//only you can see your orders
if (empty($my-&gt;id) OR empty($user) OR $my-&gt;id != $user-&gt;id) return;

//load order info
$database =&amp; JFactory::getDBO();
$searchMap = array('a.order_id','a.order_status');
$filters = array('a.order_user_id='.hikashop_loadUser());

$order = ' ORDER BY a.order_created DESC';
$query = 'FROM '.hikashop_table('order').' AS a LEFT JOIN #__hikashop_order_product AS b ON a.order_id=b.order_id WHERE '.implode(' AND ',$filters).$order;
$database-&gt;setQuery('SELECT a.* '.$query);
$rows = $database-&gt;loadObjectList();

if(empty($rows)){
return;
}
$currencyHelper = hikashop_get('class.currency');
$trans = hikashop_get('helper.translation');
$statuses = $trans-&gt;getStatusTrans();

ob_start();
?&gt;
&lt;table class="hikashop_orders adminlist" cellpadding="1"&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th class="title" align="center"&gt;
&lt;?php echo JText::_('ORDER_NUMBER'); ?&gt;
&lt;/th&gt;
&lt;th class="title" align="center"&gt;
&lt;?php echo JText::_('DATE'); ?&gt;
&lt;/th&gt;
&lt;th class="title" align="center"&gt;
&lt;?php echo JText::_('ORDER_STATUS'); ?&gt;
&lt;/th&gt;
&lt;th class="title" align="center"&gt;
&lt;?php echo JText::_('HIKASHOP_TOTAL'); ?&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;?php
$k = 0;
for($i = 0,$a = count($rows);$i&lt;$a;$i++){
$row =&amp; $rows[$i];
?&gt;
&lt;tr class="&lt;?php echo "row$k"; ?&gt;"&gt;
&lt;td align="center"&gt;
&lt;?php
global $Itemid;
$url_itemid='';
if(!empty($Itemid)){
$url_itemid='&amp;Itemid='.$Itemid;
}
?&gt;
&lt;a href="&lt;?php echo hikashop_completeLink('order&amp;task=show&amp;cid='.$row-&gt;order_id.$url_itemid.'&amp;cancel_url='.urlencode(base64_encode(JRoute::_('index.php?option=com_community&amp;view=profile&amp;userid='.$my-&gt;id)))); ?&gt;"&gt;
&lt;?php echo $row-&gt;order_product_name; ?&gt;
&lt;/a&gt;
&lt;/td&gt;
&lt;td align="center"&gt;
&lt;?php echo hikashop_getDate($row-&gt;order_created,'%Y-%m-%d %H:%M');?&gt;
&lt;/td&gt;
&lt;td align="center"&gt;
&lt;?php
//get translation
echo $statuses[$row-&gt;order_status];
?&gt;
&lt;/td&gt;
&lt;td align="center"&gt;
&lt;?php echo $currencyHelper-&gt;format($row-&gt;order_full_price,$row-&gt;order_currency_id);?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php
$k = 1-$k;
}
?&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;?php

return ob_get_clean();
}

function onAppDisplay(){
return $this-&gt;onProfileDisplay();
}

}
}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjE2NTUtb3JkZXItbmFtZS12cy1vcmRlci1udW1iZXItY29tbXVuaXR5LXBsdWdpbj90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14305
-
-

13 years 2 months ago [\#121908](#121908) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Order Name vs. Order Number (Community Plugin)](/forum/26-product-category-display/861655-order-name-vs-order-number-community-plugin#121908 "Hey guys, wondering on the HikaShop JomSocial Plugin, if there is an easy way to change the 'Order Number' table to an 'Order Name'?  It would be a lot more feasable for what i think a lot of shops have. Would look a little nicer in Jomsocial as well.  Thanks")*

Ah yes, you also need to;
$database-&gt;setQuery('SELECT a.* '.$query);
to:
$database-&gt;setQuery('SELECT a.*,b.* '.$query);

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

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

Less More

- Posts: 61
- Thank you received: 2
-
-

13 years 2 months ago [\#121962](#121962) by [xsbucks](/forum/user/22196-xsbucks "View xsbucks's Profile")  Replied by *[xsbucks](/forum/user/22196-xsbucks "View xsbucks's Profile")* on topic *[Order Name vs. Order Number (Community Plugin)](/forum/26-product-category-display/861655-order-name-vs-order-number-community-plugin#121962 "Hey guys, wondering on the HikaShop JomSocial Plugin, if there is an easy way to change the 'Order Number' table to an 'Order Name'?  It would be a lot more feasable for what i think a lot of shops have. Would look a little nicer in Jomsocial as well.  Thanks")*

Got it! Thanks Nicolas.

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

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