Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=64049
  2. RT @teppokoivula: It’s Saturday and ProcessWire weekly #6 is out. Check it out at http://t.co/s3qyEpBt28 #processwire #cms

  3. At what value is "Any"? If it's empty then "/contract/" does exist.
  4. Depends what field "image" is really. If it's single image field your code would be fine. If it allows more than 1 image it will be a WireArray, and your code would fail. Then you'd need to treat it as such using if($product->image->count){ ... } Then you'd access images in the array using a foreach loop, or with one of the array functions $product->image->first()->url or $product->image->eq(n)->url If that's the case you might want to set "image" to allow only 1 image (as the name suggests) ,then your code would work and be consistent with the naming. After all I could have also linked to the other 1'000'000 threads about this very same image field problem everybody has. But maybe it's just enough to link to the documentation which explains this again. https://processwire.com/api/fieldtypes/images/
  5. Do those pages have the language really active?
  6. better count than find if($pages->count("/contract/")){ // exists } with find() it would be slightly less efficient if($pages->find("/contract/")->count){ // exists } Or get() will return a NullPage object if not found if(!pages->get("/contract/") instanceof NullPage){ // exists }
  7. RT @nelsonmendes: My first @processwire module/plugin: Backup and serve asset files via Amazon S3 / Cloudfront: https://t.co/EvICLTAlJV #p

  8. After all there's some quirks and stuff not coded very well. I have forked the shop module some time ago and fixed/changed minor things. I'm not sure what causing your error exactly, but seems as the session sometimes isn't set correct when the form wasn't valid or so. You could try my version of the shop module, it's the dev version that has some changes there. https://github.com/somatonic/Shop-for-ProcessWire/tree/dev Although there's more changes and additions in this version, but should be compatible and not less unstable than the apeisa version.
  9. The payment module is stored in session , so there might be an issue on your side. I use the shop in many projects and never had an issue with that.
  10. This works just fine when used without roles=rolename. There seems to be an issue for the matches when roles selector with names are used, use role ID instead.
  11. No there is no official topic, though there was one started long time ago but can't find. Also it's pretty much a "beta" WIP. Anyway you may consider also adding an issue on github since there's an official repository.. https://github.com/apeisa/Shop-for-ProcessWire/issues?page=1&state=open Looks like you have a problem with Payment module, have you any installed? The error does indicate there's not payment module.
  12. Yes agree. It's a lot easier to pull off with pages. I'm not sure about best practice here. Pages of course seems like a good option.
  13. It doesn't have to be a db table. Modules have already a config interface you could use. No problem if you don't.
  14. Also as long as a template or field is in use you can't delete it anyway.
  15. I know what it does. Just is it really required to to use template and fields for such a config?
  16. RT @yellowled: Belegexemplar, leicht verspätet. Mit einem ProcessWire-Artikel von mir. Jetzt im Handel. http://t.co/PJcwfiOT3B

  17. @pierre-luc, there's no reason/need to make fields and template system flag. Edit: Technically you don't need to "Process implements Module", abstract Process already implements Module.
  18. Try maybe $pages->of(false) Although I would have guessed in a module usually output formatting isn't on at all, only in templates.
  19. Maybe some hooks could be around fields or forms, Inputfield::render() Fieldtype::wakeupValue() ProcessPageEdit::buildForm() I'm not sure.
  20. I may responded too soon without reading carefully on mobile (not seeing screenshot). But there's a template setting only when the children template in family setting is selected. http://processwire.com/api/modules/process-template/ I'm not sure how to archive something you outlined for fields or what the exact need here for this is. But then I'm not sure there's already similar modules, though maybe not on different fields for different templates.
  21. This is in core. You can skip add page process and have name given automatic.
  22. I don't know how much it matter, I do a redirect 301 and it works fine.
  23. One way is to well redirect to another page that is only a text page instead after sending email... // if no errors, email the form results if(!$error) { $msg = "Full name: $form[fullname]\n" . "Email: $form[email]\n" . "Comments: $form[comments]"; mail($emailTo, "Contact Form", $message, "From: $form[email]"); $session->redirect("/some/thankyoupage/"); // populate body with success message, or pull it from another PW field // $page->body = "<h2>Thank you, your message has been sent.</h2>"; // $sent = true; }
  24. It's called PRG design pattern: http://en.wikipedia.org/wiki/Post/Redirect/Get You could for example redirect to another "Thank you" page after success.
  25. Just found how to reproduce it. When I enter some special chars like "éààéé" as the username... I think I need some more validation/sanitizing for that.
×
×
  • Create New...