Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/05/2024 in all areas

  1. Hi, @Ivan Gretsky effectively, I started to give little time again on an experimental project I started nine months ago where the goals is let a pw developers build a desktop application using php/pw knowledges without digging into advanced javascript/bindings or learning a native language. About the db, you want to work with statitcaly embedded mariadb versions, SQLite could be possible, but will require a lot of work.
    2 points
  2. Hey all! This is a module to enhance forms built using the Pro FormBuilder module by providing the ability to submit them in place using AJAX and HTMX. FormBuilderHtmx works in harmony with FormBuilder by handling front-end rendering and AJAX and lets FormBuilder manage form configuration and processing. FormBuilderHtmx provides a drop-in replacement for the $forms->render() method and provides all native features and behavior (and adds a few extra superpowers to boot). Noteworthy features: Zero configuration, install and render AJAX powered FormBuilder forms immediately Render multiple forms on the same page. Supports both multiple instances of the same form or different forms. Each form is processed independently. Non-intrusive, can be used alongside FormBuilder's native rendering methods and does not modify core module behavior Perfect for forms embedded in popups and modals Does not conflict with styling and other JavaScript already in-place, only handles the form submission/response loop Automatically disables the `Submit` button on submission to prevent duplicate requests Provides the ability to add a custom 'spinner' shown when a form is being processed Gives you the ability to add additional HTML attributes to your FormBuilder <form> element. Add additional custom functionality using HTMX attributes, hook into form actions with your JavaScript, or even add AlpineJS directly to your forms. Compatible with FieldtypeFormSelect, let users choose which forms to embed, your code determines how they are rendered Uses HTMX, a stable, powerful, and tiny (14kb gzipped) library, installation documentation available here This module is BYOH (Bring Your Own HTMX) in that the HTMX library is not included or available within this module. This ensures long-term stability by not locking FormBuilderHtmx to external asset versioning. FormBuilderHtmx uses stable core HTMX features so use the library version that works for you and confidently add this module to both new, existing, and future ProcessWire applications. In some instances CSRF protection may need to be disabled to submit forms with this module. Just test your forms and you're good to go. Using this module is truly easy. <!-- Replace the native $forms->render() method with $htmxForms->render() --> <?php $htmxForm = $htmxForms->render('your_form_name') ?> <!-- Use native ProcessWire properties and methods as usual --> <?php echo $htmxForm->styles; echo $htmxForm->scripts; echo $htmxForm; ?> Presto. You can optionally include a helpful 'spinner' or activity animation that will be showed to users while their form request is being processed. Check out these ready-to-go examples you can use in your projects. <style> /* Add these styles to your CSS, the `.htmx-request` must be present as shown here. Be sure to include any CSS your 'spinner' may need, and style everything as desired */ .activity-indicator { display: none; } .htmx-request .activity-indicator, .htmx-request.activity-indicator { display: block; } </style> <!-- Optional second argument matches that of the $forms->render() method for pre-populated values The third argument is the CSS selector matching your 'spinner' element --> <?= $htmxForms->render('your_form_name', [], '#indicator-for-the-form') ?> <div id="indicator-for-the-form" class="activity-indicator"> <span class="spinner"></span> </div> Presto (again) Check out the documentation for detailed usage and other available features. Pull requests and issues filed on Github are welcome, or drop by here to get some help! Install as a ProcessWire module Install using Composer Download from the FormBuilderHtmx Github repository . Cheers!
    1 point
  3. Padloper 009 I am pleased to announce the release of Padloper 009! It has been a minute! I apologise for the delay. Padloper 009 introduces a number of new features, bug fixes (especially in Multilingual sites) and improves overall code efficiency. Credits Before I get into the details, I would like to say massive thanks for all who have contributed to this release in various ways. You have contacted me via the forums, via PM and via email to report bugs, test Padloper and suggest and sponsor new features. In particular, I would like to thank (in no specific order) @Spinbox, @alexm, @joe_g, @ank, @csaggo.com, @Jan Fromm, @Pete, @Sonia Margollé and @kalimati. Whilst I will not name those who contacted me privately, please accept my gratitude for your help. Apologies if I forgot to give anyone a mention! Massive thanks to @ryan for ProcessWire. Padloper 009 is the most battle-tested Padloper yet! It has been tested and developed on high volume sites, sites that require lots of customisations and multilingual sites whose default language is not English. This robust development has helped fix bugs that I would not have been aware of otherwise as well as new ideas and features to improve the API, workflow and GUI of Padloper. Many of the suggested features have made it into this version. A few others are planned for the future. There is a lot to talk about in this version. Below I’ll just give a summary of the changes and where necessary, create separate topics to discuss some of the new features. Although Padloper 009 has undergone thorough testing, there might, inevitably, be some bugs. If you find one, please let me know in the forums under a separate topic. Thanks! Changes Features Home Customisable dashboard. You can render your own dashboard by creating a template partial named ‘padloper-process-render-shop-home.php’ and placing it at ’/site/templates/padloper/backend/padloper-process-render-shop-home.php’. Please see this thread for more details. Orders Customisable single order view. You can render your own dashboard by creating a template partial named ‘padloper-process-render-orders.php’ and placing it at ’/site/templates/padloper/backend/padloper-process-render-orders.php’. Please see this thread for more details. Order status actions: Can be applied manually for order, payment and shipping status. Quick filters e.g. ‘open’, ‘cancelled’, ‘abandoned’, etc. Products Configurable pricing fields. Sales and Normal Price (e..g WooCommerce) vs Price and Compare Price (e.g. Shopify). Please see this topic for more details. Categories can optionally be named ‘Collections’. Configurable via ‘/admin/shop/configure-padloper/’. Bulk clone existing products. Allow duplicate titles for products. Discounts (new) 4 discount types: Orders, products, free shipping and BOGO (Buy One/Get One - unfinished; see below). Can be applied manually or automatically at checkout. Please see this thread for more details. Add/remove via ‘/admin/shop/configure-padloper/’. Part sponsored by Nifty Solutions. Thanks @Pete! Customers and Customer Groups (new) Customer creation and management. Please see this thread for more details. Customer Groups. This feature will be expanded in the future. Please see the above thread for more info. Add/remove via ‘/admin/shop/configure-padloper/’. General Settings Redone interface Add ‘from email’ settings.. Add bank details settings.. Add order ‘least and most’ sales thresholds for orders’ quick filters. Settings for ‘low stock’ and ‘price fields’ for products. Add tab ‘user interface’ with settings for shop navigation (can have side menu and/or dropdown navigation) and search features (can use quick filters and/or advanced filter). Other Backend Quick filters on various dashboards. Custom Dashboards for Home and Orders. More to be added in future. Frontend Custom shop root page. This allows you to move product-related pages and legal pages to live under a frontend-accessible page. Configurable via /admin/shop/configure-padloper/. Please see this topic for more details. For instance, /myshop/products/, /collections/, /products/, etc. This means you can directly access products on the frontend using their real paths/urls instead of using URL segments. This setting can be changed anytime via configuring Padloper at /admin/shop/configure-padloper/. Custom URL segments for checkout out. E.g. instead of /checkout/success/, /checkout/confirmation/, etc., you can have custom, multilingual segments, e.g. /checkout/order-success/, /checkout/tilaus-menestys/, etc. Miscellaneous Various UI improvements. Dashboards tables sorted by title by default. Breaking Changes Template partials for the frontend have been moved from /site/templates/padloper/ to /site/templates/padloper/frontend/. Deprecated ‘Search Feature’ on the home dashboard has been removed. Use ProcessWire in-built search instead. Padloper hooks into it to group padloper related results. PadloperProcessOrder::orderSaved now becomes PadloperProcessOrder::orderSavedHook.The new approach is to have all hooks in one please for easier maintenance and usage. Bug Fixes Please see the bug fixes topic. How to Get It Padloper 009 is available at https://processwireshop.pw/products/padloper/. For those renewing subscriptions, you will have to wait a bit, apologies. I am finalising work on renewal codes. I am hoping this will be ready by tomorrow. Any issues with the (revamped ?) site please let me know ?. Upgrading This is a major upgrade. Lots of code has been moved around. Best way to upgrade files is to empty the contents of the root Padloper folder and upload the contents of the new version there. There are no data model changes affecting existing features but as always, back up your site(s) first! Next Steps In addition to fixing any bugs that show in 009, these are the plans for the next 3-6 months, possibly more, in order of priority. No new features will be introduced until these are completed. Documentation Documentation will cover all topics including installation, backend and frontend use and the API. ‘How to guides’ will consist of short videos with corresponding textual content on a dedicated Padloper site. Discounts Finish work on the Buy One Get One (BOGO) Discount and automatic discounts. Gift Cards Finish work on Gift Cards. Road Map I will talk about this when the ‘next steps’ tasks have been completed. Thanks!
    1 point
  4. With the current project that I'm working on, there's eventually going to be an enormous amount of data to edit within it (in ProcessWire), and so I've been looking for ways to optimize and facilitate the editing experience. The goal is to save the people editing as much time as possible, and reduce the number of steps necessary to make common edits. This is what motivated the recent Table field updates. The is also what motivated a new module I'm working on called PageEditChildren. The PageEditChildren module takes the existing "Children" tab in ProcessWire's page editor and replaces it with a new one that lets you edit all of the child pages inline, directly from the parent page. For specific cases, such as the one shown in this video (below), this provides a more convenient way to edit multiple pages at once. It can significantly reduce the amount of back-and-forth between the page editor and the page list, or multiple page editors, keeping it all in one page editor session. Likely you would use this module to replace the "Children" tab on just some (not all) pages. Specifically, pages where the relationship between parent and children is one where they are often edited as a group. This is a fairly common use case in ProcessWire, and one where this module can save you a lot of time. From an editing standpoint, it has a lot in common with repeaters. Other modules that have some crossover are PageTable (core) when configured to create/edit children pages, and BatchChildEditor. Both use page editors in modal windows to accomplish editing children, a different approach than PageEditChildren, which keeps it all part of the single page editor. Though BatchChildEditor can edit title and status (hidden/unpublished) inline, and supports CSV export/import options, among other useful tools. All of these modules are worth consideration when there is a need to optimize the editing experience between parent and children. This is just an early preview of PageEditChildren, so I'm going to work on the module and test it out a bit more before releasing it. But it could be ready to share as soon as next week. Supporting file/image and repeater fields in this module required some minor core improvements, which are in this week's core updates. I'm interested to hear your thoughts on whether this would be useful in your sites as well? More next week. Thanks for reading and have a great weekend!
    1 point
  5. Apologies all! I did not keep my word! A number of things beyond my control happened but now I am back. Shop is open. I will post an update tomorrow about MM Next. Thanks.!
    1 point
  6. This is looking way better. The export works as expected again and the module is in the profile. Thanks, @FireWire!
    1 point
  7. Inspired by this thread with a little nugget based on AOS by @benbyf to visually distinguish development systems from production ones, I wrote a small module that does the same and lets you adapt colors and text. Link to the github repo: AdminDevModeColors Version 0.0.1 is still very alpha and only tested on PW 3.0.124. Description This module lets you change the color for the top toolbar and add a small piece of text for development systems, so you are immediately you aren't working on production (and vice versa). The adaptions are made through pure CSS and applied if either the "Enable DEV mode" checkbox in the module's configuration is checked or the property $config->devMode is set to true in site/config.php. Works with Default, Reno and Uikit admin themes (though probably needs a lot of testing with different versions still). Since a screenshot says more than thousand words... Production system (unchanged): Dev system (Default admin theme): Dev system (Reno admin theme): Dev system (Uikit admin theme): Feel free to leave any feedback here and report any problems either in this thread or the github issue tracker.
    1 point
  8. @wbmnfktr I think I have an idea of what happened. Possibly typed some || where some && should have been. Pushed a potential fix to the dev branch. Can you give it a shot and let me know if it fixes the issue?
    1 point
  9. Thanks very much for reply and I have to explain current situation more. I am sorry but mys system is in my language (Czech), but I think it is clearly visible in pictures how are fields and IDs. I have imported data from Access in form of CSV trable files. This import was done always from one table to one page to create lots of children pages. I could as ne example of data take table with one type contracts named "ks-hlavicka" which is table of contracts (chidren pages) and details (head of contract) and products table is named "ks-old-pol" (also children pages). Each of those tables have numeric field "id_hlavicka_ks" with label ID hlavičky KS or ID hl KS. Here are screenshots from admin (backend): Contract: Product item: As you could see there is same ID in both pages. This is actual current situation. There is not page reference field yet in those pages - I need to know how to prepare it to template for scripts or guides or by your advice... On Frontend I could use API of PW to show content by ID but I would like to have interconnected pages also visible in admin (backend). What I want is to achieve this - it is example of created contract on another page with products items linked in page reference field: Same functionality I would like to have same for product also with connected customers(also they have IDs) which are on contracts. But after I will have some script or guide to link products I think other connected data could be handled by same way. Here are screenshots of templates for contract (ks_hlavicka) and product item (ks_polozka_old): Does this helped to you to understand ? Let me know how you think is possible to make that interlinked connections. Thanks Pavel
    1 point
  10. @Marty Walker @Robin S @Mats Could you try the attached version of the module and see if it helps with your issues with Vimeo URL formats? Robin, Mats (I hope I got the right one), I've included you both as you have a similar issue open on the repo. TextformatterVideoEmbed.module
    1 point
  11. I have managed to save the charge id to the order. For this to work I needed to make captureOrder hookable. This is probably not the right way tough.. $wire->addHookAfter('PadloperProcessOrder::captureOrder', function(HookEvent $event) { $paymentIntent = $event->return; $orderId = $paymentIntent->metadata->reference_id; if ($paymentIntent && $paymentIntent->status === 'succeeded') { $chargeId = $paymentIntent->latest_charge; // Load the order page using the order ID and save the charge ID $orderPage = wire()->pages->get("template=padloper-order, id={$orderId}"); if ($orderPage->id) { $orderPage->of(false); $orderPage->set('stripe_charge_id', $chargeId); $orderPage->save(); } } });
    1 point
  12. @Entil`zhaand @wbmnfktr Thanks, confirmed that was the missing piece. Thanks for the details and much appreciated.
    1 point
  13. @kongondo Word up my good man! How is the next release coming? This is not a pressure question, just came to mind and thought I'd touch base.
    1 point
  14. @BitPoet Many thanks for this nice helper! Whats about a little enhancement like this? protected function getStyle() { $bgcolor = $this->bgColor; if($this->config->devModeBgColor) $bgcolor = $this->config->devModeBgColor; if(! $bgcolor) $bgcolor = 'rgb(153, 12, 94)'; $fgcolor = $this->fgColor; if($this->config->devModeFgColor) $fgcolor = $this->config->devModeFgColor; if(! $fgcolor) $fgcolor = 'rgb(255, 255, 255)'; $devstring = $this->devString; if($this->config->devModeDevString) $devstring = $this->config->devModeDevString; if(! $devstring) $devstring = 'DEV'; ...
    1 point
  15. Try: $mail = new \PHPMailer(); The backslash at the front tells it not to use the ProcessWire namespace
    1 point
×
×
  • Create New...