WPPizza – A Restaurant Plugin for WordPress › Support › General Support › Cannot add to cart when exclude size is selected
- AuthorPosts
- 15 February, 2015 at 9:04 am #7879
Hi Olly (Again),
When the exclude meals sizes option is selected we cannot add any item (Thats uses this) to the cart.
EG,
When we go back into the custom groups it appears to have changed the Custom Group Type from “Exclude” to “Group must have one “And Only One””
EG,
You can see this on our test site on the first item on our Nandos menu, unfortunately you won’t be able to save custom groups here due to max_input_vars (Test.foodking.co.uk Login details are the same as yesterday)
Cheers (again),
15 February, 2015 at 9:17 am #7880there is an issue with selection (my end)
whatever you do, do not save your custom ingredient groupsi’ll fix it
(the second issue is a bit more complicated, but i know why)
15 February, 2015 at 9:33 am #7881Cheers for the reply, I forgot to mention the second problem only appears on the latest version of the plugin.
15 February, 2015 at 9:34 am #78834.6.5 should at least now select/display the right saved group type again
the not being able to select/add to cart is possibly an issue because of multiple excludes for the same item i’ll check if i can reproduce this…(why would you even need more than one exclude group for an item I wonder though….but never mind, i don’t think I even want to know…:))
15 February, 2015 at 9:46 am #7884> I forgot to mention the second problem only appears on the latest version of the plugin.
makes sense and should not be an issue anymore with 4.6.5 – i have updated your testsite with itdo me a favour and make a backup of your options table on the test site and then see if you can save the custom groups (should be fine on that front now, but better save than sorry)
15 February, 2015 at 9:47 am #7885PS re:(the second issue is a bit more complicated, but i know why)
should have read, the *first* issue…etc
15 February, 2015 at 10:00 am #7886Yeah I can save again now, I’ll upload a new build asap to the test site so you can see why we need multiple excludes.
Also the test site is a throwaway site if you need to delete a load of ingredients/groups to test go for it.
15 February, 2015 at 10:18 am #7887New test build is up.
I think I understand why we can’t add to cart. Let me see if I can word this to make sense.
If something is excluded from showing for one meal size but has a must select option then it won’t add to cart as it expecting something to be selected even though its excluded.
Hope that makes sense.
Ps. Have a look at the Nandos > Burgers, Pittas & Wraps section to see why we need multiple excludes etc.
15 February, 2015 at 10:24 am #7888>If something is excluded from showing for one meal size but has a must select option then it won’t add to cart as it expecting something to be selected even though its excluded.
pretty much.
there is a server side check that makes sure it all is what it should be.
when we added the option to selectively exclude (or not exclude as the case may be) for a particular size option for a menu item, this did not get updated to reflect that. so it’s still looking for it to be there (or not)…(if you look into your console when trying to add, you will see a “cheating, are we ?”
which is the return of the array (just for my info really so i know what is happening when things like this arise)15 February, 2015 at 10:29 am #7889Thanks for the explanation.
Once this and the Paypal issue is sorted we can start to enhance the main site, again we really appreciate your help.
15 February, 2015 at 10:35 am #7890the paypal issue is probably your end somewhere
it’s used 100’s of times without issues elsewhere, so am assuming something in the setup is wrong.i’ll look at it later though (did you read the setup instructions / troubleshooting ?)
in the meantime, you could/should enable logging there (if you havent already)
might tell you/us things when we look at it15 February, 2015 at 10:46 am #7891PS: you can ignore 4.6.6. it’s not relevant to you (only deals with some possibly minor annoyances on first installs i just discovered)
15 February, 2015 at 10:58 am #7892Yes we did read the guide for Paypal everything is as it should be and log’s are enabled. Everything is working okay apart from that final thank you page. I have created a separate thread about this in the gateways forum didn’t mean to discuss it here.
4.6.6 ignored 😉
15 February, 2015 at 11:06 am #7893> didn’t mean to discuss it here
thanks – we’ll talk about that over there laterfirst i’ll try and figure out how to persuade the server side check to ignore the right things…
I don’t think this will be a one second affair…15 February, 2015 at 11:16 am #7894Didn’t think it would be.
Again feel free to use the test site to edit/remove whatever is needed to help.
16 February, 2015 at 11:13 am #7902I have put a new version on your test server to test things before making it globally available.
from what i can see, this seems to work now having tried a few of your menu items .
However, as you probably know your setup better than i do, it would be helpful if you could just double check items you know might have a setup that could/did cause issues
(and – of course let me know if you find any)16 February, 2015 at 7:48 pm #7914So far so good. No issues to report.
Thanks again for your support.
16 February, 2015 at 8:05 pm #7915>So far so good. No issues to report.
sounds promising.
>Thanks again for your support.
thanks for being a guinea pigin the meantime, i am messing around with making those radio buttons behave better on all devices
so the selected black radio input dot is not all over the place on some browsers/devices…think i got it, but need a bit more testing as i had to add a span element
and – while i was at it – i also enabled the text to be clicked as opposed to just the button next to an ingredient. seemed to be an obvious thing to do really….
16 February, 2015 at 8:45 pm #7916Sounds good.
Have found one more problem.
When trying to add a BBQ sauce from the Mcdonalds menu we are getting (It’s happening on quite a few other items as well)
error : SyntaxError: Unexpected token <
When inspecting elements we get
<b>Warning</b>: Illegal string offset 'lbl' in <b>C:\xampp\htdocs\sthelens\wp-content\plugins\wppizza-add-ingredients\ajax\get-json.php</b> on line <b>628</b><br /> {"body":"<form id='wppizza-ingr-form'><legend ><a id=\"wppizza-cart-cancel\" title=\"Close\">[x]<\/a>Item options<span id=\"wppizza-sub-info\"><input id=\"wppizza-diy-to-cart\" class=\"btn btn-primary\" type=\"button\" value=\"Add to order\"><span id=\"wppizza-current-sum\"> Total \u00a3<span id=\"wppizza-current-total\">0.00<\/span><\/span><\/span><\/legend><div id=\"wppizza-ingredients-selected\"><span id=\"wppizza-current-ingredients-1\" class=\"wppizza-current-ingredients\"><span class=\"wppizza-multi-icon wppizza-multi-icon-1-1\"><\/span><p>No options currently chosen<\/p><\/span><input type=\"hidden\" id=\"wppizza-selected-ingredients-1\" class=\"wppizza-selected-ingredients\" value=\"\" \/><\/div><input type=\"hidden\" id=\"wppizza-ingr-multitype\" value=\"1\" \/><ul class=\"wppizza-multiselect-tabs\"><\/ul><div id=\"wppizza-imulti-1\" class=\"wppizza-imulti\" style=\"display:block;\"><fieldset id=\"wppizza-ingredients-req-1-154\" class=\"wppizza-list-ingredients\"><legend>How Many?<\/legend><ul><li id=\"wppizza-ingredient-1-1276-1-154\" class=\"wppizza-ingrli-1276\"><span class=\"wppizza-doingredient wppizza-ingr-1 wppizza-input-native\" title=\"Add\"><b><input type=\"radio\" id=\"wppizza-ingredient-req-1-1276-1\" name=\"wppizza-ingredient-req-1-154\" value=\"1276\" \/><\/b><\/span>1 <\/li><li id=\"wppizza-ingredient-1-1277-1-154\" class=\"wppizza-ingrli-1277\"><span class=\"wppizza-doingredient wppizza-ingr-1 wppizza-input-native\" title=\"Add\"><b><input type=\"radio\" id=\"wppizza-ingredient-req-1-1277-1\" name=\"wppizza-ingredient-req-1-154\" value=\"1277\" \/><\/b><\/span>2 <\/li><li id=\"wppizza-ingredient-1-1278-1-154\" class=\"wppizza-ingrli-1278\"><span class=\"wppizza-doingredient wppizza-ingr-1 wppizza-input-native\" title=\"Add\"><b><input type=\"radio\" id=\"wppizza-ingredient-req-1-1278-1\" name=\"wppizza-ingredient-req-1-154\" value=\"1278\" \/><\/b><\/span>3 <\/li><li id=\"wppizza-ingredient-1-1279-1-154\" class=\"wppizza-ingrli-1279\"><span class=\"wppizza-doingredient wppizza-ingr-1 wppizza-input-native\" title=\"Add\"><b><input type=\"radio\" id=\"wppizza-ingredient-req-1-1279-1\" name=\"wppizza-ingredient-req-1-154\" value=\"1279\" \/><\/b><\/span>4 <\/li><li id=\"wppizza-ingredient-1-1280-1-154\" class=\"wppizza-ingrli-1280\"><span class=\"wppizza-doingredient wppizza-ingr-1 wppizza-input-native\" title=\"Add\"><b><input type=\"radio\" id=\"wppizza-ingredient-req-1-1280-1\" name=\"wppizza-ingredient-req-1-154\" value=\"1280\" \/><\/b><\/span>5 <\/li><li id=\"wppizza-ingredient-1-1281-1-154\" class=\"wppizza-ingrli-1281\"><span class=\"wppizza-doingredient wppizza-ingr-1 wppizza-input-native\" title=\"Add\"><b><input type=\"radio\" id=\"wppizza-ingredient-req-1-1281-1\" name=\"wppizza-ingredient-req-1-154\" value=\"1281\" \/><\/b><\/span>6 <\/li><\/ul><input type=\"hidden\" id=\"wppizza-ireq-1-1-154\" class=\"wppizza-ireq\" value=\"1276,1277,1278,1279,1280,1281|0|0|1|0|0\" \/><\/fieldset><\/div><fieldset id=\"wppizza-ingr-comments-post\" class=\"wppizza-ingr-comments\"><legend>Any other instructions?<\/legend><input type=\"text\" class=\"wppizza-ingredients-textinput\" name=\"wppizza-ingredients-textarea[]\" value=\"\" \/><input type=\"hidden\" name=\"wppizza-ingredients-textarea-lbl[]\" value=\"Any other instructions?\"\/><\/fieldset><div style=\"margin:0 0 30px 0;padding:5px 3px 0 0;\"><input id=\"wppizza-diy-to-cart\" class=\"btn btn-primary\" type=\"button\" value=\"Add to order\"><\/div><\/form>","head":""}
Test site is still open for you if you want to test this.
16 February, 2015 at 8:55 pm #7917This is not happening on the test site sorry only appearing on local atm. We have had customers reporting this error to us but this is the first time we have seen it ourselves.
- AuthorPosts
- The topic ‘Cannot add to cart when exclude size is selected’ is closed to new replies.