Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/03/2022 in all areas

  1. This thread is intended to be a collection of useful tips and tricks when developing PW sites using the awesome DDEV development environment. First tip (and only issue I've had since almost a year) is how to prevent an endless redirect loop when using "force HTTPS" in htaccess: https://github.com/processwire/processwire-requests/issues/452
    1 point
  2. This week I've been working on something a little different: developing a new site profile in ProcessWire. Actually, I should probably call it an application profile rather than a site profile, as it's not a website profile. Instead it's a profile for an invoicing application in ProcessWire. Though you would install and run it on a web server, but it would be an independent application rather than part of a website... perhaps something you run in a subdirectory, subdomain, or even localhost. This is something I've been wanting to build for awhile—ever since the invoice service I use raised their rates beyond my budget. So I thought I'd build a replacement that I could use, as well as share for others that might have a similar need. I think it might also be a pretty decent PW profile example in general, too. I'd originally considered building it as a Process module but decided not to for a few reasons. Though the biggest one is that a site profile enables the greatest potential for customization and expansion according to each person's needs. Since you can expand upon it by adding your own fields and templates, or editing existing ones, most can really tailor it to their own needs a lot more easily than they could if it were a Process module. Likewise, since the actual invoices (and invoice emails) are rendered from front-end pages, you can customize the look and feel of them to match your brand very easily. (This is something I always wished I could do with the invoice service I've been using previously) This invoice profile requires nothing other than the ProcessWire core. It has no 3rd party or Pro module dependencies. I've got it largely functional at this stage, though will be putting a couple more weeks work into it before releasing it. I'd like to build in the option for clients to pay an invoice with a credit card (via Stripe) for instance. Below are a few screenshots of the work in progress. First is the page-list which shows the current invoices in the system and their status. (click image to view larger) As you can see, there are also pages for Clients and Settings. The client pages contain all the information about each client that invoices can be created for. The Settings page is where you can edit your own company information, logo and billing preferences. Next is the invoice editor. Here we have a repeater for each line item in the invoice. We also have a repeater for payments. All of the totals add up automatically as you type (Javascript added via hooks). They are also calculated automatically at the server side, so that everything stays consistent whether working with the API or in the page editor. (click image to view larger) At the bottom of the invoice editor you'll see a collapsed input for "Invoice action". This is where you can select actions to apply to the invoice. The two we currently have are "Email invoice to client" and "Email invoice to another address". Next up is what we see when viewing the invoice on the front-end. This is just the output of a template file but it is optimized for printing, saving to PDF and sending through email. I've kept it intentionally simple but of course the logo would be replaced with your own and all markup/styles are fully under your control. (click image to view larger) What I plan to add next are payment options, enabling a client to pay by credit card right from the invoice URL or email. What do you think, is this type of PW profile useful to you or someone you know? I've initially built it towards my own client invoicing needs, but I'm curious what other features you would like it to have? Or do you think it's better to keep it simple so that people can more easily take it in different directions? Thanks for your feedback. Have a great weekend!
    1 point
  3. Hi @adrian. Thanks for your help. My customer is using the module to privatize page by page instead of folder or tree. Then for the empty config, I will check with a fake module to view the result. I will keep you informed in this thread.
    1 point
  4. The extension look cool and will install it on Windows, but its not available for Chrome iOS :(
    1 point
  5. Well, late to the party, having been a long-time user of devilbox for local docker-based development. However, the need to support distinct per-project tech stack differences has forced a move away from devilbox to ddev and, apart from the need to make a few local .env changes, it's working out really well so far. Highly recommend it if you haven't tried it out yet.
    1 point
  6. I've been successfully using Dark Reader for years, with these settings (Filter+ is need for my Mac so that coping text still results in the original colors, not the changed ones of the view):
    1 point
  7. I also moved away from Freshbooks. They trippled their fee (was on a grandfathered plan) and their support when extracting and closing my account was a nightmare! (They sent my entire backup to someone else and didn't close my account properly, so clients were getting 2 lots of invoices from me!) I'm glad I built a new more customised system suited to how I process things for my business using PW. The amazing thing is, when I look back at it... it took me only about 1 full week to migrate and get going thanks to how easy it was using PW ? It now takes care of invoicing clients, online payments using form builder, PDF tax reports and expenses, multiple business setup (wife sells magazines and books), invoice activity/history. Will be interested to see how some things are done with this invoicing profile to improve on my setup. Well done @ryan.
    1 point
  8. MagicPages (eg HomePage.php) do now also load the related CSS and JS files (eg HomePage.js and HomePage.css) in the backend page editor ? And there is a new WIKI page about MagicPages: https://github.com/baumrock/RockMigrations/wiki/MagicPages Magic Assets If your page is a MagicPage it will load YourPage.css and YourPage.js files automatically in the PW backend when editing any page of type YourPage. Example: // /site/classes/HomePage.php // /site/classes/HomePage.css div { outline: 2px solid red; } // /site/classes/HomePage.js alert('You are editing the HomePage');
    1 point
  9. Hi @bilioso You need to set it in the image field setting. You can find the setting in the "Input" tab. Gideon
    1 point
  10. I have created an alias command to get the same settings for all my projects ? alias ddc='ddev config --php-version "8.1" --database "mysql:8.0" --webserver-type "apache-fpm"' So for me its this: ddc --> setup a new ddev project git init --> initialise a new git repo git clone git@github.com:baumrock/RockShell.git cd RockShell php rockshell pw-install I should maybe create an alias for that too ?
    1 point
  11. What would really be great is a tutorial on how to set up a project in DDEV, something I'm trying to figure out right now ? Edit: Spoke too soon. This is so easy it sounds like a lie. `ddev config` - Choose PHP project `git clone https://github.com/processwire/processwire.git web` - Downloads PW into the 'web' directory `ddev launch` - Go through the config, enter db, db, db, db in the database step Done
    1 point
  12. Hi everyone, I'm happy to present my latest project, which is a collection of guides and tutorials for web development with ProcessWire written by me. https://processwire.dev/ What is this? I have written several tutorials in this forum, and I wanted a central place to collect all my tutorials and put them in a logical order. processwire.dev is exactly that, a curated list of tutorials for different topics related to ProcessWire development. I have revised, updated and expanded most of my existing tutorials. There are also some completely new tutorials. Notable topics How to integrate Composer in your ProcessWire sites, and a general explainer for namespaces and autoloading. A two-part guide to using Twig with ProcessWire and adding custom functionality. How to create flexible content modules with Repeater Matrix fields and Twig. A general guide to performance optimization for ProcessWire. A starter guide for the "ProcessWire mindset" - how to structure your content. ... and much more! What's next? I hope this will be a useful resource to all of you fine people. Please note that these tutorials are very much opinionated, and they reflect my personal experience and development practices. So if you disagree with some of my conclusions, that's perfectly fine! I'm happy to discuss all my recommendations and approaches with you, so let me know if you have any feedback, suggestions or error corrections! I plan to expand this resource over time and already have some new topics planned. If you have suggestions for new topics, go ahead and post them here as well! Start reading now: processwire.dev
    1 point
  13. No, it does prevent a bunch of downstream hooks from firing, but specifically it doesn't include Pages::save and Pages::saveField (and I think it should include those methods). And to avoid confusion it would be good if the documentation explained exactly which hookable methods are affected by the noHooks option when it used in any of Page:save(), Pages::save() and Pages::saveField(). I've opened a GitHub issue so that Ryan is more likely to notice the problem and our discussion of it: https://github.com/processwire/processwire-issues/issues/1405
    1 point
×
×
  • Create New...