WPPizza – A Restaurant Plugin for WordPress › Support › Add-Ons › Extensions › Add Ingredients › Usage Examples › Limit additional info in mail
- AuthorPosts
- 3 September, 2014 at 5:44 am #4928
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 user4 September, 2014 at 12:41 am #4936ignoring 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
9 September, 2014 at 8:53 am #5004Hi 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 π
9 September, 2014 at 9:36 am #5007>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 againif 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…
23 September, 2014 at 7:05 pm #5264so, 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 cheeseset 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)
23 September, 2014 at 7:30 pm #5265Hi 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 π
23 September, 2014 at 8:09 pm #5266>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.
23 September, 2014 at 8:13 pm #5269and 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 wrapper23 September, 2014 at 8:19 pm #5270I’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.
23 September, 2014 at 8:24 pm #5271Should 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 mailThis way the user can decide what works best for them. π
23 September, 2014 at 8:27 pm #5272>Thanks for looking into this.
no problem, was kind of fun
- AuthorPosts
- The topic ‘Limit additional info in mail’ is closed to new replies.