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

#   Custom field value in onBeforeCalculateProductPriceForQuantity handler

##

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

Less More

- Posts: 29
- Thank you received: 2
-
-

4 years 6 months ago -  4 years 6 months ago [\#341488](#341488) by [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")  *[Custom field value in onBeforeCalculateProductPriceForQuantity handler](/forum/31-development/904385-custom-field-value-in-onbeforecalculateproductpriceforquantity-handler#341488 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Hi,  For testing purposes I created a &quot;Single Dropdown&quot; custom field for table &quot;item&quot;. The field shows up nicely in the front end on the product order form. I need the value in an onBeforeCalculateProductPriceForQuantity event handler but the field is not available in the parameter object. What am I doing wrong here?")* was created by *[pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")*

-- HikaShop version -- : 4.4.5
-- Joomla version -- : 4.1
-- PHP version -- : 7.4

Hi,

For testing purposes I created a "Single Dropdown" custom field for table "item". The field shows up nicely in the front end on the product order form. I need the value in an onBeforeCalculateProductPriceForQuantity event handler but the field is not available in the parameter object. What am I doing wrong here?

Last edit: 4 years 6 months ago by [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile").

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

4 years 6 months ago -  4 years 6 months ago [\#341489](#341489) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom field value in onBeforeCalculateProductPriceForQuantity handler](/forum/31-development/904385-custom-field-value-in-onbeforecalculateproductpriceforquantity-handler#341489 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Hi,  For testing purposes I created a &quot;Single Dropdown&quot; custom field for table &quot;item&quot;. The field shows up nicely in the front end on the product order form. I need the value in an onBeforeCalculateProductPriceForQuantity event handler but the field is not available in the parameter object. What am I doing wrong here?")*

Hi,

I'm surprised that it would be the case.
The donation plugin, which is preinstalled with HikaShop Business, actually uses that same event to use the value of a custom item field as price for the product in the cart.
So it does what you're trying to do.
So what that means is that the problem is probably with your code somewhere and not with the principle itself and that you're on the right track.
Now, without being able to check your code, it will be hard to say anything more precise to help you.

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

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

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

Less More

- Posts: 29
- Thank you received: 2
-
-

4 years 6 months ago [\#341496](#341496) by [pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")  Replied by *[pjdevries](/forum/user/64503-pjdevries "View pjdevries's Profile")* on topic *[Custom field value in onBeforeCalculateProductPriceForQuantity handler](/forum/31-development/904385-custom-field-value-in-onbeforecalculateproductpriceforquantity-handler#341496 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 4.1 -- PHP version -- : 7.4  Hi,  For testing purposes I created a &quot;Single Dropdown&quot; custom field for table &quot;item&quot;. The field shows up nicely in the front end on the product order form. I need the value in an onBeforeCalculateProductPriceForQuantity event handler but the field is not available in the parameter object. What am I doing wrong here?")*

Hi Nicolas,

Thanks. I'll try to figure out what's going wrong and get back to you if I can't find it.

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

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

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