• Imagine I have a post type called recipes and created a repeatable group called ingredients.
    In this group, there are some basic fields like “numeric” amount and taxonomy select for units and ingredients.

    The taxonomy ingredients is part of the recipe post type. The taxonomy has some custom fields, a group nutritional_information with some numerical fields inside (fat, carbohydrates, calories, Proteine, etc.).

    I want two reach to goals:

    First:
    I want to recaclulate the amount + unit selected to a fix unit. For example: if kg selected, i want to convert to 1000g. this can be done (i know). Then I need to sum up all these in a calculation field (can be done, i Know).

    But now there is the problem ??

    Every ingredient taxonomy has fields, numeric. And I want to sum up these fields for the amount chosen in the recipe fields.

    For example:

    User choses:

    200 g tomatoes
    100 g sugar
    2 g curry powder
    tomatoe, sugar and curry powder are terms from the ingredients taxonomy. they have different values for nutritional information for 100G of each ingredient.

    My aim is: I want to get the values for 200g tomatoes, 100g sugar and 2g curry poweder summed up for my single recipe ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wundermatics

    (@wundermatics)

    Wow!

    Many thanks for your interest in the plugin! Let me first just say that you’ve just raised the bar a little higher than we first anticipated when first creating this plugin ?? But it’s an interesting challenge indeed!

    At this point, I can just acknowledge that I’ve seen your question and that we need to look into it a little bit before we can fully answer it. I honestly don’t know if we have all the features needed in place. We’re going to have a look at it over the weekend.

    Also, just to let you know. We have one release coming up to fix some issues with true/false (checkbox) fields that we want to prioritise. We’ll be ready to dig into your question right after that.

    Thread Starter digiblogger

    (@digiblogger)

    Hi wundermatics,

    I know ?? and thank you so much for your reply.
    Well, I am that kind of user that is often not just interested in using a plugin, but also in helping to let in grow in power. Sadly, I am not a developer. But actually I try to create my first plugin for recipes, diets and nutrition with the use of ACF (php exported).

    My aim is to integrate many things that require calculations on fields.

    This was just an example. Think of servings customizations. Ingredients shown for a special amount of servings and the possibility to raise the amount and automatically show the new amount for each ingredient.

    Than nutritional information for a recipe that consists of many different ingredients with many different amounts and units (could be hard cause kitchen units like teaspoons, cups and similar don’t have a precise definition.

    And of course I want to have a unit converter coded by myself. For this special task, I use a extremely powerfull premium plugin called calculated fields form, but my task is to do all this with the power of ACF.

    I learn more and more everyday. But I am working full time so the daily amount of knowledge gained is quite small. Anyway. I would love to become a WordPress programmer in the future.

    Best wishes
    Digi

    • This reply was modified 4 years, 9 months ago by digiblogger.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Calculating Amounts of selected Taxonomy fields’ is closed to new replies.