- Posts: 29
- Thank you received: 2
Custom field value in onBeforeCalculateProductPriceForQuantity handler
4 years 4 months ago - 4 years 4 months ago #341488
by pjdevries
-- 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?
-- 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 4 months ago by pjdevries.
Please Log in or Create an account to join the conversation.
4 years 4 months ago - 4 years 4 months ago #341489
by nicolas
Replied by nicolas on topic Custom field value in onBeforeCalculateProductPriceForQuantity handler
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.
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 4 months ago by nicolas.
Please Log in or Create an account to join the conversation.
4 years 4 months ago #341496
by pjdevries
Replied by pjdevries on topic Custom field value in onBeforeCalculateProductPriceForQuantity handler
Hi Nicolas,
Thanks. I'll try to figure out what's going wrong and get back to you if I can't find it.
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
Please Log in or Create an account to join the conversation.
Time to create page: 0.299 seconds