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

#   Price Calculations plugin

##

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

Less More

- Posts: 4
- Thank you received: 0
-
-

1 year 9 months ago [\#365263](#365263) by [Kommas](/forum/user/59051-kommas "View Kommas's Profile")  *[Price Calculations plugin](/forum/26-product-category-display/909034-price-calculations-plugin#365263 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 4.4.10 -- PHP version -- : 8.1 -- Browser(s) name and version -- : Chrome  i can't seem to figure it out. Very little documentation on the plugin.  I have a custom field with a dropdown box. If the answer is Yes, then i need to add 6.25 euro.  How do i do that.  ChatGPT comes up with this formula, but isn't working {custom&#95;field} == 'Yes' ? ({price} + 6.25) : {price}  Please help!")* was created by *[Kommas](/forum/user/59051-kommas "View Kommas's Profile")*

-- HikaShop version -- : 5.1.2
-- Joomla version -- : 4.4.10
-- PHP version -- : 8.1
-- Browser(s) name and version -- : Chrome

i can't seem to figure it out. Very little documentation on the plugin.

I have a custom field with a dropdown box. If the answer is Yes, then i need to add 6.25 euro.

How do i do that.

ChatGPT comes up with this formula, but isn't working {custom_field} == 'Yes' ? ({price} + 6.25) : {price}

Please help!

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

1 year 9 months ago [\#365265](#365265) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price Calculations plugin](/forum/26-product-category-display/909034-price-calculations-plugin#365265 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 4.4.10 -- PHP version -- : 8.1 -- Browser(s) name and version -- : Chrome  i can't seem to figure it out. Very little documentation on the plugin.  I have a custom field with a dropdown box. If the answer is Yes, then i need to add 6.25 euro.  How do i do that.  ChatGPT comes up with this formula, but isn't working {custom&#95;field} == 'Yes' ? ({price} + 6.25) : {price}  Please help!")*

Hi,

You can't write PHP code in the formula.
Supposing that you have two values in your field: 0 (with the title "no") and 1 (with the title "yes"), and supposing that the column name of your custom field is "custom_field" and that your custom field is a custom field of the table "item", you could write this formula: Code:

{price}+6.25*{custom_field}

If the value selected is "no", then the formula will be {price}+6.25*0 and thus the calculated price will be equal to the base price of the product.
If the value selected is "yes", then the formula will be {price}+6.25*1 and thus the calculated price will be equal to the base price of the product plus 6.25.

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

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

Less More

- Posts: 4
- Thank you received: 0
-
-

1 year 9 months ago [\#365268](#365268) by [Kommas](/forum/user/59051-kommas "View Kommas's Profile")  Replied by *[Kommas](/forum/user/59051-kommas "View Kommas's Profile")* on topic *[Price Calculations plugin](/forum/26-product-category-display/909034-price-calculations-plugin#365268 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 4.4.10 -- PHP version -- : 8.1 -- Browser(s) name and version -- : Chrome  i can't seem to figure it out. Very little documentation on the plugin.  I have a custom field with a dropdown box. If the answer is Yes, then i need to add 6.25 euro.  How do i do that.  ChatGPT comes up with this formula, but isn't working {custom&#95;field} == 'Yes' ? ({price} + 6.25) : {price}  Please help!")*

Thanks, this works. But i still have trouble understanding this kind of formulas.

Now the first field is working, but the second field in the same product is not. I made a extra formula. But it's not counting.

It's for a soccer shirt. First field is for a name on the back, second field is for the number on te back of the shirt

- [ ![2025-01-1522&#95;39&#95;08-Plugins&#95;Hikashop-PriceCalculations-Voetbalstars-Administration.png](/forum/attachment/60144) ](/forum/attachment/60144 "...nistration.png") [ ](/forum/attachment/60144?download=1 "...nistration.png")

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

1 year 9 months ago [\#365271](#365271) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price Calculations plugin](/forum/26-product-category-display/909034-price-calculations-plugin#365271 "-- HikaShop version -- : 5.1.2 -- Joomla version -- : 4.4.10 -- PHP version -- : 8.1 -- Browser(s) name and version -- : Chrome  i can't seem to figure it out. Very little documentation on the plugin.  I have a custom field with a dropdown box. If the answer is Yes, then i need to add 6.25 euro.  How do i do that.  ChatGPT comes up with this formula, but isn't working {custom&#95;field} == 'Yes' ? ({price} + 6.25) : {price}  Please help!")*

Hi,

Only one formula can apply at the same time.
So you need to merge both formulas together: Code:

{price}+6.25*{custom_field}+6.25*{custom_field2}

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

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