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

#   change per unit into per set, per length, per reel

##

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

Less More

- Posts: 25
- Thank you received: 8
-

6 years 2 months ago [\#323412](#323412) by [gabriel.robert](/forum/user/34146-gabriel-robert "View gabriel.robert's Profile")  Replied by *[gabriel.robert](/forum/user/34146-gabriel-robert "View gabriel.robert's Profile")* on topic *[change per unit into per set, per length, per reel](/forum/4-how-to/51395-change-per-unit-into-per-set-per-length-per-reel?start=20#323412 "Hello,  we are planing to sell products with a hikashop 2.5. in the product-mask i haven't the possibility to change the phrase &quot;per unit&quot; after the price into one of the other terms mentioned above. A simple translation isn't usefull, because we sell different things per unit, per set, per length (per meter) ot per reel. So is there a possibility to adjust the term seperately for every product?")*

thank you very much, it's great it works perfectly!

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

- **[Mea Arte](/forum/user/69990-mea-arte "View Mea Arte's Profile")**
- [![Mea Arte's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/69990-mea-arte "View Mea Arte's Profile")
- [ Offline](/forum/user/69990-mea-arte)

Less More

- Posts: 13
- Thank you received: 3
-
-

3 years 11 months ago [\#346703](#346703) by [Mea Arte](/forum/user/69990-mea-arte "View Mea Arte's Profile")  Replied by *[Mea Arte](/forum/user/69990-mea-arte "View Mea Arte's Profile")* on topic *[change per unit into per set, per length, per reel](/forum/4-how-to/51395-change-per-unit-into-per-set-per-length-per-reel?start=20#346703 "Hello,  we are planing to sell products with a hikashop 2.5. in the product-mask i haven't the possibility to change the phrase &quot;per unit&quot; after the price into one of the other terms mentioned above. A simple translation isn't usefull, because we sell different things per unit, per set, per length (per meter) ot per reel. So is there a possibility to adjust the term seperately for every product?")*

Nicolas,

Although this item is quite older, it still is applicable.
I am trying to do this and to get things going I used the exact directions you gave. But I still get the same result:

Warning: Undefined property: stdClass::$product_per in /Users/reijervangalen/Sites/localhost/mea-arte.nl/templates/cassiopeia/html/com_hikashop/product/listing_price.php on line 196

I did make the field and the column exists in the table hikashop_product.

My piece of code:

if($this-&gt;element-&gt;product_per == 'unit'&#124;&#124; $this-&gt;row-&gt;product_per == 'unit'){
echo $this-&gt;element-&gt;product_per;
}

What is wrong here?

And can I use an selection list as field in which I can select per product what unit it goes in?

It is not on line yet, because I am building on localhost, sorry.

Thanks in advance.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUxMzk1LWNoYW5nZS1wZXItdW5pdC1pbnRvLXBlci1zZXQtcGVyLWxlbmd0aC1wZXItcmVlbD9zdGFydD0yMCZ0bXBsPW1hcmtkb3du) 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: 86574
- Thank you received: 14318
-
-

3 years 11 months ago [\#346851](#346851) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[change per unit into per set, per length, per reel](/forum/4-how-to/51395-change-per-unit-into-per-set-per-length-per-reel?start=20#346851 "Hello,  we are planing to sell products with a hikashop 2.5. in the product-mask i haven't the possibility to change the phrase &quot;per unit&quot; after the price into one of the other terms mentioned above. A simple translation isn't usefull, because we sell different things per unit, per set, per length (per meter) ot per reel. So is there a possibility to adjust the term seperately for every product?")*

Hi,

The issue is several folds.
The code should be like this: Code:

if(!empty($this-&gt;element-&gt;product_per)) { echo $this-&gt;element-&gt;product_per; }elseif(!empty($this-&gt;row-&gt;product_per)) { echo $this-&gt;row-&gt;product_per; } else { echo JText::_('PER_UNIT'); }

That should work on the product details page as well as on the listings while still displaying the default "per unit" when nothing is selected in the custom product field in the product, without any error message.

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

- **[Mea Arte](/forum/user/69990-mea-arte "View Mea Arte's Profile")**
- [![Mea Arte's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/69990-mea-arte "View Mea Arte's Profile")
- [ Offline](/forum/user/69990-mea-arte)

Less More

- Posts: 13
- Thank you received: 3
-
-

3 years 11 months ago [\#346927](#346927) by [Mea Arte](/forum/user/69990-mea-arte "View Mea Arte's Profile")  Replied by *[Mea Arte](/forum/user/69990-mea-arte "View Mea Arte's Profile")* on topic *[change per unit into per set, per length, per reel](/forum/4-how-to/51395-change-per-unit-into-per-set-per-length-per-reel?start=20#346927 "Hello,  we are planing to sell products with a hikashop 2.5. in the product-mask i haven't the possibility to change the phrase &quot;per unit&quot; after the price into one of the other terms mentioned above. A simple translation isn't usefull, because we sell different things per unit, per set, per length (per meter) ot per reel. So is there a possibility to adjust the term seperately for every product?")*

Thanks, Nicolas.

This was indeed the trick.
Now I can, when needed, add an extra selling unit in a dropdown custom field for any product and show this on the front end.

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