Jump to content

Brian Scramlin

Members
  • Posts

    38
  • Joined

  • Last visited

About Brian Scramlin

  • Birthday 03/02/1987

Profile Information

  • Gender
    Male
  • Location
    Wabash, Indiana

Recent Profile Visitors

2,254 profile views

Brian Scramlin's Achievements

Jr. Member

Jr. Member (3/6)

11

Reputation

  1. Thank you @ukyo and @elabx this is exactly what I needed. I really tried to read through the API before asking, mainly because I didn't understand the relationship / order between everything. You guys are great!
  2. Hi, Everyone! I have been attempting to track down how to 1. Create a template 2. Add fields to it 3. Save it to database via the API. Can anyone get me sniffing in the right direction?
  3. I have been able to accomplish the task natively with: usort($meevo_response_array, function ($a, $b) { return $b['transactionDateTime'] <=> $a['transactionDateTime']; }); But if I can do it the ProcessWire way, I try to.
  4. @Robin S and @horst thank you both for your replies! I have attempted the solutions suggested and I continue to get the same error when calling $reviews->sort( 'transactionDateTime' ); I can successfully convert the entire multi-dimensional array to WireArray objects. However, as I mentioned, the same error persists. I believe my issue may be related to using the `->sort()` function with an array. Here is the schema I am working with right now: ProcessWire\WireArray::__set_state(array( 'data' => array ( 0 => array ( 'ratingCount' => 2, 'transactionDateTime' => '2020-08-20T16:51:41.5596530', 'employeeCode' => 'MELANIE', 'employeeFirstName' => 'Melanie', 'employeeLastName' => 'Slinker', 'employeeNickName' => 'MELANIE', 'serviceId' => '8f219595-6134-4b78-9f15-ac170120a95a', 'shortcut' => 'WHC', 'displayName' => 'Women’s Haircut/Style', 'clientId' => '41a15d6b-4c66-4b1c-b67f-ac1a0139e55d', 'clientFirstName' => 'Sue', 'clientLastName' => 'Lopshire', 'tenantId' => 0, 'locationId' => 0, 'sale_Seq' => 0, 'saleLine_Seq' => 0, 'employee_User_TId' => 'd9589557-cf37-42f6-80ed-ac06011afd19', 'rating' => 5, 'comment' => 'Love my cut. Melanie does a great job', ), 1 => array ( 'ratingCount' => 1, 'transactionDateTime' => '2020-08-21T12:59:32.2407132', 'employeeCode' => 'MEGAN', 'employeeFirstName' => 'Megan', 'employeeLastName' => 'Nierman', 'employeeNickName' => 'Megan', 'serviceId' => '8f219595-6134-4b78-9f15-ac170120a95a', 'shortcut' => 'WHC', 'displayName' => 'Women’s Haircut/Style', 'clientId' => '738b74f0-e984-4cef-ac61-ac1c010294fd', 'clientFirstName' => 'Danielle', 'clientLastName' => 'Bryant', 'tenantId' => 0, 'locationId' => 0, 'sale_Seq' => 0, 'saleLine_Seq' => 0, 'employee_User_TId' => '4af682b8-50e4-4617-b54f-ac0701204d71', 'rating' => 5, 'comment' => 'Love Megan! Always leave loving my hair!', ), ), 'extraData' => array ( ), 'itemsRemoved' => array ( ), 'itemsAdded' => array ( ), 'duplicateChecking' => false, 'sortFlags' => 0, 'useFuel' => true, '_instanceNum' => 0, 'localHooks' => array ( ), 'trackChanges' => 0, 'changes' => array ( ), '_notices' => array ( 'errors' => NULL, 'warnings' => NULL, 'messages' => NULL, ), '_wire' => NULL, ));
  5. Hello, I am attempting to I have a JSON array I am receiving from an endpoint. I convert this to `Array` with `json_decode` Then, I create a new `WireArray` and import it. My issue is using the `->sort()` function does not work because this array is filled with standard objects. I believe I need to convert these to `WireData` objects. Am I on the right track? $meevo_response_array = json_decode( $meevo_response ); $reviews = new WireArray(); $reviews->import($meevo_response_array); Here I am stuck: foreach ($reviews as $review) { // convert each $review object to WireData object }
  6. I thought that as well, but it did not change anything. I also attempted putting it in the <head> ... Does the Frontend Editor load its own version of JQuery? I'm loading the one recommended with Bootstrap 4.
  7. Hello, I have enabled Frontend Editing but it is acting strange. I realized in the console there were some errors: Uncaught TypeError: e.fx is undefined jQuery 6 JqueryUI.js:7:65158 and Uncaught TypeError: jQuery.getScript is not a function init https://nerdspecs.com/dev/thelook/wire/modules/Page/PageFrontEdit/PageFrontEdit.js?nc=1598035122:387 PageFrontEditInit https://nerdspecs.com/dev/thelook/wire/modules/Page/PageFrontEdit/PageFrontEdit.js?nc=1598035122:418 <anonymous> https://nerdspecs.com/dev/thelook/wire/modules/Page/PageFrontEdit/PageFrontEdit.js?nc=1598035122:422 jQuery 2 PageFrontEdit.js:387:11 init https://nerdspecs.com/dev/thelook/wire/modules/Page/PageFrontEdit/PageFrontEdit.js?nc=1598035122:387 PageFrontEditInit https://nerdspecs.com/dev/thelook/wire/modules/Page/PageFrontEdit/PageFrontEdit.js?nc=1598035122:418 <anonymous> https://nerdspecs.com/dev/thelook/wire/modules/Page/PageFrontEdit/PageFrontEdit.js?nc=1598035122:422 jQuery 2 Does anyone have any advice on where to look or what to do?
  8. I was mostly interested in the PHP variable insertion. That could make building ProcessWire templates pretty quick.
  9. Hello! I cannot find information on if/how I can change the login URL AFTER installation. I almost always change the default to /login/ and I went through the installation too fast and kept "processwire" Is there a way I can alter this behavior? Thank you!
  10. @wbmnfktr, Thank you for your reply and ideas. I have confirmed that in my config.php file my timezone settings are aligned with my local time. Is this the only place to check for timezone settings? How do I view mail settings?
  11. My confirmation emails are coming in around 12 hours after submission. Does anyone know what settings I can check on my server or the module?
  12. I have noticed that when using builtwith.com, ProcessWire does not show up in the stack. I wonder why that is? I don't know how many people utilize that site, but I often browse through it when I find an exceptional website or application, and I hate for people to miss the greatest CMS of all time!
  13. Thank you, everyone! These are helpful strategies and I will integrate them into my work. What a great community. Regarding the auto-pre/appending, this is documented on the PW (https://processwire.com/docs/tutorials/how-to-structure-your-template-files/) as Direct Output with Automatic Inclusions, but I know Delayed Output and Markup Regions are probably preferred and I will work on switching to those strategies.
  14. 1. Would the file be overwritten when upgrading PW? 2. BLAST! Thank you.
×
×
  • Create New...