Limit additional info in mail

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #4928
    kevin wuyts
    Participant

      Hello,

      When a product that has preselected ingredients is added to the cart, the preselected ingredients are shown in the email via the ( $itemMarkup[‘additionalinfo’] )

      Is it possible to change this so that only the extra ingredients of removed ingredients are shown?
      The seller already knows the preselected ingredients of a certain product, so it’s easier to only see the changes that a customer has made.

      As seen in the screenshot, this is a product with preselected ingredients.
      Tomato is 1 of the preselected ingredients but the customer removed it, so now it says, NO tomato.
      It would be more clear if the other ingredients were not shown and only NO tomato was shown as this is a change made by the user

      #4936
      Olly
      Admin & Mod

        ignoring the programatical challenges this would pose, there *might* also be several reasons why this is not such a good idea (although have not thought it through yet entirely, so maybe this *is* something that would make sense / be beneficial, but don’t quite know yet as there are a lot of scenarios to take into consideration)

        something to think about no doubt, but no promises

        #5004
        kevin wuyts
        Participant

          Hi Olly,

          I’m trying to change this myself now as a temp fix.
          I looked into the files that generate the mail but in there it just inserts the ( $itemMarkup[‘additionalinfo’] )

          I’m now looking for the code that combines this info.
          I assume that somewhere the code does the following (I’m not a programmer so this might seem very ridiculous πŸ™‚ -> (preselected ingredients + extra ingredients + removed ingredients) -> put into string “additionalinfo” ?

          If i’m not even close i’ll just have to wait πŸ™‚

          #5007
          Olly
          Admin & Mod

            >I looked into the files that generate the mail
            entirely the wrong place to edit.
            if anything, you should be using the filters provided

            >I assume that somewhere the code does the following…
            simplistically speaking, yes (but i can assure you it is nothing but simple)

            either way, the place where the add ingredients stuff gets generated is in
            wppizza-add-ingredients/ajax/get-json.php, i would however -STRONGLY – suggest you leave this alone as – for starters – you will never be able to update the plugin again

            if you have way too much time on your hands you should be using the filters here

            https://www.wp-pizza.com/topic/filter-options/

            warning: you can seriously break things if you mess this up . and if you are “not a programmer” as you are saying yourself, i suspect you also don’t know how to use filters which would make this even more dangerous.

            then again, i’m all for “learning by doing”, just be aware that I would seriously suggest to not mess around on a live server unless you are 1000% sure it works…

            #5264
            Olly
            Admin & Mod

              so, whilst currently adding some other options to that extension, I also had a think about whether it would be possible (or advisable) to integrate something that let’s you do this sort of thing you mentioned.

              In short, although this would most likely be doable programmatically it would just confuse the hell out of people (and that’s not only the admin who would have to set this up but customers too I think)

              It did however occur to me, that there is actually quite an easy answer to this I believe

              As i understand it a “smos hesp & kaas” has the following

              lettuce, tomato, cucumber, sliced egg and mayonnaise – and in this case cheese too.

              so , as a customer if i want one of those i don’t expect to actually have to add those ingredients/toppings myself (otherwise it would just be some bread and I choose what i want on it)

              so instead of preselecing things (which then would appear in this list of added toppings which as a customer would confuse the hell out of me ) I would make a list of DE-selecting things.

              so add the following ingredients

              no lettuce,
              no tomato,
              no cucumber,
              no egg
              no mayonnaise
              no cheese

              set the prices for those to zero (hey , you could even make them negative if it’s supposed to become cheaper if you omit some)

              then put those in a group naming it “dont want these ?” (or something)

              select the following group type:
              “Group must have *AT LEAST* minimum number of ingredient selected below (multiple allowed – but no more than 1x per ingredient)”

              set minimum and maximum to 0

              and then assign it to the “smos hesp & kaas” menu item

              now only when a customer selects one of these (i.e says “no cheese” for example) will it show up in the list of “added” ingredients as “no cheese”…..

              PS: i would also assume that the menu item itself in the description already states that it has lettuce,tomato,cucumber,egg ,mayonnaise and cheese , just like any dedicated pizza napoli for example says :olives, tomatoes , mozarella etc (or whatever belongs onto a pizza napoli)

              #5265
              kevin wuyts
              Participant

                Hi Olly,

                I had indeed been thinking about doing this as you suggest, but for the customer it would look weird as they would see the following.

                + no lettuce, + no egg, + no tomato.
                So they would click on an ADD button to say they don’t want something on the sandwich.

                The way it is setup now it looks ok, you see the pre-selected ingredients and you press the minus button if you want to remove it.

                So for the page where the customer can create the sandwich all can remain the same.

                The only “weird” thing is the following.

                For example the sandwich “smos kaas-hesp” always has the same pre-selected ingredients.
                So in order to keep the overview on the mail that is sent to the restaurant, there is no need to repeat the pre-selected ingredients for each sandwich as the restaurant knows these.

                If they would only see the changes that have been made by the customer, it will allow them to work quicker.

                Currently the mail shows this.

                But it should only show the changes.

                so if they don’t see anything written below a sandwich they immediately know that they can make it with all the pre-selected ingredients.
                And otherwise they directly see what needs to be added or removed.

                As it is now, they have to read everything below each sandwich just to be sure nothing is removed or added thus taking more time πŸ™‚

                #5266
                Olly
                Admin & Mod

                  >So they would click on an ADD button to say they don’t want something on the sandwich.

                  matter of opinion i guess. they are just clicking on a button that has a label next to it saying “no cheese” so the are effectively adding the “no cheese” option

                  I cannot really see this as being an issue or confusing .
                  and if you set the label of that group to something descriptive (like “select the things you dont like” or something it should be even more obvious

                  >… there is no need to repeat the pre-selected ingredients for each sandwich as the restaurant knows these….etc

                  hence why my suggestion would work nicely. only changes would appear if nothing’s added or removed its just the menu item title. no preselection necessary.

                  #5269
                  Olly
                  Admin & Mod

                    and if you have way too much time on your hands, you could,
                    with some css, even change the + to a – as those symbols are actually css controlled and all have their distinct id’s on the li wrapper

                    #5270
                    kevin wuyts
                    Participant

                      I’ll have another look into that.
                      I’ll setup a second version of the site with the changes you suggested and let the owner decide how he wants the setup πŸ™‚

                      Thanks for looking into this.

                      #5271
                      kevin wuyts
                      Participant

                        Should you ever want to change it anyhow, you can always provide this as an option in the settings menu.

                        [*] show all ingredients in order mail
                        [ ] only show changed ingredients in order mail

                        This way the user can decide what works best for them. πŸ™‚

                        #5272
                        Olly
                        Admin & Mod

                          >Thanks for looking into this.

                          no problem, was kind of fun

                        Viewing 11 posts - 1 through 11 (of 11 total)
                        • The topic ‘Limit additional info in mail’ is closed to new replies.