Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/03/2023 in all areas

  1. ProcessWire 3.0.219 on the dev branch focuses primarily on a major overhaul to the core $modules system. The Modules class had grown into more than 5000 lines of code — all related to modules, but with lots of different areas of focus within that. It had become a little bit messy, fragile and hard to maintain at that size. I've had @todo notes in the class to "clean it up" for quite awhile, but this week I finally got to it. The approach is similar to that of our $pages API (Pages class), which is split into separate classes for page finding, loading, editing, caching, etc. The Modules class has been split into several much more focused classes for module information, installers, loaders, files, flags, duplicates, and configurations. This leaves the main Modules class as the gatekeeper, making it less fragile and easier to maintain. If this overhaul was perfect, you shouldn't notice any difference, and the public $modules API remains as before. But with such significant overhaul that took a full week to complete, there's also an increased potential for temporary errors, so please let me know if you encounter any. Thanks for reading and have a great weekend!
    8 points
  2. Support thread for the PageEditRestore module. This module helps to prevent page edits in the admin from getting lost when the user’s session is lost. Blog post about Page Edit Restore Module directory page GitHub page
    1 point
  3. Hey @kongondo hope all is well. Here's a little feature request that I think may tie in nicely, especially for those using PaymentInvoice as an option. A fieldset for Bank Account Details that would store Bank Name, Sort Code and Account Number. This could then be automatically displayed on invoices, which is more or less a necessity to have on invoice if you are offering people to check out using Invoice as the payment option. ??
    1 point
  4. I would like to add extra fields to the customer form fields next to the default ones specified in https://docs.kongondo.com/start/checkout/custom-customer-form.html while checking out. In this particular instance I would like to add a checkbox for newsletter signup, which I would like to process after submitting or on next page of checkout. I've tried to add a field to custom_form_fields, however I don't seem to get the desired value (from $padloper->getOrderCustomer()). Is this possible and how would I handle this?
    1 point
  5. Hi @Spinbox, Please see the example in demo-2 of the Padloper 2 Starter Site repository. This is for when you want to save the extra form inputs at the checkout form stage. In summary: Add your extra fields to your checkout form In ready.php use a hook to listen to PadloperProcessOrder::orderSaved as shown here in demo-2. In the hook function, process the newsletter signup checkbox. It should be in $input->post('name_of_your_checkbox') Save that to your backend field where you are saving customer signups. In this hook you have access to $orderPage. This will give you access to $orderPage->padloper_order_customer. You can grab the customer details from there if you need them for your signup. Given that you might have repeat customers, you might not want to save the customer signup details with the order itself since this will mean saving the same information with each order for this one customer. Secondly, you might want to check if the current customer has already signed up for the newsletter. You can do this in the checkout form using htmx (ajax). I.e, after they enter an email address, htmx sends ajax request to your server. In the backend you check your signup records. If customer already signed up, do nothing. Else send back html with checkbox markup for htmx to insert in your checkout form. If you instead want to do the signup request in the next step when collecting payment, let me know and I'll tell you where to hook. This only works for the current order in the session and only for the customer details that Padloper knows about, i.e. not your custom ones.
    1 point
  6. I'll see if I can include his in the next version of Media Manager. My current thinking is that I'd add an extra column/subfield to FieldtypeMediaManager.
    1 point
  7. @kongondo I have some images that use a different caption depending on the page they appear on. Can you think of a solution for this? EDIT: I was thinking, in order to accomplish this, maybe I can add a text field next to the image that I want to use that, if populated, would override the image caption. But, since I use many images on one page, I would need to have a text field like that on the page template the image appears on (not on the media-manager-image template), and also one for each image to make this work, thus also need multiple media manager image fields on one page. Therefore, here's my other question: Would it be possible to use a media manager image field inside a repeater field or repeater matrix field?
    1 point
  8. @horstThanks for the tutorial. Still useful for newbies like me. Now I have a German backend too, great!
    1 point
  9. To get the options title in current user language use $type_material->getTitle(); or enable outputformatting $type_material->of(true); $type_material->get('title');
    1 point
×
×
  • Create New...