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

#   custom item field dropdown value

##

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

Less More

- Posts: 9
- Thank you received: 0
-
-

12 years 6 months ago [\#152926](#152926) by [anitaagarwal](/forum/user/32000-anitaagarwal "View anitaagarwal's Profile")  *[custom item field dropdown value](/forum/26-product-category-display/867576-custom-item-field-dropdown-value#152926 "-- url of the page with the problem -- :   egrammandi.com/index.php/category/fruits  -- HikaShop version -- : 2.3.0 -- Joomla version -- :2.5.19 -- PHP version -- :5.3.13 -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  We are using ordered&#95;weight as custom item field to display weight of fruits &amp; vegetables.  Weight is a dropsown field with values (100 gm, 250 gm, 500 gm, 1 Kg, 1.25 Kg, 1.5 Kg, 2 Kg etc). For some fruits, we want to show only values 1 KG, 2 KG, 3 Kg etc , not 100 gm, 200 gm.  Is there any way to do this?")* was created by *[anitaagarwal](/forum/user/32000-anitaagarwal "View anitaagarwal's Profile")*

-- url of the page with the problem -- : [ egrammandi.com/index.php/category/fruits](http://egrammandi.com/index.php/category/fruits)
-- HikaShop version -- : 2.3.0
-- Joomla version -- :2.5.19
-- PHP version -- :5.3.13
-- Browser(s) name and version -- : Firefox
-- Error-message(debug-mod must be tuned on) -- : Error_message

We are using ordered_weight as custom item field to display weight of fruits &amp; vegetables.

Weight is a dropsown field with values (100 gm, 250 gm, 500 gm, 1 Kg, 1.25 Kg, 1.5 Kg, 2 Kg etc). For some fruits, we want to show only values 1 KG, 2 KG, 3 Kg etc , not 100 gm, 200 gm.

Is there any way to do this?

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

Less More

- Posts: 86292
- Thank you received: 14270
-
-

12 years 6 months ago [\#152938](#152938) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[custom item field dropdown value](/forum/26-product-category-display/867576-custom-item-field-dropdown-value#152938 "-- url of the page with the problem -- :   egrammandi.com/index.php/category/fruits  -- HikaShop version -- : 2.3.0 -- Joomla version -- :2.5.19 -- PHP version -- :5.3.13 -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  We are using ordered&#95;weight as custom item field to display weight of fruits &amp; vegetables.  Weight is a dropsown field with values (100 gm, 250 gm, 500 gm, 1 Kg, 1.25 Kg, 1.5 Kg, 2 Kg etc). For some fruits, we want to show only values 1 KG, 2 KG, 3 Kg etc , not 100 gm, 200 gm.  Is there any way to do this?")*

Hi,

You would have to create two custom item fields and restrict them by category so that they only display for one type of products or the other.
Then, you'll probably want to modify the code of the custom price by weight plugin that you're using (I think), to handle either the order_weight field or the other one based on the one which has a value for the current product.
You have that code in the plugin: Code:

if(!empty($product-&gt;ordered_weight)){ $quantity = $quantity*$product-&gt;ordered_weight; }

Similarily, you could add the support for another one like that: Code:

if(!empty($product-&gt;ordered_weight)){ $quantity = $quantity*$product-&gt;ordered_weight2; }

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

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

Less More

- Posts: 9
- Thank you received: 0
-
-

12 years 6 months ago [\#153056](#153056) by [anitaagarwal](/forum/user/32000-anitaagarwal "View anitaagarwal's Profile")  Replied by *[anitaagarwal](/forum/user/32000-anitaagarwal "View anitaagarwal's Profile")* on topic *[custom item field dropdown value](/forum/26-product-category-display/867576-custom-item-field-dropdown-value#153056 "-- url of the page with the problem -- :   egrammandi.com/index.php/category/fruits  -- HikaShop version -- : 2.3.0 -- Joomla version -- :2.5.19 -- PHP version -- :5.3.13 -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  We are using ordered&#95;weight as custom item field to display weight of fruits &amp; vegetables.  Weight is a dropsown field with values (100 gm, 250 gm, 500 gm, 1 Kg, 1.25 Kg, 1.5 Kg, 2 Kg etc). For some fruits, we want to show only values 1 KG, 2 KG, 3 Kg etc , not 100 gm, 200 gm.  Is there any way to do this?")*

Thank you very much.

It is working..

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

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

[](#top)
