WPPizza – A Restaurant Plugin for WordPress › Support › Add-Ons › Extensions › Delivery By Post/Zipcode › Support › Cannot set free delivery for some
- AuthorPosts
- 20 February, 2016 at 1:56 pm #15969
Hi,
I intend to use this extension a little bit different with City names instead of zipcodes. Not that this should matter.
I have the following setup now:
– Standard delivery costs 3,- in the regular wp pizza settings
– Delivery costs for some cities 3, 2 or 2,50 in the zip extensionBut I want to set the delivery costs for 1 delivery area to 0. But a 0 is not allowed and it defaults to 3,-
But what I really would like to setup is:
– Default delivery costs 3,- and free with a minimum order of 8,-
– Set delivery costs for some cities to 3, 2,50 or 2,- and a minimum order of 10, so no free delivery ever.
– Set delivery costs for 1 area to free if minimum order is above 10,- and otherwise set the delivery costs to 1,- (so order 8 or 9 euros pay 1 euro delivery costs anything above 10 it’s free).But I cannot set this up either. If I do not enter a value at free delivery in the zip extension it will still be free if the order is above 8 euros.
The first problem can be solved by setting the delivery costs to 0,01. But that’s not a nice solution as 1 cent is not free delivery. The second problem I have not found a solution for yet.
Please advise 🙂
20 February, 2016 at 2:08 pm #15970>But a 0 is not allowed…
you sure ? i can set 0 just fine here.
can you do a screenshot of the “Delivery Charges:” in wppizza->order settings
and a screenshot of the post/zip delivery options please , so i can first of all try to reproduce this?thanks
20 February, 2016 at 2:23 pm #15971Okay technically it allows a 0, but after saving it removes the 0 and is empty.
General settings where delivery charge is set to 3,-
The 0 I entered at Roermond disappeared and only works if I set it to 0,01:
20 February, 2016 at 11:07 pm #15976looks more like a max_post_vars/max_input_vars issue..
are you running suhosin or have limited max_post_vars/max_input_vars somehow ?21 February, 2016 at 3:44 pm #15987Hi,
If that was the problem I should not be able to set the same var to 0,01 or another value?
max_input_vars is set to 1000
suhosin.post.max_vars is set to 20000
Tested with PHP 5.5, 5.6 and 7 and all give the same result
21 February, 2016 at 4:29 pm #15988>If that was the problem I should not be able to set ….
probably, but if – for some reason – some other vars change and you might therefore run out of max vars, it could have been an issue. Alas at 1000 post vars, you should be just fine here. so the problem is elsewhere.
as i said, i can save 0 just fine here.
can you turn on debug please and see if you get any info from there ?21 February, 2016 at 7:53 pm #16007Hrmz. The wordpress debug is on. But no errors there.
Strange thing is that I can set the minimum order to 0, but when I put a 0 in the delivery charge it is emptied on save.
It seems to go wrong when saving to the database.
In the options table it says: s:6:”charge”;i:0;s:17: while other places have a d:<value> instead of i:0
21 February, 2016 at 8:11 pm #16008let me check a few things here, i believe i may have been looking at the wrong input field
21 February, 2016 at 8:20 pm #16009so, now i am looking at the right input field (doh, sorry) it seems like it’s in fact correctly saving to the db, but not displayed when set to 0 in the admin .
i’ll fix that in an update.
for now, please do the following:
in admin.echo.get_delivery_areas.inc.php on apprx line 50 you will find$value=!empty($options[$field][$k]['charge']) ? wppizza_output_format_price($options[$field][$k]['charge'],$optionsDecimals) : '';
REPLACE this with
$value=isset($options[$field][$k]['charge']) ? wppizza_output_format_price($options[$field][$k]['charge'],$optionsDecimals) : '';
(i.e the !empty becomes isset )
once you have done that, let me know if that fixes things…
22 February, 2016 at 6:11 am #16020Thanks that works for the backend indeed.
However if I select the delivery area Roermond on the frontend the order costs are the default 3,- instead of 0,-
For the other delivery areas it works fine.
22 February, 2016 at 9:16 am #16021ok
i did not actually test that over the weekend.
i’ll look at it . assuming you are right, i am somewhat surprised though that nobody has noticed that before ….anyway , will get back to you in a bit
22 February, 2016 at 11:27 am #16025ok, should be fixed as of 3.9.2 which should show up in your admin ->plugins in a bit as an update (assuming you have activated the licence)
- AuthorPosts
- The topic ‘Cannot set free delivery for some’ is closed to new replies.