bernhard Posted June 14, 2022 Share Posted June 14, 2022 https://www.autohaus-bendel.at/ Highlights/Features: New Logo and matching Backend using module AdminStyleRock Very good google- and performance-ratings thx to UIkit and ProCache Flexible content pages (using private module RockMatrix) Cars are fetched automatically from an austrian cardealer API and converted into ProcessWire pages with a custom filter page: https://www.autohaus-bendel.at/fahrzeuge/ Forms with honeypots and live validation (using private module RockForms based on nette forms) Web-Coach The client gets automated reminders if he does not add new content to the website. Thx @wbmnfktr Bendel Web Coach The last news entry was created 21 days ago. There must be something new that will interest your clients ;) > To the website > Create news entry Animated page transitions using barba.js Migrations and deployment using RockMigrations. Debugging using TracyDebugger. ? 16 1 Link to comment Share on other sites More sharing options...
Stefanowitsch Posted June 15, 2022 Share Posted June 15, 2022 10 hours ago, bernhard said: Cars are fetched automatically from an austrian cardealer API and converted into ProcessWire pages with a custom filter page: https://www.autohaus-bendel.at/fahrzeuge/ Fascinating! Can you explain how you approached the API Data fetchig? Do you use a simple Ajax Request when filtering items or are you actually creating pages, populated with data and use those instead? I am always interested in methods to "feed" processwire from outside nowadays. Link to comment Share on other sites More sharing options...
bernhard Posted June 15, 2022 Author Share Posted June 15, 2022 Data is fetched via cron every night and then PW pages are created so that the client can enrich those pages with data that is not part of the API but is helpful on the website (eg a PDF sheet for the car or the point of contact): API-Fields are read-only. If a car is created by the cron and the point of contact is empty, the client gets a link to directly edit this page and select the POC ? If cars are sold, the cron automatically trashes those pages on the website. Ah... I forgot a nice detail! They have a custom branded PDF viewer: 4 Link to comment Share on other sites More sharing options...
Stefanowitsch Posted June 15, 2022 Share Posted June 15, 2022 I like the idea of having a cronjob for fetching data. I also used this technique in an actual project (that I will introduce here when its finished!) but there was no external API involved. Link to comment Share on other sites More sharing options...
szabesz Posted June 15, 2022 Share Posted June 15, 2022 This one looks cool:https://www.autohaus-bendel.at/fahrzeuge/300862-citroen-citroen-xm/ Nice site, BTW! 1 Link to comment Share on other sites More sharing options...
Andy Posted June 25, 2022 Share Posted June 25, 2022 Hi @bernhard Impressive project. It's a little jealous that I can't do that yet. Tell me please, why did you use RockForms here when you have the PW Form Builder? 1 Link to comment Share on other sites More sharing options...
bernhard Posted June 26, 2022 Author Share Posted June 26, 2022 On 6/15/2022 at 3:57 PM, szabesz said: Nice site, BTW! thx @szabesz On 6/25/2022 at 12:00 PM, Andy said: Hi @bernhard Impressive project. It's a little jealous that I can't do that yet. Tell me please, why did you use RockForms here when you have the PW Form Builder? Hi @Andy thx for your kind words! well... I like to do thinks in code rather than clicking around a GUI, because then I have all in GIT and can automatically deploy it to production. In addition to that I love how you can write form code once and get frontend and backend validation of your forms automatically. The next point is that I don't like the embed methods via Iframe and I never got used to the other output method - how is it called? Direct output? Another point is that I try to avoid hook hell as much as possible. Hooks are great, but I started to adopt concepts where things that belong together are in the same file or folder. That's why every form that I create for RockForms is one single PHP file, that defines all the necessary pieces (fields, after submit action like sending an email, markup for the frontend, error messages...). <?php namespace ProcessWire; /** @var RockForms $rockforms */ $form = $rockforms->form('newsletter', [ 'token' => false, // disable csrf for use with procache! ]); $form->setMarkup("field(email)", "<div class='sr-only'>{label}</div>{control}{errors}"); $form->getElementPrototype()->addClass('mb-12'); $form->addText("email", "E-Mail Adresse") ->setHtmlAttribute("class", "text-gray-dark w-full focus:border-violet focus:ring-violet") ->setHtmlAttribute("placeholder", "Ihre E-Mail Adresse") ->isRequired(); $form->addMarkup("<button type='submit' class='btn btn-sm btn-pink !px-12 mt-6'>Newsletter abonnieren</button>"); if($form->isSuccess()) { $values = $form->getValues(); if($form->once()) { /** @var RockMails $mails */ $mails = $this->wire('modules')->get('RockMails'); $mails->mail('newsletter') ->to('office@example.com') ->subject("New Newsletter Subscription") ->bodyHTML($form->dataTable()) ->send(); $this->log('sent mail'); } $form->success('<span style="color:black;">Thank you for your subscription</span>'); } return $form; This is an example for an easy newsletter subscription form. For me it is also better to code my own module because then I have a lot more freedom and can add extensions and new features while working on any project that uses the module. For example the $form->dataTable() is something I need very often (send form data via mail or show form data in the backend). I guess I'll release this as commercial module soon - if anybody reads this and is interested in a closed alpha write me a PM ? 2 1 Link to comment Share on other sites More sharing options...
Andy Posted June 30, 2022 Share Posted June 30, 2022 Hi @bernhard RockForms looks extremely intriguing. I should definitely give it a try. However, I haven't found how to use the datepicker in the form. Does it have to be external or I just don't get it? Link to comment Share on other sites More sharing options...
bernhard Posted June 30, 2022 Author Share Posted June 30, 2022 Just now, Andy said: RockForms looks extremely intriguing. I should definitely give it a try. The module is not public. There's an older version lying around in the forum, but the new version does definitely have a better syntax and is easier to use. 2 minutes ago, Andy said: However, I haven't found how to use the datepicker in the form. Does it have to be external or I just don't get it? NetteForms does not have a datepicker by default so you'd have to implement that on your own or use an existing solution: https://www.google.com/search?q=nette+forms+datepicker&oq=nette+forms+datepicker&aqs=chrome..69i57j33i10i160l3.2471j0j7&sourceid=chrome&ie=UTF-8 Link to comment Share on other sites More sharing options...
Andy Posted June 30, 2022 Share Posted June 30, 2022 Hi @bernhard Thanks for the quick response. 26 minutes ago, bernhard said: The module is not public. There's an older version lying around in the forum, but the new version does definitely have a better syntax and is easier to use. I see that you changed the status of RockForms to [deprecated]. Can I practice on the old version or have the terms of use changed? If the module became paid, what are the terms of use for the new module? Link to comment Share on other sites More sharing options...
bernhard Posted June 30, 2022 Author Share Posted June 30, 2022 1 hour ago, Andy said: Can I practice on the old version or have the terms of use changed? The terms did not change and will not change, though there will not be any updates/fixes/support. I'll write you a PM regarding the new version of RockForms 1 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