We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29201
    • 239 Posts
    I've got two websites one that is fully functional and one that needs just a few features to finish it off.

    The tasks that I need help with are:

    1. Adding in a custom Snippet
    2. Adding in Search Form
    3. Creating Search Results page with pagination

    I can provide access to the code on the fully functional website to port over if you would like. Knowledge of custom PHP and SQL is required for this job. This should take no longer than 4 hours for a qualified developer.

    Please be in touch with rates and estimate if you can help.

    Thanks!


    Eliot
      • 29201
      • 239 Posts
      Did I post this in the correct area?
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Yes, but that "custom snippet" isn't very specific. Might take an hour, might take a lot longer.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 29201
          • 239 Posts
          I've copied in an example of what the custom snippet should look like...in fact it could be modified just slightly to achieve what's needed.

          <?php
          if(isset($_SESSION['mgrValidated']) && $_REQUEST['z'] != 'manprev') {
          $list = $modx -> getTemplateVar('GetProperties','',1);
          $list = $list['value'];
          
          $list_arr = explode('||',$list);
          
          $j = 0;
          
          foreach ($list_arr as $l){
              
              $query = "SELECT * from mls_listings where MLSNumber = '{$l}' ";
              $result = mysql_query($query);
          
             
          
             if ($row = mysql_fetch_assoc($result)){
                 $j++;
                 $params = array();
          
                 $p = intval($row['ListPrice']);
                 $price = '';
                
                 $i = 0;
                  while ($p > 0){
                    $ost = $p % 10;
                    $p = intval($p / 10);
           
          		   if ($i > 0 && $i %3  == 0){
          			  $price  = ',' . $price;
          			}
          		   $price = $ost . $price;
                    $i++;
          	   }
          
                $params['al_address'] = $row['AddressAWP'];
                $params['introtext'] = $row['PublicRemarks'];
                $params['al_squarefeet'] = $row['FloorArea'];
                $params['al_age'] = $row['Age'];
                $params['al_garage'] = '0';
                $params['al_bedrooms'] = $row['TotalBedroom'];
                $params['al_bathrooms'] = $row['TotalBaths'];
                $params['al_listfirm'] = $row['ListFirm'];
                $params['al_price'] = $price;
                $params['addparams'] = '?listid='.$row['MLSNumber'];
                $params['id'] = '130';
                
                  $sid = $row['SysID'];
          	$query2 = "SELECT LocalLocation FROM mls_listings_images WHERE UniqIdent = '{$sid}' ";
          	$result2 = mysql_query($query2);
          
          
          	if ($row2 = mysql_fetch_array($result2)){
          		$image = str_replace(MODX_BASE_PATH, '',$row2[0]);
          	}
                  else {
                         $image = '';
                  }  
            
                $params['al_pic0'] = $image; 
            
                  if ( $j % 2 == 1)
                 echo $modx->parseChunk('ListingsTPL-Right',$params,'[+','+]'); 
                 else 
                 echo $modx->parseChunk(ListingsTPL-Left',$params,'[+','+]'); 
          
             }
          
          }
          }
          ?>
          
            • 29201
            • 239 Posts
            Here are some URL and further details to give a better idea of what I need:

            Here are more details on the project.

            URL: http://housevancouver.com/

            You'll notice in the top navigation menu when you mouseover Current Listings > Duncan's Listings that a photo of a property with an clickable address appears. This takes you to the Property Detail page ( http://housevancouver.com/328-west-15th-avenue.html ). I need a new element added next to Duncan's Listings called "Notable Listings". "Notable Listings" information is stored in the following tables in the DB (mls_listings and mls_listings_images) which gets updated nightly via a CRON job ( you don't need to worry at all about the syncing). You also don't need to worry about the navigation as I have a snippet completed that pulls in the "Notable Listing" photos, address, and link.

            What I need help with is:

            1. Getting a snippet working on the listing.html resource that will grab the parameter ID value on the URL from the links under Notable Listings and query the database and bring back all the required information. I've got the HTML ready to go for you and here is an example of what it should look like: http://housevancouver.com/328-west-15th-avenue.html

            2. The Search is duplication of code that lives on a sister website here: http://condovancouver.com/westendvw.html . You can see the "Property Search" as you scroll down the page on the left hand side here: http://cl.ly/1P2a0O2B0Q3o0W2Z3g3K ... the search will display results in this format: http://cl.ly/0f3v2U1g0k290l0Y2e1k . Again I can provide HTML code for you to create the display results page (you will need to add in the pagination).

            *** You can experiment with the Search on this page: http://condovancouver.com/property-search-results.html?locale=Any&type=Any&price-min=0&price-max=99000000 to get an understanding of how it should work.
              • 29201
              • 239 Posts
              Anyone interested?