Jump to content

cst989

Members
  • Content Count

    33
  • Joined

  • Last visited

Community Reputation

8 Neutral

About cst989

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  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. 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!
×
×
  • Create New...