bowiez Posted April 18, 2013 Share Posted April 18, 2013 Hallo allemaal, Ik ben een webshop aan het bouwen voor een klant waar bezoekers eten kunnen bestellen online. Het restaurant bezorgt alleen naar bepaalde postcodes en die probeer ik te valideren nadat een bezoeker hun postcode heeft ingevuld en als de postcode niet in het systeem zit dan moet de bezoeker een melding krijgen dat er niet bezorgd kan worden op die postcode. Weet iemand hoe ik het moet doen? Alvast bedankt! Link to comment Share on other sites More sharing options...
Ronman Posted April 20, 2013 Share Posted April 20, 2013 (edited) Hoi, Vraag waarom vang je dit niet af voor de klant op je webshop komt? Dat is vrij gemakkelijk te realiseren. ik heb voor jou even een voorbeeld gemaakt URL: http://www.de-groenegids.nl/test/postcodecheck/index.php goede postcode is bijv 7755 of 7788 of 7799 (dit is om te testen) Je kunt hier je eigen "goede " postcodes invullen Laat maar weten wat je ervan vindt Edited April 20, 2013 by Ronman (see edit history) Link to comment Share on other sites More sharing options...
bowiez Posted April 22, 2013 Author Share Posted April 22, 2013 Bedankt voor je antwoord, Ronman. Zou je zoiets ook via het formulier kunnen doen bij guest checkout of bij nieuwe account aanmaken? Het idee komt er wel op hetzelfde neer. Link to comment Share on other sites More sharing options...
Ronman Posted April 22, 2013 Share Posted April 22, 2013 (edited) Ziye, Op zich zou dat kunnen maar dan moet je code toevoegen aan de prestashop scripts. Moeilijk en foutgevoelig. Mijn overweging was de volgende. Veronderstel dat een klant op je site komt , vervolgens rondkijkt en denkt ik bestel iets. Hij/zij zoekt zorgvuldig iets uit en besteld. Dan moet deze persoon een account aanmaken. Alles invullen en verzenden (anders kun je de ingevulde lijst niet "eenvoudig" controleren) en plots krijgt deze persoon de melding u kunt wel bestellen maar we bezorgen niet. Dan is dus alles voor niets geweest. Persoonlijk zou ik dat zeer frustrerend vinden en als negatief ervaren. En je weet negatieve reacties spreiden snel rond. Dat wil je niet als bedrijf. Dit script dat ik heb geschreven kun je met een iframe eenvoudig invoegen op je homepage (via je homepage editer) dan hoef je natuurlijk niet te redirecten. Je krijgt dan zoiets als "just eat" URL: http://www.justeat.nl Zoiets is door de klant snel te vinden en er is snel duidelijkheid. Vervolgens kan de klant bestellen. Groet Ronny Edited April 22, 2013 by Ronman (see edit history) Link to comment Share on other sites More sharing options...
scorpionsworld Posted April 22, 2013 Share Posted April 22, 2013 Ziye, Op zich zou dat kunnen maar dan moet je code toevoegen aan de prestashop scripts. Moeilijk en foutgevoelig. Mijn overweging was de volgende. Veronderstel dat een klant op je site komt , vervolgens rondkijkt en denkt ik bestel iets. Hij/zij zoekt zorgvuldig iets uit en besteld. Dan moet deze persoon een account aanmaken. Alles invullen en verzenden (anders kun je de ingevulde lijst niet "eenvoudig" controleren) en plots krijgt deze persoon de melding u kunt wel bestellen maar we bezorgen niet. Dan is dus alles voor niets geweest. Persoonlijk zou ik dat zeer frustrerend vinden en als negatief ervaren. En je weet negatieve reacties spreiden snel rond. Dat wil je niet als bedrijf. Dit script dat ik heb geschreven kun je met een iframe eenvoudig invoegen op je homepage (via je homepage editer) dan hoef je natuurlijk niet te redirecten. Je krijgt dan zoiets als "just eat" URL: http://www.justeat.nl Zoiets is door de klant snel te vinden en er is snel duidelijkheid. Vervolgens kan de klant bestellen. Groet Ronny Waarom via een iframe? Waarom niet direct in de header.tpl template? Kwestie van een if-statement toevoegen aan de template die checkt op een GET/POST-waarde. Link to comment Share on other sites More sharing options...
Ronman Posted April 22, 2013 Share Posted April 22, 2013 (edited) Er zijn waarschijnlijk veel verschillende oplossingen mogelijk. Ik zocht een oplossing waarbij er geen PS script in de source code aangepast hoeft te worden. Misschien is http://www.thuisbezorgd.nl/ een beter voorbeeld van wat ik bedoel. Edited April 22, 2013 by Ronman (see edit history) Link to comment Share on other sites More sharing options...
scorpionsworld Posted April 22, 2013 Share Posted April 22, 2013 Er zijn waarschijnlijk veel verschillende oplossingen mogelijk. Ik zocht een oplossing waarbij er geen PS script in de source code aangepast hoeft te worden. Misschien is http://www.thuisbezorgd.nl/ een beter voorbeeld van wat ik bedoel. De check middels een module invoeren en een template aanpassen is ook geen core PS script aanpassen Maar er zijn inderdaad meerdere wegen die leiden naar Rome Link to comment Share on other sites More sharing options...
bowiez Posted April 24, 2013 Author Share Posted April 24, 2013 @Ronman Je hebt wel een punt. Waar kan ik jouw module / script vinden? Link to comment Share on other sites More sharing options...
Ronman Posted May 5, 2013 Share Posted May 5, 2013 Hoi Ziye, Ik heb de oplossing voor jou zet in je htaccess het volgende: DirectoryIndex index2.php index.php index.htm index.html dit bepaald de volgorde van server aanvraag in dit geval zal de server eerst kijken naar index2.php maak daarom van het postcodescript index2.php en laat deze redirecten naar de index.php van jou webshop. Groet, Ronny Jansen Link to comment Share on other sites More sharing options...
steffann1 Posted June 12, 2013 Share Posted June 12, 2013 Hey Ronman, we are looking for very much the same functionality you just demonstrated: not sure how to implement it. any chance to describe it in simpler way? Thanks Link to comment Share on other sites More sharing options...
Ronman Posted June 15, 2013 Share Posted June 15, 2013 If you can give me your website url i can give you some advise to implement the postcodescript. Because the script only works right if your webshop have a different directorie than the root. For example, www.yourwebsite.com/yourwebshop If that is the right url sequence , you can put the script in the directory www.yourwebsite.com/postcodescript link to it from the root directorie and redirect the postcodescript to the url: www.yourwebsite.com/yourwebshop if the postcodecode(zipcode) is right. If otherwise you must work with a database structure. Link to comment Share on other sites More sharing options...
steffann1 Posted June 15, 2013 Share Posted June 15, 2013 (edited) The website doesn't exist just yet. we are just trying to work out the way to go about this post code navigation. let me just try to describe our idea. we are going to use multishop functionality in prestashop for our project. Let's say we r selling bread locally and we have a main website called www.breadshop.co.uk. we have partnered with local artisan bakeries in many counties and have an exclusive partner for each county. we will than use multistore function for each bakery(county) for example: breadshop.co.uk/hampshire which will have local bread and specialities from Hampshire and local baker will be looking after the area and would be making deliveries. this local baker will be able to choose sub areas within his territory and to choose different delivery days time slots and charges for each subarea within this county. this module works with postcodes or radiuses to determine whether the customer lives within the delivery area and only than customer is able to complete the checkout. All this should be without any bigger issue. However we would need something similar to your solution to be on the home website www.breadshop.co.uk which would be able to redirect customers to their local multistore page should their postcode match one of the delivery subarea within this local county.(area) or to let them know that delivery is not available before they even start shopping. We have been thinking about different solutions such as a map on the home page with available locations which would by linked to local multisites but the postcode method would be a lot more professional and neat. I know its probably way to complex but we will welcome any ideas. Thnks Edited June 15, 2013 by steffann1 (see edit history) Link to comment Share on other sites More sharing options...
Ronman Posted June 16, 2013 Share Posted June 16, 2013 oke, I think i understand the idea. You want the different costumers redirect to the bakery (website) that delivers in there neighborhood. For example: Zip code 7000, 7500, 7800 rediects to shop_A Zip code 5000, 5500, 5800 redirects to shop_B Zip code 4000, 4500, 4800 redirects to shop_C etc. Thats possible and is not that hard to make. first: Your website home(index)page have to show a script that looks for the costumers movements. are they been there or are they new. When they where here the script has to redirect directly to the website where the zipcode fits. When not the script redirect to the zicode control panel. second: The zipcode script must redirect to the different webshops. I have to expand the script with the different zipcodes and there redirects. Let me know how many webshops you want to make and how many zipcodes you want to redirect. I than can make an example script. Link to comment Share on other sites More sharing options...
steffann1 Posted June 16, 2013 Share Posted June 16, 2013 We are looking to launch a trial to test the behaviour and functionality of presta's multistore feature in Dorset county, UK first with London and Birmingham to follow by the end of the year. The aim is to cover 10 biggest cities within a year. There will be probably several shops/sites in London itself due to the sheer size of the city. we are looking to expand gradually across the whole UK. "When they where here the script has to redirect directly to the website where the zipcode fits." does this mean that when someone who is already registered with the shop A comes to the homepage (www.breadshop.co.uk) will be automatically redirected to shop A site without having to enter their postcode again? and also would this homepage be required to run prestashop as well even though we wouldn't be actually selling anything on it. As we just need it as a means of redirection to local sites/shops. So to start with we are going to need just one site. Shop A. We have already partnered with a supplier in Dorset. Once the site is up and running we will able to demonstrate to our future partners the benefits and functionality of such a website on a functional real life model, we are confident that we will be able to sign up more partners within short amount of time. So for that reason we would like to build the website from the ground up so it's scalable and prepared for more local shops. therefore this home page should look the same regardless of the number of shops. Its just your script will be saying "delivery unavailable in your area" most of the time at start. Link to comment Share on other sites More sharing options...
Ronman Posted June 17, 2013 Share Posted June 17, 2013 (edited) oke, try this url: http://www.de-groene.../test/ps_check/ The right zipcode is London 7000 Dorset 7755 Try the code , close the browser and come back to try it again. You can see you get redirected imediatly to the right page. Clean the browser cookies and try the whole thing again. Kind regards, Ronny Edited June 17, 2013 by Ronman (see edit history) 1 Link to comment Share on other sites More sharing options...
steffann1 Posted June 17, 2013 Share Posted June 17, 2013 Im impressed. Link to comment Share on other sites More sharing options...
steffann1 Posted June 17, 2013 Share Posted June 17, 2013 there is something else we have come across that may be an issue and probably you will have an answer to this as well. Let say we have a different shops for different locations. Products from these shops will eventually show up on google search results. what if someone lets say from dorset will find and click on link in google from london shop is there a possibility of being transfered to homepage with your post code navigation instead of the london shop where the actual link is from? Link to comment Share on other sites More sharing options...
Ronman Posted June 18, 2013 Share Posted June 18, 2013 Hi, Maybe you can change the prestashop settings in such a way that, when a visitor clicks on an outside URL, they get redirected to the homepage. I can not give you a solution with the script i have made. Maybe you can ask it on the forum Greetings, Ronny NB if you want to have the scrip download it from http://www.de-groenegids.nl/test/ps_check/ps_check.zip Succes 1 Link to comment Share on other sites More sharing options...
majick Posted October 17, 2013 Share Posted October 17, 2013 Hi Ronny, I Love the Zip check script! Could I please download that or get a copy? Kind Regards Mick Link to comment Share on other sites More sharing options...
Ronman Posted October 23, 2013 Share Posted October 23, 2013 Hoi Mick, click on the url http://www.de-groenegids.nl/test/ps_check/ps_check.zip And download the file. Kind Regards Ronny Link to comment Share on other sites More sharing options...
nicoo77 Posted March 14, 2017 Share Posted March 14, 2017 Hello, I am building a new website and I need to switch the customer to the nearest store based on the zip code. I guess the script you are talking about will help me? Can I have the download link because the link above it does not seem to work. Thank you in advance! Link to comment Share on other sites More sharing options...
ecommerce16 Posted March 14, 2017 Share Posted March 14, 2017 dont think you will get much response, its a post from 2013. Think you better post this as a new post in english forum. This is dutch forum. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now