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

#   Possible to calculate with custom fields?

##

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

Less More

- Posts: 1
- Thank you received: 0
-
-

10 years 11 months ago [\#221843](#221843) by [Pixvisual](/forum/user/39763-pixvisual "View Pixvisual's Profile")  *[Possible to calculate with custom fields?](/forum/32-content-creation/880678-possible-to-calculate-with-custom-fields#221843 "-- HikaShop version -- : 2.6.0  I would like to create a webshop for rental of items. With the business edition, is it possible to add 2 custom date fields (start and end date for rental) and then automatically calculate how many days this is?  Is so, I would like to multiply the number of days with a certain amount.  Example: 1 day = €100,- Additional days = €15,- / day  Having selected December 1 - December 3, it should be calculated that this is 3 days. 3 days x €15,- = €45,- + €100,- = 145,-")* was created by *[Pixvisual](/forum/user/39763-pixvisual "View Pixvisual's Profile")*

-- HikaShop version -- : 2.6.0

I would like to create a webshop for rental of items. With the business edition, is it possible to add 2 custom date fields (start and end date for rental) and then automatically calculate how many days this is?

Is so, I would like to multiply the number of days with a certain amount.

Example:
1 day = €100,-
Additional days = €15,- / day

Having selected December 1 - December 3, it should be calculated that this is 3 days. 3 days x €15,- = €45,- + €100,- = 145,-

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwNjc4LXBvc3NpYmxlLXRvLWNhbGN1bGF0ZS13aXRoLWN1c3RvbS1maWVsZHM/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: 86290
- Thank you received: 14267
-
-

10 years 11 months ago [\#221879](#221879) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Possible to calculate with custom fields?](/forum/32-content-creation/880678-possible-to-calculate-with-custom-fields#221879 "-- HikaShop version -- : 2.6.0  I would like to create a webshop for rental of items. With the business edition, is it possible to add 2 custom date fields (start and end date for rental) and then automatically calculate how many days this is?  Is so, I would like to multiply the number of days with a certain amount.  Example: 1 day = €100,- Additional days = €15,- / day  Having selected December 1 - December 3, it should be calculated that this is 3 days. 3 days x €15,- = €45,- + €100,- = 145,-")*

Hi,

Yes, that's possible.
You need to create custom fields of the table "item" via the menu Display&gt;Custom fields, and then you need to write a small hikashop plugin in order to do the calculation based on the values entered in the custom fields.
You can see an example of that with the donation plgin which takes the value of a custom item field and use it as the price of the product:
[ demo.hikashop.com/index.php/en/hikashop/...t-page/donation-page](http://demo.hikashop.com/index.php/en/hikashop/product-page/donation-page)

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

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

[](#top)
