Jump to content

d'Hinnisdaël

Members
  • Posts

    244
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by d'Hinnisdaël

  1. I think there will be cases where custom fields will differ by product template, so the order might not be guaranteed and it's probably better to name them after their content (custom_field_size instead of custom_field_1). But how do you determine the option n° for Snipcart — if you move around the field in the template, should it keep its ID to keep order records consistent, or does that not matter as long as it's named properly? That's what I've done in the past: create an order template with fields that I map to custom options. Also good to have the consent text editable by site editors.
  2. Sounds reasonable. They kind of jumped the gun for marketing reasons there; not a fan of how it was rolled out. How does a production shop even work without analytics and inventory management? You don't happen to be in contact with them regarding ETAs on those features? I found it hard to get reliable answers even though wish I could switch my sites to their Vue cart layouts and ditch jQuery once and for all ?
  3. This looks amazing, thanks for your effort and your transparency in developing this module. Please make it very obvious how to donate or contribute to the project in whatever way is helpful ?
  4. Very nice! Love the idea. I'd like to try this out, but I think this will only make sense for production environments if the static copy is completely self-contained, i.e. including paginated pages, assets, etc. You could probably easily do that using wget and some command line magic. Your module would then make the whole process configurable and user-friendly, e.g. to run it via cron, via hook after page save, etc. Example gist: Download an entire website with wget, along with assets
  5. Seems like the _() function encodes entities only on multi-language installs. I have a working fix for this, but it's not yet on GitHub. I'll throw it in with the next release ?
  6. I'm using the standard AdminThemeFramework::getUserNavArray hook. Looks like that's a newer addition and not available on default. Any particular reason you're still using the default theme? I switched all of my client sites over to UiKit and I don't regret it. The old one looks so... old.
  7. @matjazp I added fixes for both issues you're describing. Check out the latest commit on the develop branch. These will be part of the next release.
  8. Thanks for taking the time and splitting this up ☃️ Much appreciated. I'll try this out with my next project where it'll come in really handy.
  9. @zoeck Slow day in the office — I added the editMode and viewMode options to the PageList panel as well. See the latest release. $panels->add([ 'panel' => 'page-list', 'title' => 'Information', 'data' => [ 'parent' => 'template=basic-page, name=info', 'editMode' => 'modal', 'viewMode' => 'blank', ], ]);
  10. You're right of course ? I have a custom panel that already includes the modal script, so I never noticed. I pushed a fix that should work. Thanks for debugging!
  11. Quick question: will this module work as intended if you turn off output formatting? I really like the sub-selector functionality like date.year=2019, but won't need the subfields like $page->date->year since I use Carbon for date fields in my frontend. Or are these two dependant on each other in any way?
  12. Strange. I added that to the module itself and it only worked for me after I added it: protected function includeModalScripts() { $this->modules->get('JqueryUI')->use('modal'); } /* And then later */ if ($modal) { $this->includeModalScripts(); $button->class .= ' pw-modal pw-modal-large'; }
  13. @gmclelland I can see this getting a bit out of hand with a CMF like ProcessWire that doesn't set any boundaries on the shape content can take. The most versatile solution would be to create an at-a-glance panel, but to rely on the programmer to supply the counts that are relevant to their site. I can see the template and role counts working the way you suggested. Still, not all templates are meaningful units of content, e.g. a `country` template for populating forms is really not that interesting to site editors. The role naming / pluralization would only work in English here (e.g. vendor becomes Vendors), so there'd need to be a way of naming them in other languages. The documents and images are a bit more complicated, however. ProcessWire doesn't have a central media or file library to get a count from. So you need to run a cronjob to scan the site for images across all pages. You'd also need to figure out which images are meaningful content (photos) and which are e.g. system-created QR codes for event invitations. How do you count videos? I have a file field called videos, and a repeater field with a video_url field. There's no way of counting that without doing it yourself. Don't get me wrong, I like the idea, but I don't think automating it is feasible or the right solution in ProcessWire. I'll be happy to be convinced otherwise ?
  14. @Jens Martsch - dotnetic @Macrura Adding multiple panels via $panels->add([]) should work now.
  15. @Jens Martsch - dotnetic @Macrura Come to think of it, I could check if the config array has numerical keys, and in that case treat them as an array of configs.
  16. @Jens Martsch - dotnetic @Macrura Correct. The problem here is that the config object is an array, and the outer array is also an array. There's no way of telling if it's a config array or a collection of config arrays without it getting ugly. Luckily, WireArray has an import() method for that exact purpose. I added a release on GitHub that supports adding an array of panels via $panels->import([]);
  17. I'm planning on revamping the documentation at some point — split it into sub-pages and make it more navigable. Next on the list is an example section with code snippets for all panels, as you suggested.
  18. @gmclelland There's a few good ideas in there! I do have an at-a-glance/counter panel on the roadmap, but I'm not sure how to exactly build that since ProcessWire — as opposed to Wordpress — doesn't have any pre-configured content types, so I would have to make it a bit more configurable. I also like the idea of having different tabs, although it's not a requirement I see many pages having. It should be relatively simple to implement, though (apart from the permissions stuff).
  19. I could make that a bit more obvious in the documentation ?
  20. @zoeck I implemented modal editing for the collection panels. See the latest release. You can set the mode to modal or blank for edit or view links. The modal auto-closes on page save and the panel reloads via AJAX when an edit modal closes. /* Open edit links in modal, view links in new tab */ $panels->add([ 'panel' => 'collection', 'data' => [ 'editMode' => 'modal', 'viewMode' => 'blank', ], ]);
  21. What you said: closing the modal on save is a requirement for me. I'll have to have a look at how the core does it in the template field editor, for example. I was looking into having the PageList links open in a modal as well, but that can be a later release as well.
  22. @zoeck Ok, thanks, in that case I'll need to test the module in multi-language environments. The modal editing of collection links is work in progress, but it's not as straight-forward as I hoped it would be ⚙️
  23. @zoeck That error means one of the panel modules is loaded before the base class. This shouldn't be an issue anymore since I raised the main module's autoload priority. I made a note try out the web installer soon. The empty dashboard message looks fine here, rendered as a link. Does the dashboard itself render correctly once you configure the panels? The template file doesn't escape any of the output values, so I'm a bit confused as to why this could be. Do you have any modules installed that might overwrite or change the _() function of ProcessWire in any way?
  24. @dragan I want to detect whenever $user->language is changed during runtime, i.e. any changes after startup, including all related API calls like $languages->setLanguage(). I need to change the locale setting of the library I'm using for displaying dates in the frontend and would like to cover the scenario of dynamically setting the language for output purposes.
  25. I need to run code each time the user's language is changed. What's the best way to go about that? Reading the source code, I found documentation on a hook called Languages::languageChanged, but it doesn't exist and is never called. Maybe @ryan knows if the hook does indeed exist and I'm just doing it wrong? Ideally, this would work: wire()->addHookAfter('Languages::languageChanged', function (HookEvent $event) { $newLanguage = $event->arguments(1); Carbon::setLocale($newLanguage->locale) }); Maybe there's a better way of doing that?
×
×
  • Create New...