Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

4 Neutral

About mattcohen

  • Rank
    Jr. Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    New Zealand

Recent Profile Visitors

1,489 profile views
  1. Hi, I'm having an issue where my form won't respond to my post form if I'm on any other page other than Page 1 of a set of pagination results. Is this a limitation of pagination? Has anyone else came across this?
  2. Thanks heaps for your suggestions, Robin. I am looking to improve the structure over the weekend & will take these on board Thanks tpr, Will look into this!
  3. Thanks, Gideon, What I was hoping to do was to perform the same search but limit it at the lowest and highest ends of the spectrum (e.g. Highest price and lowest price). Does that make sense?
  4. Hi Gideon, the price field that it's been sorted by is the price field name.
  5. Hi Team, I am having trouble sorting prices in my foreach loop and am wondering is becasuse my price field is a text field and not a number field. My code is <?php $item_title = $item->title; $items = $pages->find ("template=Listing, limit=15, sort=title"); foreach ($items as $item?> <tr> <td>{item.brand}</td> <td>{item.model}</td> <td> <?php $item_title = $item->title; $store_price = $pages->find ("template=PriceSpy, sort=price, title=$item_title, limit=1") ; foreach ($store_price as $price) :?> {price.price} <?php endforeach ;?> </td> <td> <?php $item_title = $item->title; $store_price = $pages->find ("template=PriceSpy, sort=-price, title=$item_title, limit=1") ; foreach ($store_price as $price) :?> {price.price} <?php endforeach ;?> </td> </tr> <?php endforeach ;?> The offending page is this one: https://www.vapeprices.co.nz/price-guide/. Whereas you can see the Low and High columns are just not making sense I would really appreciate any help.
  6. Hi All, I am wondering if anyone has come up with an easier way of merging their local environment with the live production environment. For instance, my thinking would be to use Site Profile Exporter, install Processwire in the main directory of the live environment & install. Just to clarify, This is if I am doing a lot of structural changes obviously to both the template fields level and the templates themselves. Otherwise, it would be just the normal (keeping two copies in sync and uploading etc). Does anyone have any solutions?
  7. Hi All, I am experiencing issues in including files that are in multiple sub directories. They don't seem to load or break the File Compiler Tags module. My syntax is as follows <?php require 'src/components/breadcrumbs.php'; require 'src/components/topmeta.php'; require 'src/components/page.php'; ?> Anyone else have issues relating to this? I'm using the latest PW build.
  8. Hi All, I am wondering if anyone has a solution to my problem. I have a website that I have at a DomainA.com, but I am wanting all templates/static assets (such as images uploaded by the user, PW, etc) to be assets.domaina.com Is this possible? From what I've read in the forums - you need to use some special htaccess code, but the posts are from a few years ago.
  9. Hi guys, I am wondering how I deal with this error message. Whenever I am trying to save a page I am getting this error when someone enters the same name in the "name" textbox. Here is my code <?php if ($input->post->reviews || $input->post->name) { // Save in the ProcessWire page tree; map submission to the template fields $np = new Page(); // create new page object $np->template = $templates->get("reviews"); $np->parent = $pages->get("/reviews/"); $name = $sanitizer->text($input->post->name); $email = $sanitizer->text ($input->post->email); $review = $sanitizer->text ($input->post->review); // Match up the sanitized inputs we just got with the template fields $np->of(false); $np->title = $name; $np->page_id = $page->id; $np->name = $name; $np->email = $email; $np->review = $review; $np->save(); } ?>
  10. Thanks for all of your help. I managed to get the desired end result using Ryan's example:
  11. Just curious, if I had a select input by the name of "type" - Can I call that directly and output the options
  12. Thanks for your reply, can you give me an example of how I might implement this?
  • Create New...