Jump to content

Leaderboard

Popular Content

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

  1. Hi @Autofahrn, thx for that suggestion. I did not try that. But I'm not sure how I should/could do that to get a helpful output? I've found the issue, but would still be interested in a way to show a backtrace of all executed hooks ? I've added a file_put_contents(... FILE_APPEND) to WireHooks::runHooks() to dump all executed hooks to a file called hooks.txt. That could be a first step in the direction that I wish would exist already. The issue in my case was that my CRM module was loaded twice, so all methods added via hooks actually ran twice. I found that by inspecting the debug mode tools, where my cloneInvoice() method showed up twice (and so did all other CRM hook methods). The solution was to make the module "singular" (and do a module refresh). But still I think it would be great to have a chronological list of all executed hooks so that one can instantly see which hook fired when (and after/before what other hooks).
    3 points
  2. You could edit the output in the template file and use the new $page->if() method. https://processwire.com/api/ref/page/if/ So there might be no real need in setting a real value. Add a note or description to tell and explain editors the field behaviour. You could define that default value somewhere in your config.php or even in a dedicated settings page to keep it editable - at least for superusers.
    2 points
  3. The image rendering engines have gotten a method / check if and which supports webp creation. I think you best drop an issue at pw github, so that ryan gets knowledge about it. If I find time I try to check this too.
    2 points
  4. if($config->ajax) { header('Content-Type: application/json'); echo $json; $this->halt(); // like die(); } else throw new Wire404Exception();
    2 points
  5. You mean like this? Seems you missed the eligibility screen ?. The GUI is not yet complete. The details are: Specific Groups of Customers New customers (have never bought something) Returning customers (have previously bought something) Abandoned checkouts Customers from own country (will probably change this to 'from specific countries') Newsletter (customers signed up to newsletter - this may not make it in the first release though + I haven't decided whether newsletter should be part of Padloper or not or third party, etc) Specific Customers Here you will select specific customers. These will have to be registered customers
    2 points
  6. If time to re-do branding is an issue I'm sure there are plenty of people here who would happily line up to help work on it a few free licenses, myself included.
    2 points
  7. Hey @kongondo, speaking of classnames, has there been any thought of rebranding to something more accessible for people outside the PW community, like eg Procommerce or Commercewire ?? Just feel like the name was always pretty random and doesn't really seem to have any particular meaning – worlds smallest turtle? – or evoke feelings of a power and capability.
    2 points
  8. SnipWire - Snipcart integration for ProcessWire Snipcart is a powerful 3rd party, developer-first HTML/JavaScript shopping cart platform. SnipWire is the missing link between Snipcart and the content management framework ProcessWire. With SnipWire, you can quickly turn any ProcessWire site into a Snipcart online shop. The SnipWire plugin helps you to get your store up and running in no time. Detailed knowledge of the Snipcart system is not required. SnipWire is free and open source licensed under Mozilla Public License 2.0! A lot of work and effort has gone into development. It would be nice if you could donate an amount to support further development: Status update links (inside this thread) for SnipWire development 2020-07-03 -- SnipWire 0.8.7 (beta) released! Fixes some small bugs and adds an indicator for TEST mode 2020-04-06 -- SnipWire 0.8.6 (beta) released! Adds support for Snipcart subscriptions and also fixes some problems 2020-03-21 -- SnipWire 0.8.5 (beta) released! Improves SnipWires webhooks interface and provides some other fixes and additions 2020-03-03 -- SnipWire 0.8.4 (beta) released! Improves compatibility for Windows based Systems. 2020-03-01 -- SnipWire 0.8.3 (beta) released! The installation and uninstallation process has been heavily revised. 2020-02-08 -- SnipWire 0.8.2 (beta) released! Added a feature to change the cart and catalogue currency by GET, POST or SESSION param 2020-02-03 -- SnipWire 0.8.1 (beta) released! All custom classes moved into their own namespaces. 2020-02-01 -- SnipWire is now available via ProcessWire's module directory! 2020-01-30 -- SnipWire 0.8.0 (beta) first public release! (module just submitted to the PW modules directory) 2020-01-28 -- added Custom Order Fields feature (first SnipWire release version is near!) 2020-01-21 -- Snipcart v3 - when will the new cart system be implemented? 2020-01-19 -- integrated taxes provider finished (+ very flexible shipping taxes handling) 2020-01-14 -- new date range picker, discount editor, order notifiactions, order statuses, and more ... 2019-11-15 -- orders filter, order details, download + resend invoices, refunds 2019-10-18 -- list filters, REST API improvements, new docs platform, and more ... 2019-08-08 -- dashboard interface, currency selector, managing Orders, Customers and Products, Added a WireTabs, refinded caching behavior 2019-06-15 -- taxes provider, shop templates update, multiCURL implementation, and more ... 2019-06-02 -- FieldtypeSnipWireTaxSelector 2019-05-25 -- SnipWire will be free and open source Plugin Key Features Fast and simple store setup Full integration of the Snipcart dashboard into the ProcessWire backend (no need to leave the ProcessWire admin area) Browse and manage orders, customers, discounts, abandoned carts, and more Multi currency support Custom order and cart fields Process refunds and send customer notifications from within the ProcessWire backend Process Abandoned Carts + sending messages to customers from within the ProcessWire backend Complete Snipcart webhooks integration (all events are hookable via ProcessWire hooks) Integrated taxes provider (which is more flexible then Snipcart own provider) Useful Links SnipWire in PW modules directory SnipWire Docs (please note that the documentation is a work in progress) SnipWire @GitHub (feature requests and suggestions for improvement are welcome - I also accept pull requests) Snipcart Website ---- INITIAL POST FROM 2019-05-25 ----
    1 point
  9. This week I’m happy to report we now have WEBP support in ProcessWire thanks to a GitHub pull request from Horst Nogajski. This enables you to have highly optimized image output in PW and I think you’ll really like the difference it makes. Read on for all the details… https://processwire.com/blog/posts/webp-images-in-pw/
    1 point
  10. Here's an example... The page structure: Some pet species have breed child pages and some do not. The selector string for selectable pages for the breed field is "parent=page.species". In ready.php: $wire->addHookAfter('ProcessPageEdit::buildForm', function(HookEvent $event) { /* @var InputfieldForm $form */ $form = $event->return; $breed_field = $form->getChildByName('breed'); if(!$breed_field) return; $species_with_breeds = $event->wire('pages')->find('parent=/selects/pets/, children.count>0'); $breed_field->showIf = 'species=' . $species_with_breeds->implode('|', 'id'); });
    1 point
  11. Ok... well... that's kind of easy as well - or it should be at least for you. As you used Bitnami there should be a dedicated Bitname folder somewhere now. C:\Bitnami User>Bitnami Something like that I guess - I'm not sure as I don't use Bitnami. But... within that default Bitnami project (ProcessWire) folder you will find a folder called site and within that a folder called templates. So... it might be C:\Bitnami\Processwire\site\templates
    1 point
  12. @3fingers Having said all the above, maybe it is easiest to just disable the tag you are having trouble with and add it manually? Or for that template render out each one individually and build the image tag yourself. This is Processwire’s only issue, for every problem there are a million solutions!!!!
    1 point
  13. Sure. Of course the backtrace only helps if you see a function get called (maybe unexpected or with bad parameters) and want know where this call originates from. This, for sure, is not a history log and not an alternative to the proposed hook log.
    1 point
  14. Thx @Autofahrn, but my quick test was at first glance nice, but it seems it is not 100% what I want... I put this hook in ready.php $this->addHookBefore("ProcessPageView::finished", function() { bdb(debug_backtrace(), 'finished'); }); This looked ok, but then I cloned my site and the "coneInvoide()" method did not show up in the backtrace. I did a debug_backtrace() in that method and - of course - it showed up there and showed a somewhat helpful dump. BUT: The problem is, that often I don't know what is going on where, so you can't just place a debug_backtrace() somewhere in the code, because you simply don't know where you'd have to put it. Do you know what I mean? Maybe I have to give xdebug another try...
    1 point
  15. Hi,@kongondo the screen look amazing!! I see there are a lot of possibility to trigger the discount code. I don't know if you have already thought about this, but could be a very useful and beautiful option to be able to create discounts dedicated to specific users. The best if it is possible to give it to those who do certain actions, like make a purchase, sign up for the newsletter or have an abandoned cart. What you think? or just a persona code with expiration date and all the other option.
    1 point
  16. At least it would tell you, from where your hook was called. For example, if its a pageSave hook, you'll see who is actually invoking $page->save. In this case you probably had seen, that the hook was invoked twice from the same originator. If that was a technical question, you'll either do this, to get a preformatted trace of the stack (not sure why I needed DEBUG_BACKTRACE_IGNORE_ARGS in my quick test): ob_start(); debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); $preformattedCallStack = '<pre>' . ob_get_clean() . '</pre>'; Or dump the full trace data array using tracy: bd(debug_backtrace());
    1 point
  17. Yes, I completely agree with that and wanted to bring it up. Especially in the backend when previously we got "Padloper Orders" and "Padloper Reports" etc… It feels much more integrated when you look at something like "Craft Commerce" or "Perch Shop"
    1 point
  18. @kongondo .. I'm Totally Amazed (You Are Super Awesome). Just wondering about "Back-end Notifications" in the UI, I don't see it in the demo you made! where are they? ?
    1 point
  19. There will definitely be conflicts, I am afraid. For instance, the module Padloper.module in Padloper 1 vs Padloper 2 are two different things + ProcessWire/PHP won't allow two classes with identical names . Do you have a specific need to run both the old and new versions?
    1 point
  20. There's also an AOS checkbox for that: Add new page: uncheck Active? for non-default language names: the state of a page on non-default languages can be set to inactive here when adding a new page. https://github.com/rolandtoth/AdminOnSteroids/wiki/Misc
    1 point
  21. Did you try debug_print_backtrace? https://www.php.net/manual/en/function.debug-print-backtrace.php Maybe there's a Tracy entrypoint to get this logged properly.
    1 point
  22. @ryan thank you very much for all the additions you implemented in such a short time on top of my github pullrequest. It seems that there currently nothing is left in regard of webp support in ProcessWire. But I already have one or two points for future updates to the image rendering engines, that should be implemented when all browsers will support webp and we don't need fallback jpegs or pngs anymore. ?
    1 point
  23. It doesn't seem like this is necessary anymore - not sure if the change happened on this update: https://processwire.com/blog/posts/processwire-3.0.107-core-updates/
    1 point
  24. I am not the right person to really comment on this given that the only abilities I have in a second language is a smattering of travel Spanish, but this does seem pretty cool and makes you sound a lot less silly ? DeepL Google So, a DeepL module sounds like a pretty cool idea to me.
    1 point
  25. Hello @Missariella, however, I am using the latest dev version (3.0.76) and its working. First of all I recommend you to create a global translation piece of code. Put it somewhere in a file that is loaded everytime (fe. a function.php), so the translation code will be availiable everywhere. You can put it also in the template file where you want to output the select options, but loading it in general makes more sense in this case, because you can use it in other templates too. Here is the code: //get labels, title, values and descriptions in different languages if ($user->language->name != 'default') { $title = "title{$user->language}"; $value = "value{$user->language}"; $label = "label{$user->language}"; $description = "description{$user->language}"; $notes = "notes{$user->language}"; } else { $title = 'title'; $value = 'value'; $label = 'label'; $description = 'description'; $notes = 'notes'; } This little code snippet makes titles, values, labels, descriptions and notes available in all languages by only calling "$title" instead of "title" (or "$label" instead of "label" and so on...). So it makes your life much easier Afterwards creating a multilanguage select can be done like this: $options = $fieldtypes->get('FieldtypeOptions')->getOptions($fields->get('YOURFIELDNAME')); foreach ($options as $value) { echo $value->$title; echo $value->$label; echo $value->$description; } This outputs title, label and description in the user language. This is the code that I am using on my projects without any problems.
    1 point
  26. the solution provided here did not work for me! i'm using pw 3.0.36 and this worked and is even easier $fg = new Fieldgroup(); $fg->name = 'rocksvns'; $fg->add($this->fields->get('title')); $fg->add($this->fields->get('rocksvn_version')); $fg->save(); // set version field visible for this template $fg->setFieldContextArray($this->fields->get('rocksvn_version')->id, array( 'collapsed' => 0, )); $fg->saveContext(); $t = new Template(); $t->name = 'rocksvns'; $t->fieldgroup = $fg; $t->save(); tracy helped a lot here again
    1 point
  27. See the cheatsheet documentation at http://cheatsheet.processwire.com/ and click the "advanced" button, then click "WireArray/PageArray". All the methods for WireArray are at your disposal for this. Specifically the section on "Setting/Modifying Items" is probably the most helpful. A WireArray only carries one of each item, so if you add/insert/etc. an item that's already present, it'll move it in the array rather than add another copy.
    1 point
×
×
  • Create New...