Jump to content

olafgleba

Members
  • Posts

    48
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by olafgleba

  1. Hi, for a client project i am evaluating whether to implement this with Processwire (preferred of course ;-)) or if something else fits better. I have no experience with Payment Workflows in conjunction with Processwire so far. Project summary: There are large number of (small) Children Art Schools. They all offers workshops on there Websites (online/offline). These websites are built with partly unknown CM-Systems. To date some of them has a simple registration form (payment offline per invoice only), while some only even have a Registration PDF to Download. Billing and chargeback issues bothers them a lot because the lack of staff ressources. Planned is a stand-alone Registration Portal for all Art Schools. While the offers still being part of their websites (some kind of, s. below), the registration process should be delegated to the Portal. Therefore every offer just has a correponding link to the Registration Portal. Payment is a obligatory part of the registration process. __ Portal features: Backend: - Each Art School has a separate, isolated Account to maintain their offers, invoices and customer records - Each Account (e.g. each Art School) creates their offers in the backend, these entries are shown in the Frontend of the Registration Portal (kind of duplication as offers also exists within the Clients Websites, but required to not interfere with the Art School Websites' CM-Systems, reason s. above) Frontend: - Nothing fancy: Listing of workshops, filter by Art Schools, categories, search form Process: - Each registration record have to be bounded to the corresponding Account(s. above) - In conjunction with sending some mails, each registration record must be saved in a customer tree/table/page to hold the customer data, provided by the registration form. Payment: - A Payment Provider must be integrated to provide digital payment options (credit card, debit a.s.o.) and secure transactions __ So at first sight these are not any very complex needs. But while i try to collect as much infos as possible, i am increasingly unsure which way is a reliable way to do it. I heard from Padloper. And read the (work in progress) documentation. I am not sure the project requires a full store with cart though. And there is the Stripe Payment Processor for FormBuilder/Stripe payments Inputfield for FormBuilder, for example. I understand the difference between the padloper and FomBuilder approach, still i speculate which approach is suitable for the project needs. Most of the time i have rather strong opinions how to do things. But here i get a bit lost. Because i didn't have those requirements in a project so far. So, any hint, suggestion or insight surely will help me a lot to make appropriate decisions. Many thanks in advance, Olaf
  2. Could be helpful for someone,- this is how it turns out... Note: The code examples only represent the relevant snippets related to the topic. They are not illustrating a complete search form. regards, Olaf /** * PHP section */ // Init vars $selector = ''; $selected = ''; /** * Build selector string for the search query (`$pages->find(...)`) * * 1. `$input->get('type_of_audience')` is a array (s. HTML section below) * 2. Input gets sanitized into a unique variable (because in the real form * there are multiple filter groups (not included in this bare example)) * 3. The `field` variable is just a prefix for the selector string * 4. Join array elements to a string, Delimiter `|` * 5. Whitelist the sanitized value */ if($input->get('type_of_audience')) { $value_type_of_audience = $sanitizer->intArray($input->get('type_of_audience')); $field = "combo_productions_attributes.type_of_audience="; $selector .= $field.join('|', $value_type_of_audience).", "; $input->whitelist('type_of_audience', $value_type_of_audience); } /** * HTML form section * * Implies surrounding `<ul>` and `</ul>` element */ /** * Build the HTML element (Grouped Checkboxes) * * 1. The foreach array is populated by hand in this case * 2. If input exists in the delivered array, set `checked` attribute */ <?php foreach(array( '1' => 'Adults', '2' => 'Children') as $val => $label) { echo "<li>"; $selected = in_array($val, $input->whitelist->type_of_audience) ? "checked='checked'" : ''; echo "<input type='checkbox' id='$label' name='type_of_audience[$label]' $selected value='$val' />"; echo "<label for='$label'>$label</label>"; echo "</li>"; } ?>
  3. Thank you, @Robin S , for your answer. Yes, i am using the MarkupPagerNav. And have no idea why i didn't consider the MarkupPagerNav Docs... Instead i was focusing on the sanitizer class (s. below). However, with setting the arrayToCSV option to false, the arrays are kept in the original format indeed, but still looses their keys. http://<local-path>/?type_of_audience[]=1&type_of_audience[]=2 To keep the OP short, i didn't mentioned that i already use sanitizing and the whitelist to build the selector string for $page->find(). But didn't consider using it to set the values/states you suggested (and is shown in @ryan's examples). That's a neat idea. I think this is the way to go... Thx again, Olaf
  4. Hi, it would be nice, if someone has a hint for me. I try to put it short (and hopefully the issue is more PW than PHP related ;-)). I have a search form which has several (named, multidimensional) filter groups to narrow down the results. Form method is GET. Bare, example filter group, limited to only 2 filter options: <ul> <li> <input type="checkbox" name="type_of_audience[adults]" id="adults" value="1" <?php if(isset($_GET['type_of_audience']['adults']){ echo "checked"; } ?> /> <label for="adults" class="label-checkbox"> Adults </label> </li> <li> <input type="checkbox" name="type_of_audience[children]" id="children" value="2" <?php if(isset($_GET['type_of_audience']['children']){ echo "checked"; } ?> /> <label for="adults" class="label-checkbox"> Children </label> </li> ... other options ... </ul> After submitting the form, the results are fine and the activated checkboxes remains being checked. The query string looks like this: http://<local-path>/?type_of_audience[adults]=1&type_of_audience[children]=2 If the result is bigger than the query limit, so that the pagination is shown, the pagination query string differs from the above. It then looks like this: http://<local-path>/page2?type_of_audience=1,2 The pagination result pages are valid/correct, however. But as i have lost the keys of the filtergroup, the condition within the checkboxes markup (s. above), to keep the activated checkboxes being checked, of course doesn't fit anymore. So, my question is: Is there anything i can do about the query string building for the pagination? Or do i miss something other essential? Thx in advance, regards Olaf
  5. Brilliant! Since i am involved in multilanguage projects most of the time, this will become very handy. And i use/like the combo fieldtype a lot. So it would be great to see the module supports this fieldtype!
  6. Same here. 1. When System in debug mode is checked with $config->debug = true, the hidden pages do not show up in the page list. Switching to $config->debug = false the hidden pages are shown in page list. 2. When Current user is superuser is checked being logged in as a superuser, the hidden pages do not show up in the page list. Except i misunderstand the feature, i guess the except condition just has to be swapped/needs a little adjustment. Apart from that, thank you @ryan. This really is a very helpful new setting!
  7. And installing less in addition. Really no big deal, but just saying ?
  8. Hi @bernhard, thanks for answering. I know this as well while working for agencies (freelance),- adapting to their environment. But if i have the choice, i stick with my current dev environment that all is build around Gulp and its ecosystem. And browersync intergrates here very smoothly. I guess thats one reason i stick for it for quite a time yet.
  9. Thx. The latest ProField Repeater Matrix has the option (input tab) to define the method for adding items. When you choose Images you get the overlay. By default, the image of the matrix type have the same name and be placed along with the type file location (for example: /site/templates/fields/modules_page/matrix_type.php => site/templates/fields/modules_page/matrix_type.svg). Preparing a good looking Image is just up to you then ?
  10. Just because there is no need for this extra. The client is happy what he got. Coming from Typo3...
  11. A week ago the new website of the wuppermann group went online. The Wupperman group is a EU-wide operating company with several locations in different countries. Their portfolio is all about steel fabrication. This includes flat producs and tubes & profiles. The technical production is developed by me, Olaf Gleba. The grafic design is supplied by C&G: Strategische Kommunikation GmbH. Homepage: https://www.wuppermann.com Some Impressions: (Secured) Shareholder portal, only available in german language Former screens deleted on behalf of the client. Technical notes: 1. All contents are populated by provided (i name them) content modules (e.g. Repeater Matrix Types) which gets the client what he needs and either prevent him from doing weird stuff. In nearly all textareas formatting is limited to a absolute minimum. For example, image insertion in CKEditor is generally prohibited. Instead there are dedicated fields for modules which holds media contents. 2. This and that.. - vCards are build on the fly with a admin hook on page save. - PrivacyWire as CCM (just a few cookies to handle Matomo and external movie content) - Uses the SearchEngine Module to handle (multilanguage) site search - Email Obfuscation Module for frontend e-mail addresses - Wire Mail Smtp to deliver automated e-mails - Multilingual (currently german, english). Hungerian, polish, dutch following. - Ajax driven content (for example on the contact page) - Heavy use of Fieldtype AssistedURL (Fork by @adrian) to provide language dependend, local file linking (fieldname_[de|en] approach) - Login area (closed shareholder portal) with secured file downloads ($config->pagefileSecure = true) - Email New User, Admin Action (create users batcher), Force Password Change for functionality like adding new users with specific roles, Password reset, Change Passwort a.s.o. - Distribution of concatenate/minified css and javascript is cachebusted (happens within my developement environment,- no modules (like AIOM etc.) involved). - Thanks to @ryan* all images are delivered in WEBP format (with fallback). *) s. https://github.com/processwire/processwire-issues/issues/1497 - The site uses a bunch of modules provided by the ProFields Package (for example Repeater Matrix and Table Fieldtypes).
  12. Hi @bernhard, just being curious ;-). My current dev environment (i am afraid the github version is not quite up-to-date ?) for PW projects is based on Gulp as task runner, the PHP internal server and (beside many other things) Browser Sync ( https://browsersync.io/ ) for live injection or reloading (depending on file type) on several devices. Works fine. The problem you describe above never occured to me. As i follow your posts here in the forum quit frequently, i guess you are familiar with different approaches for dev environments. I, for example, never used webpack so far. But i am always keep my eyes(and mind) open... In your point of view,- are there some outstanding pros using webpack (and his eco system)? I know, not very precise, but just wanted to take the chance...
  13. Thank you @ryan for clarifying this (i am sure this is explained somehere in the docs already, sorry...). I only have one $config->httpHosts array, e.g. multiple hosts. What i haven't considered: www.foo.bar is not the same as foo.bar. As i only defined foo.bar so far, but the site points to www.foo.bar, PW grabs the first array entry. Which is/was 127.0.0.1... Probably i missed that, because on all my other sites i tend to point everything to foo.bar, as i find it a bit strange to prefix regular addresses with the subdomain www for no technical reason.
  14. Hi, i hardly dare to ask (because surely i miss something obviously and it sounds a bit silly)... I transfer the local installation to the live environment. Frontend works fine, all admin links/buttons (like edit, settings tab etc.pp) also (e.g. prepends the live host root correctly). Except the view button (either in the page list or while in page edit mode) references to the/a localhost root instead of the real live host. Instead of https://www.host.tld/<path-to-page>/ i get https://127.0.0.1/<path-to-page>/ when hovering over the "view" button/link. This is confusing. Can't remember that i have to tweak anything in former projects. Just to confirm the database is sober, i queried the database,- there are no results for 127.0.0.1. So possibly is has something to do with the config or/and htaccess(?). But i can't find any false or missing input here, too. At least in comparison to many former projects on different hosts. Setup: PW 3.0.200, mysql 5.6, PHP 7.2.23 (stable) Any hints? Thx in advance.
  15. @Nick Belane Hi, fixed it but haven't found the origin of the issue. I just downloaded the latest PW (3.0.184 by the time) and replaced the wire directory, index.php and htaccess by hand. But as the current master meanwhile is 3.0.200, try to repeat the upgrade steps. Maybe there is no issue with this particular upgrade. Even though, you should be save to replace the mentioned dirs/files by hand (Nonetheless i recommend backing up all relevant folders).
  16. @teppo I completely agree. Thank you for your important addition. In situations where the search section is not a essential part of the UX of a site/project (with only low budget for this part), it is possibly o.k. to use just one approach. Still combining client- and server validation is to prefer in most cases.
  17. @bernhard Brilliant stuff, thx. I have to dig into Tracy soon (installed, but yet not fully explored).
  18. @Jan Romero Many thx for your reply. The missing d made the difference ;-). With Pages::saved all works fine. Either with After or Before.
  19. Hi, a question of a hook newbie... Probably a simple one, but nonetheless i don't get it after reading the docs and playing around. While in admin i do something with some page fields before saving a page (here: generating vcards). If the page already exists (e.g. edit the page), its straight forward: $wire->addHookBefore('Pages::saveReady', function($event){ $page = $event->arguments(0); // do something with some $page fields... }); But i forgot to handle the case when a page is added. This naturally this leads to a ProcessPageAdd: New page '/path/to/page' must be saved before files can be accessed from it For my understanding, i somehow must differ between Pages::added and Pages::save (or Pages::saveReady) and/or combine the two respectively. Anyway, i assume this may not quite right, so i am running out of ideas. Maybe someone could give me some advice how this should be done. Thx in advance!
  20. Hi, haven't seen this before: Upgrading a 3.0.98 installation breaks after second step (database backup, skip backup), s. screen below. State: Master is downloaded, Database backup done, folders are created. Modul Upgrades => last current version (1.1), cleared all possible caches twice. Any ideas? Thx in advance.
  21. Just as an addition to my post above. Maybe someone benefits from it... In a multilanguage environment the HTML5 validation prevents controll over the output on search input errors (example: when the search string is too short). It skips translated strings and always gets populated depending on the browser language settings. To disable the HTML5 validation, you must enhance the template render args for the form with the attribute novalidate. $config->SearchEngine = [ 'render_args' => [ 'templates' => [ 'form' => '<form id="{form_id}" class="{classes.form}" action="{form_action}" role="search" novalidate>%s</form>', ], ], ] With that, errors are displayed within the regular HTML Elements (which respects translated strings). I don't see any drawbacks so far. See also the comment from @teppo below!
  22. @horst @howdytom Hi, same here. I empty the variants list. Original formats gets deleted, webp files remains in the asset folder. In my case, wether the image field is placed in a RepeaterMatrix (v5, latest) or is a single PW Field. It makes no difference. This is a big drawback. In my current project there were a buch of files corrupted on creation (webp). Which causes strange behaviour in google chrome. Inspected this a couple of hours,- until i found out the webp files won't get deleted physically form the asset folder. And so never being recreated. Deleting them manually solves the problem. But iterating through all assets folders by hand i cannot afford. Get rid off them with a script seems the way to go... While debugging i tried out all possible execution markup and calls as i assumed somethings wrong with my integration/code. But this was not the case. All scenarios (s. below) works fine since it turned out the only problem were the remaining webp files. PW 3.0.192 dev, GD lib image sizer Engine. @horst If there is anything i can do to help further exploring the behaviour, please let me know. Excerpt: With $config->useWebP = true; , lazysizes <?php $options = array( 'upscale' => false, 'cropping' => 'center' ); $page_image_palm = $page->image_head->size(480, 640, $options); ?> <picture> <source class="" media="(max-width: 480px)" data-srcset="<?= $page_image_palm->url; ?>" alt=""> //... <img class=" lazyload" data-srcset="<?= $page_image_palm->url; ?>" alt=""> </picture> Excerpt: With $config->useWebP = false; / Markup with default API call like in https://processwire.com/blog/posts/webp-images-on-an-existing-site/ <picture> <source class="" srcset="<?= $page_image_palm->webp->url; ?>" type="image/webp"> <img class="" src="<?= $page_image_palm->url; ?>" alt=""> </picture> And some other calls in between...
  23. @horst Your assumptions were all right. Argh, it happened quite more than once that i simply forgot about that. Thank you very much for your brief and clear explanation. @bernhard @Robin S Big thanks also for your advice and details.
×
×
  • Create New...