Jump to content

cst989

Members
  • Posts

    134
  • Joined

  • Last visited

Everything posted by cst989

  1. I worked it out while putting the code in this post and trying to remove parts til it works. I had part of my filter like this if(isset($request)) { $filter .= 'price>=".(int) $request['min'].', price<='.(int) $request['max'].', beds>='.(int) $request['beds'].', property_type='.(int) $request['property_type']; } As it turns out, you can't put line breaks in your filter like this! They obviously didn't show up in var_dump or the browser when echoed, so I missed this.
  2. Ok so this is a bit odd, I have actually been doing this: $properties = $pages->find("$filter"); Which is not filtering results properly. However, if I echo out $filter then manually paste the result into the find instead (so it looks more like my example in the first post), it works...?? If I var_dump $filter, it's just a string... I have tried it with and without quotes
  3. Sorry yes, it's not that removing price<=99999.. changes the result, but that nothing changes the result except that Like you say, I am returning all properties, including type 1, type 3, blank type etc., when it should only be type 2. The limit isn't even working, it's returning all 10 properties.
  4. Can anyone tell me why I get all results from the selected template on this search, only the max price (price<=999999) changes the number of results returned. Otherwise, all properties are returned despite there being lots of different values I'm sure its something really simple $pages->find("template=property,start=0,price>=0, price<=9999999, beds>=1, property_type=2,limit=3,sort=created")
  5. As always I work this out after 30 mins of trying, but always 2 mins after posting on a forum ? It was because the field type must be float decimal, (see below!). Funnily enough it works fine if it's Text, until you hit a negative number. I will leave this up for anyone who makes the same mistake as me.
  6. Hello I'm having an issue with filtering on a negative longitude value. My search filter looks like this (decimal places have been shortened for the example) $pages->find("template=skyscraper,longitude>=-0.1011,longitude<=0.0708,limit=10,sort=created"); Now lets say I have two pages, one has a longitude of 0.05, this one is found. Another has a longitude of -0.05, this one is not found, even though -0.05 is still greater than -0.1011...
  7. Are there any plans to officially make this compatible with 3.x? At the moment there's quite a few issues. When editing the field itself, it constantly says error geocoding address. In a page containing the field in the CMS it says the same on save, and it also says "REQUEST DENIED" under the map on load. To actually place a pin requires searching and then focusing off the box, pressing return will save the page but not update the marker.
  8. Actually when I got access to the subforum for it, the latest version from there (but not the one emailed to me when I purchased) has a module for discount codes. It is super basic though... but a good insight into how to actually set it up. I think maybe for our use at the moment, Padloper is not going to be user-friendly enough for the clients that we would hand the reigns over too. However, it is clearly a great comprehensive system that I would happily use internally or personally.
  9. I have just purchased Padloper on the basis above, is this still correct though? I cannot see how to add a Discount Code at all.
  10. Thank you @kongondo - even though I had already worked out what to do, it's always good to understand why you had to do it!
  11. Max files is 1. I set it to Single Item to see if that would change anything and it did not. Before that it was set to Automatic which the description suggests should be the same anyway. I am outside a module context if that affects it, this is just a file outside the template entirely that I am calling with ajax.
  12. Ok, I've sort of resolved this... but I'm still confused. I've seen plenty of examples where people have guessed "you've got an array of images, not a single image," however I am certain this is not the case. My image field is set to "1" image, if I upload another, it's replaced. However in my example above, I either had to iterate through with foreach($resource->image as $image) Or use echo $resource->image->first->size(310,200)->url; Can anyone explain to me why this is? It seems counter to what I understand.
  13. I have a file I want to access with ajax: The purpose of this file is to iterate through a repeater, and get the image from each entry. The number of images in the image field is set to 1, and just for good measure, to return a single image. And my code: // site/ajax/processImage.ajax.php?group=1206 require_once($_SERVER['DOCUMENT_ROOT'].'/index.php'); $resourceGroup = (int) $_REQUEST['group']; // get the Repeater field $resources = $pages->get($resourceGroup)->resources; foreach ($resources as $resource) { echo $resource->title; // Works as expected echo $resource->image->url; // /site/assets/files/1259/ echo $resource->image; // filename.jpg echo $resource->image->description; // nothing } See comments above for what is output, why isn't URL giving me a full URL, and no description is available? If I try to access $image->size() I get the following fatal error: Error: Uncaught exception 'ProcessWire\WireException' with message 'Method Pageimages::size does not exist or is not callable in this context' in F:\sites\<sitename>\wire\core\Wire.php:519
  14. After I installed this, I couldn't upload anything, all images failed to upload and the console output Failed to load resource: net::ERR_CONNECTION_RESET for each. After uninstalling, image uploads work again ProcessWire ver 3.0.89
  15. I have a use case, I wouldn't say it's necessarily "good" A client asked me to link one item in a list of siblings to another site. They didn't want to scrap the content, they wanted the title and intro to remain on the listing page, they just wanted to redirect instead of going through to the detail page. That meant I couldn't just put a redirect in the template, instead I added them a new field. An easy fix of course, I just couldn't figure out at first why jumplinks wasn't working for my purpose til I saw a post further up this page. Now, as I've just seen your roadmap, I will happily rescind my request anyway as I see you've got a long list of plans already!
  16. A user is getting these errors all the time in the CMS. It happens when editing pages, making new pages, using modules, uploading images... etc. The thing is it is only happening to them. It doesn't happen to other admins, even those with the same permission settings. I tried following the PW permissions guidelines for directories and files in site/assets (although they were all set to the right settings/owner anyway). I also tried updating the CMS to the latest master release as of today. Anyone have any other suggestions?
  17. This is a great module, thank you! Looking forward to v2. My only addition request would be to forcibly override existing page URLs that do resolve.
  18. Is auto-saving and live preview with repeaters in the pipeline? I nearly jumped in and bought the agency edition today, but it was mainly for live preview and we use a lot of repeaters/repeatermatrixes, glad I spotted that it doesn't do that before I paid! Not that it doesn't look like an incredible module! I'd absolutely love to use it. Must've been quite a feat.
  19. I used this for a while and it was very helpful. But it isn't working for me anymore, has anything changed in a recent PW update that would stop the ready.php hook above working?
  20. Thanks everyone for your input, you've definitely given me some other ideas on how I could approach my particular need for now. Especially happy to discover Connect Page Fields!
  21. Yeah there's various practical ways I could do this to make it easy for myself, but as a user friendly option for a third party, I'd need something a little more robust.
  22. Currently the option to list all pages as checkboxes is very basic: I would really like (please inform me if something like this already exists), something which Has check all/none controls Indents child items/highlights parent items Pagination/load more for long lists An option to check all children of a parent item I know there are other more comprehensive systems, but they are focused on expand/reveal controls, re-ordering etc. The use of this would be if you're creating a page, and you want to determine which other page the content appears on. Edit: I'd also happily take suggestions on better ways to do that! Edit: A better way to word this would be: the Page List Select Multiple input type, but with checkboxes for each item, plus secondary checkboxes on parent pages for selecting all child items. Currently when you pick any option from the list in Page List Select Multiple, it's added to a separate list and the list collapses, meaning you need to re-expand everything just to pick the next page in the list.
  23. Scrap what I said about Notifications. I'm still very confused. If anything I think I've spent too much time setting up Processwire Fields Ok to simplify, I'm making a new field. Here's the last site I worked on (3.0.42) And here's my current site (3.0.62): Seems like the latter is showing field type titles and not field type names? Is that the only difference?
  24. Maybe I'm just going mad but I sat down to start working on my site today, and I couldn't add a "Page" field type. Existing Page fields say their type is "Page Reference" The Page field type is installed as usual. Did I miss a change where Page Ref and Page were consolidated?? I thought they were different things. I'm really confused. I have a funny feeling someone is going to reply and tell me they're the same thing and I'm an idiot, but I'm confused as to what has changed. This is the first 3.0.6x site I've done, guess I just missed some change?
×
×
  • Create New...