kongondo

PW-Moderators
  • Content Count

    5,509
  • Joined

  • Last visited

  • Days Won

    86

kongondo last won the day on October 11

kongondo had the most liked content!

Community Reputation

6,023 Excellent

3 Followers

About kongondo

  • Rank
    Hero Member

Profile Information

  • Gender
    Not Telling
  • Location
    UK

Recent Profile Visitors

25,731 profile views
  1. Welcome to the forums @transmontis, It could be a file permissions issue. Do all your urls work fine? CSS files loaded? What does browser dev console report, especially for the missing files?
  2. There is very little difference: http://processwire.com/api/ref/wire-data/set/ This one sets the property value directly. The $key is converted to a string (e.g. $this->myString = 'my value';) $this->$key = $value; This one uses the method set() to set both a key and a value for you. I'm not sure if the $key is manipulated in anyway behind the scenes, e.g make it 'property' friendly. I've had a quick look and couldn't find anything to that effect. $this->set($key, value); You can also do (Set a property using array access) : $this[$key] = $value; Edit: Reading your thread title, there is no right way. All ways are correct and are documented
  3. kongondo

    In such cases, I always lcfirst() my properties and also make sure to remove any spaces. $key = lcfirst($sanitizer->fieldName($key));// "Size" to "size" OR "some key" to "some_key"
  4. kongondo

    There is. I've found that *= in in-memory searches works irrespective of case (IIRC).
  5. kongondo

    Hi @Basil. Sorry I missed your post. Just seen it now. Please see the first post In this thread for details. Existing users will be able to buy the new padloper at a discounted price. The discount % hasn't been decided yet :-).
  6. It doesn't matter where it is run from; as long as when the form is sent, there is a process server-side to receive it. You don't have to use Ajax. Ajax is just a method that uses JavaScript. Using Ajax does not exclude the use of PHP. You can use a normal form, no worries. Maybe let's deal with successfully submitting the form first. If you are not using a form, then you need JavaScript to submit the details without using a form (basically mimicking a form submission).
  7. kongondo

    @DxJR Sorry, I haven't had a chance to look at it yet. If you are able to help debug it please, that would help get us there.
  8. kongondo

    Hi @mke Thanks for the clarification and example. That fits into the planned separate pro frontend module. As stated, those who want to build custom frontend will have the full API at their disposal. Something like this (pseudo code, although some API is ready) // assuming user is logged in, they are redirected to My Account area $out = "<span>$user->name</span>"; // your Orders Table [orders API in the works] $orders = $pages->find("template=orders,order.customer_id=$user->id,limit=10"); foreach($orders as $o) { $order = $o->order; /* Date: $order->date; Status: $order->status; etc... */ } // Addresses [customer API 95% done] $customer = $user->customer; /* First Name: $customer->firstName; Last Name: $customer->lastName; Email: $user->email; Address: $customer->address; City: $customer->city; Postal/Zip Code: $customer->code; Region: $customer->region; Country: $customer->country; Phone: $customer->phone; // etc...including if customer is tax exemp and whethey they accept marketing. // Any custom properties added are also available, e.g. $customer->company, etc. */
  9. No; they need not. You need to show us a bit more code. What does clicking on your buttons do? Are they in a form? How are you submitting the form? How are you handling form submission server-side? What is page.php? It seems to me you've created a file named page.php. If it is not a template file, and you've placed it in some restricted locations, e.g /site/templates/ it is being rejected for security reasons. A few thoughts. For simplicity, have the template file where you output your buttons handle the form submission. I wouldn't call it page.php though. It's confusing. If you are using Ajax, it is even easier. See below. Your code could look like this. You can also use <a> and control capture using JavaScript. <button type="button" value="1" name="new_1">New 1</button> <button type="button" value="1" name="new_2">New 2</button> You can have JavaScript listen to the button that was clicked and submit that. If you had a form, the action would be: <form action="./" method="post"> In your template file, follow what's in this post Hope this makes sense.
  10. kongondo

    I'm just finishing up on a module to manage customers information/data. I'll consider the frontend customer account area. Do you have a direct link I could look at? Thanks. The account area and managing users (customers) are two separate things. Regarding the latter, shop admins will be managing users in the backend, in a dedicated area. There will be both bulk/batch actions (edit) and single customer edit. They'll be able to tag customers (e.g. as wholesale buyers, etc), create customer notes, groups, etc. The account area, from what I understand, is like a frontend login but the customers stay in the 'frontend' :-). ProcessWire will handle authentication. Please clarify this, thanks.
  11. kongondo

    You mean display on the frontend? Check if the page is viewable for that user. The page would need to be access-controlled // in a loop for menu items... if(!$page->viewable()) continue;
  12. kongondo

    https://processwire.com/blog/posts/new-module-configuration-options/
  13. kongondo

    Received, thanks.
  14. Try this: $inputfield->class .= ' your-classes';// @note the space
  15. kongondo

    I believe so :-).