WallyJ

Experience

3,030

0 Best Reply Awards

  • Member Since 11 Months Ago
  • 11 Lessons Completed
  • 1 Favorite

21st April, 2018

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 3 days ago

@Sergiu17 , Follow up. Though this line works beautifully and cleanly, I just noticed that I lost my "orderBy('created_at', 'desc'), and can't figure out how to put it back in to order the contactnotes.

$contacts = Contact::with(['contactnotes'->orderBy('created_at', 'desc'), 'deals.tasks'])->find($id);

WallyJ left a reply on How To Properly Add A Package To My Project • 3 days ago

I added the links to the js and the css from the cdnjs and it immediately started working. Thanks.

Unfortunately now I can't get the parameters to work correctly. Will work on that next.

WallyJ left a reply on How To Properly Add A Package To My Project • 3 days ago

I appreciate your explanation, and will look into using mix and npm.

So should the developer give a better explanation in the instructions, or is it my job as the developer to understand the ecosystem enough to translate the instructions into what I really ought to do? #trulytryingtolearn

WallyJ left a reply on How To Properly Add A Package To My Project • 3 days ago

Appreciate the insight, but in an effort to understand, why would this package be available via composer if composer doesn't really "install" it in a way that it will actually work after installation?

20th April, 2018

WallyJ started a new conversation How To Properly Add A Package To My Project • 4 days ago

I found a cool date picker, and according to the instructions on its page at Packagist, I ran the following command in my terminal:

composer require eternicode/bootstrap-datepicker

I feel like I'm supposed to add something else somewhere, but I don't see it in the instructions on this page, or at the docs linked from that page.

https://packagist.org/packages/eternicode/bootstrap-datepicker

Maybe I'm supposed to know.

19th April, 2018

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

Wow... mystery solved...

I had a lingering old field in my contacts table called "contactnotes" when I originally created the table, before I created an entirely different table for "contactnotes". I changed the name of the field, and boom, everything worked as expected.

DD in the controller, then DD in the view, then the view itself.

Thanks guys! #newbmistakes #greatcommunity #thankful

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

Again, the contact notes were working before I tried to add the tasks. It was at that point I wasn't writing the code correctly to also request the tasks. That's when I was encouraged to use this:

$contacts = Contact::with(['contactnotes', 'deals.tasks')->find($id);

Which was your cleaned up version. :)

So I know the relationships were working and the contactnotes were being found.

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

Thanks for the encouragement.

Still quotation marks.

It's something simple. Just can't figure it.

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

Interesting, and depressing...

I get the quotation marks again. Even when I change the case of the "Contactnotes"

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

It's the strangest thing... If I perform: `` dd($contacts);


I get back:

Contact {#585 ▼ #connection: "mysql" #table: null #primaryKey: "id" #keyType: "int" +incrementing: true #with: [] #withCount: [] #perPage: 15 +exists: true +wasRecentlyCreated: false #attributes: array:26 [▶] #original: array:26 [▶] #changes: [] #casts: [] #dates: [] #dateFormat: null #appends: [] #dispatchesEvents: [] #observables: [] #relations: array:2 [▼ "contactnotes" => Collection {#640 ▶} "deals" => Collection {#744 ▶} ] #touches: [] +timestamps: true #hidden: [] #visible: [] #fillable: [] #guarded: array:1 [▶] }


And I can click through the relations and see the contactnotes collection and the deals collection.

If I perform:

dd($contacts->deals)

I get back:

Collection {#744 ▼ #items: array:2 [▼ 0 => Deal {#682 ▶} 1 => Deal {#683 ▶} ] }


With only the deals collection, as expected.

However, if I perform:

dd($contacts->contactnotes);


I get back this:

""


That's it... a set of quotation marks... I am baffled.

18th April, 2018

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

Returns the Contact Info for the contact.

Also includes a "relations" array with 3 contactnotes and their values.

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

@Sergiu17, You gave me an idea, so I went back to my controller and did a:

dd($contacts->contactnotes);

and it returned the quotation marks. So the view is not the problem.

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

Thanks @JoaoPedroAS51 . That looks cleaner. And I changed the Model as you suggested. No change.

The dump of the $contactnotes still gives ""

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

I think there's something wrong with this line:

$contacts = Contact::with('contactnotes')->with('deals.tasks')->find($id);

Because it works for deals, but not for contactnotes.

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

Contact Model:

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Contact extends Model
{
    public function User()
    {
        return $this->belongsTo(User::class);
    }
    
    public function Contactnotes()
    {
        return $this->hasMany(Contactnote::class);
    }
    
    public function Deals()
    {
        return $this->hasMany(Deal::class);
    }

    public function addContactnote($contactnotetext)
    {
            $this->contactnotes()->create(compact('contactnotetext'));
    }

}

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

There are definitely notes associated with that contact. That part was working before I added the tasks.

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

Yes. Same array.

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

Yes. It returns an array of 2 items (deals), and under item 0, the #relations has an array of 1 task, and under its attributes it shows the fields. So the data is connected.

There's something in the naming between the controller and the view that is off. I just can't figure out what.

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

That makes sense.

However, when I try to use this code in my view, I receive a "Invalid argument supplied for foreach()"

@foreach($contactnotes as $contactnote)
                                <li class="list-group-item">
                                    <p>{{$contactnote->created_at->diffForHumans()}} - {{$contactnote->contactnotetext}}</p>
                                </li>
                                @endforeach

I did a {{dd($contactnotes)}} in the view to test and it only shows quotation marks - ""

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

All of the information shows, so the relationships are working, but if I remove the dd($contacts);, I receive the error "Undefined variable: contactnotes" on this line:

->with('contactnotes', $contactnotes)

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

Same error.

public function show($id)
    {
        $contacts = Contact::with('contactnotes')->with('deals.tasks')->find($id);
        $contactnotes = Contactnote::orderBy('created_at', 'desc')->where('contact_id', '=', $contacts->id)->get();
        $deals = Deal::where('contact_id', '=', $contacts->id)->get();
        $tasks = Task::where('deal_id', '=', $deals->id)-get();
        // Check for correct user
        if(auth()->user()->id !== $contacts->user_id){
            return redirect('/contacts')->with('error', 'That Is Not Your Contact');
        }
        return view('contacts.show')
        ->with('contact', $contacts)
        ->with('contactnotes', $contactnotes)
        ->with('deals', $deals)
        ->with('tasks', $tasks);
    }

WallyJ left a reply on Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

But wouldn't that get rid of the use of the ID it's pulling from the URL?

WallyJ started a new conversation Referencing A Variable Within A Controller Is Not Recognized • 6 days ago

If I have relationships set up for the following: Contacts have ContactNotes Contacts have Deals Deals have Tasks

public function show($id)
    {
        $contacts = Contact::find($id);
        $contactnotes = Contactnote::orderBy('created_at', 'desc')->where('contact_id', '=', $contacts->id)->get();
        $deals = Deal::where('contact_id', '=', $contacts->id)->get();
        $tasks = Task::where('deal_id', '=', $deals->id);
        // Check for correct user
        if(auth()->user()->id !== $contacts->user_id){
            return redirect('/contacts')->with('error', 'That Is Not Your Contact');
        }
        return view('contacts.show')
        ->with('contact', $contacts)
        ->with('contactnotes', $contactnotes)
        ->with('deals', $deals)
        ->with('tasks', $tasks);
    }

I am getting an error "Property [id] does not exist on this collection instance." because I am obviously doing something wrong in the "$tasks=" line.

I am making things a little difficult here because the contact view (show) pulls in the contact info, the contact notes, and then includes deals.index, which brings in the task info.

I tried to simply reference $tasks in the DealsController, but I'm thinking that since the Contacts view is the primary view being called, all variables have to be defined within that controller function. Am I right about that?

Or can you include a file, and it's part of it's own controller will be called?

16th April, 2018

WallyJ started a new conversation Big Dashboard Page Or Lots Of Separate Includes • 1 week ago

When you create a dashboard style view that is pulling in quite a few different data sets, do you:

A. Put everything you need in dashboard.blade.php...

or

B. Create each section of the dashboard in its own separate blade files, possibly in folders so they all end up as index.blade.php, that you simply include on dashboard.blade.php

And why?

15th April, 2018

WallyJ left a reply on Query Records Within A Foreach Loop In A View • 1 week ago

So, it seems if I set up the one connective relationship, the eager loading will work, based on the premise that the order table has a customer_id field in it, that is a primary key.

New analogy...

I have 2 tables. each set of data is out of my control. I just receive them and update the database accordingly

Table 1: Car Sales for last year Table 2: Current Cars for Sale

Table 1 Fields: Date of Sale - (03/01/2017, 10/13/2017, etc.) Car Model - (S100, S200, S300, etc.) Price - ($10,000, $20,000, etc.) Description - (Nice Car, Super Deal, etc.) Salesperson - (Jim, Suzie, Fred, etc.)

Table 2 Fields: Car Model - (S100, S200, S300, etc.) Price - ($10,000, $20,000, etc.) Description - (Nice Car, Super Deal, etc.)

So the tables are very similar, with no real ID's for the car Models, no primary keys, and no table called "Car Models"

I run a query that lists cars Currently for sale, in a foreach, based on certain criteria, listing car model and price, etc.

I want to hover over the car model and see the past sales from last year, queried from the other table.

Though I understand eager loading, based on this setup, I don't see how Eloquent can connect the two fields via relationship of the "Models" fields since there is no ID, and no primary field on either table (Multiple of the same model sold last year and multiple of the same model currently for sale).

I know it isn't preferred, but this is why I first wanted to run a query in the foreach, with fairly small amount of records, let's say 1,400 in current cars for sale, and 5,000 in the table of sales from last year, I'm not as concerned about the multiple queries, but again, I am trying to do things the "Laravel Way" if at all possible. :)

#tryingtobeagoodstudent

WallyJ left a reply on Query Records Within A Foreach Loop In A View • 1 week ago

Ahh.... gotcha.. I'll give it a try. Thanks!

WallyJ left a reply on Query Records Within A Foreach Loop In A View • 1 week ago

Ok, but don't I have to set up the relationship in the model? I've just never set up a many to many relationship in a model before.

WallyJ left a reply on Query Records Within A Foreach Loop In A View • 1 week ago

Makes sense.

However, what if it wasn't customers and orders, and it was 2 tables that had a many-to-many relationship based on one field.

Or let's say it's one step further with Customers and Orders... The first query brings back customers and orders, and I use the relationship to show the orders.

But now I want the tooltip to be for each Product in the order, and I want to hover over the Product to see a list of other Orders that contain that product.

But realistically it's 2 tables with the many-to-many relationship based on a single field, so the relationship doesn't seem to help, unless that would work in this case as well.

WallyJ started a new conversation Query Records Within A Foreach Loop In A View • 1 week ago

So, pardon me not having complete code yet because this is somewhat hypothetical.

So, if I have a query in my Controller that looks up a list of Customers from the Customers table, with various fields like name, email, etc. and it shows in a view with something like:

@foreach ($customers as $customer)
<div>$customer->name</div>
<div>$customer->email</div>
<div>$customer->phone</div>
<div>$customer->countoforders</div> (from the Orders Table)
@endforeach 

Then, I want to create a Bootstrap tooltip for "countoforders" so that when I hover over the number it pops up a tooltip with a list of the orders for that customer.

I'm not asking for help with coding the tooltip.

I'm asking, what's the best way to query the orders table based on the current record inside the foreach.

I feel like if I do it within the controller, it won't know how to only give the orders for each customer, but I'm sure I'm missing something.

Or is there a way to return a subset of records for the orders and simply call them inside the foreach?

13th April, 2018

WallyJ left a reply on Composer Update JSON Error • 1 week ago

I'm not sure what caused this issue, but I solved it by:

rm -rf vendor/

then

composer install

per the tip found at: https://github.com/composer/composer/issues/3786

WallyJ started a new conversation Composer Update JSON Error • 1 week ago

At the end of my new Laravel project install, I received this error, and if I try to run composer update or composer dump-autoload, I receive the same error. Anyone seen this or know how to fix it?

[Composer\Repository\InvalidRepositoryException]
  Invalid repository data in /home/vagrant/Code/newapp/vendor/composer/installed.json, packages could not be loade
  d: [Seld\JsonLint\ParsingException] "/home/vagrant/Code/newapp/vendor/composer/installed.json" does not contain
  valid JSON
  Parse error on line 1:

  ^
  Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['

WallyJ left a reply on Converting MS Access Queries To Laravel Query Builder • 1 week ago

@jlrdw, that's a good idea, to use Access that way. Though, I just tried it with my full query and received an error that doesn't tell me much:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near... with my SQL code...

WallyJ left a reply on Coverting MS Access Queries To Laravel Query Builder • 1 week ago

I appreciate you responding, but I am trying to use Eloquent whenever it is at all possible. Thanks.

WallyJ started a new conversation Coverting MS Access Queries To Laravel Query Builder • 1 week ago

I am converting some queries that contain primarily aggregate fields, all in one query, in a MS Access db.

How would I convert so many aggregate fields into one lookup? Or would I need to break it up and then combine them?

For instance, some of the query fields look like this:

Field: Product Name Table: Products Total: Group By

Field: Product Name Table: Products Total: Count Criteria: >2

Field: Price Table: Products Total: Avg Sort: Descending

Field: Price Table: Products Total: StDev

Which lists all products with their counts of sales and their avg and standard deviation of prices.

How would I do this in Eloquent?

12th April, 2018

WallyJ left a reply on Edit Form - Attempt To Assign Property 'dealtype' Of Non-object • 1 week ago

So... I think this is working now. I added an id to my modal form:

{!! Form::open(['id' => 'editmodalform', 'route' => ['deals.update', '']]) !!}

So the action is technically blank until the script fills it in.

Then I added this line to my script:

$("#editmodalform").attr('action', '/deals/' + dealid)

It replaces the action once the html is created after opening the modal, so it still goes to the controller and works. Still testing to make sure, but I think I've got it working now.

WallyJ left a reply on Edit Form - Attempt To Assign Property 'dealtype' Of Non-object • 1 week ago

Yep. Same thing.

The foreach on deals.index is what changes it from $deals to $deal:

@foreach($deals as $deal)
                        <div class="well">
                            <h3><a href="/deals/{{$deal->id}}">{{$deal->dealtype}}</a></h3>
                            <h4>Price: {{moneyformat($deal->price)}}</h4>
                            <!-- Calculation for Commission dollars from Price and CommissionPercentage -->
                            <h4> Comm: {{moneyformat($deal->price * $deal->commissionpercentage * .01)}} - ({{$deal->commissionpercentage}}%)</h4>
                            <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-contactid="{{$contact->id}}" data-dealid="{{$deal->id}}" data-dealtype="{{$deal->dealtype}}" data-price="{{$deal->price}}" data-commissionpercentage="{{$deal->commissionpercentage}}" data-target="#editDealModal">Edit</button>
                        </div>
@endforeach 

But once I click an Edit button, the modal no longer sees the $deal->anything. It gets its data from the data-stuff within the button. But that modal form needs to send the deal id back to the controller. But I don't know how to set the php variable within the form syntax to be equal to the javascript variable sent from the button. :)

WallyJ left a reply on Edit Form - Attempt To Assign Property 'dealtype' Of Non-object • 1 week ago

I'm using jquery to send the data to the modal form fields. The button code:

<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-contactid="{{$contact->id}}" data-dealid="{{$deal->id}}" data-dealtype="{{$deal->dealtype}}" data-price="{{$deal->price}}" data-commissionpercentage="{{$deal->commissionpercentage}}" data-target="#editDealModal">Edit</button>

The script:

<script>
    $(function(){
        $('#editDealModal').on('show.bs.modal', function (event) {
            var button = $(event.relatedTarget) // Button that triggered the modal
            //var recipient = button.data('whatever') // Extract info from data-* attributes
            var dealid = button.data('dealid')
            var dealtype = button.data('dealtype')
            var price = button.data('price')
            var commissionpercentage = button.data('commissionpercentage')
            var contactid = button.data('contactid')
            // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
            // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
            var modal = $(this)
            modal.find('input[name="dealid"]').val(dealid)
            modal.find('input[name="contactid"]').val(contactid)
            modal.find('select[id="dealtype"]').val(dealtype)
            modal.find('input[id="price"]').val(price)
            modal.find('input[id="commissionpercentage"]').val(commissionpercentage)
            $("#jqValue").html(dealid)
        })
    });
</script>

So that's probably where $deal gets lost. As you can see, I am currently sending the deal id and the contact id through the script, but I really only need the contact id... I think. :) Though that leaves the $deal->id missing.

WallyJ left a reply on Edit Form - Attempt To Assign Property 'dealtype' Of Non-object • 1 week ago

The edit view is technically a modal view whose code is in the "index.blade.php" of deals, which is included

@include('deals.index');

on the Contacts view.

So editing through the modal never goes to the /deals/edit/$id url.

Is that what you mean?

Otherwise, I'm not sure how to pass it to the modal.

WallyJ left a reply on Edit Form - Attempt To Assign Property 'dealtype' Of Non-object • 1 week ago

That makes sense.

Once I open the modal, it loses the ability to find $deal->id. If I put

{!! Form::open(['route' => ['deals.update', $deal->id]]) !!}

in my form, then I get an error that says: "Undefined variable: deal" on that line.

Why is that?

WallyJ left a reply on Edit Form - Attempt To Assign Property 'dealtype' Of Non-object • 1 week ago

So, if a deal belongs to a contact, and the deal is being edited in a modal, and I want to send the user back to the contact page, via the contact_id, should I use a hidden field to pass that contact_id through to the deal controller?

WallyJ left a reply on Edit Form - Attempt To Assign Property 'dealtype' Of Non-object • 1 week ago

You're always a great help @Cronix , and pushing me toward learning, each step of the way. I will look into it for sure! Thanks. :)

WallyJ left a reply on Edit Form - Attempt To Assign Property 'dealtype' Of Non-object • 1 week ago

Yes, it should be. Thanks. :)

WallyJ started a new conversation Edit Form - Attempt To Assign Property 'dealtype' Of Non-object • 1 week ago

I created a form. Works fine. Here's the @store in the controller:

public function store(Request $request, $contact_id)
    {
        $contact = Contact::find($contact_id);
        $deal = new Deal;
        $deal->dealtype = $request->input('dealtype');
        $deal->price = $request->input('price');
        $deal->commissionpercentage = $request->input('commissionpercentage');
        $deal->commissionpercentagedollars = $deal->price * $deal->commissionpercentage * '.01';
        $deal->contact()->associate($contact);
        $deal->save();
        return redirect()->route('contacts.show', [$contact->id]);
    }

Added the same code to the "Update" section, changed it accordingly:

public function update(Request $request, $contact_id)
    {
        $contact = Contact::find($contact_id);
        $deal = $request->input('dealid');
        $deal->dealtype = $request->input('dealtype');
        $deal->price = $request->input('price');
        $deal->commissionpercentage = $request->input('commissionpercentage');
        $deal->commissionpercentagedollars = $deal->price * $deal->commissionpercentage * '.01';
        $deal->contact()->associate($contact);
        $deal->save();
        return redirect()->route('contacts.show', [$contact->id]);
    }

I can add new deals, but when I try and update one, I receive the error. I thought maybe it was returning an array causing the error, so I did a ``` dd($request->input('dealtype'));


Which returned a single entry "Buyer".

Ideas?

WallyJ left a reply on Development Server To Production Server, Versioning, Etc. • 1 week ago

@Helmchen , LOL. Yes, I saw your reply, and thank you. I was just trying to explain where I'm most comfortable, and least comfortable. About to watch the video now. Thanks again! :)

WallyJ left a reply on Development Server To Production Server, Versioning, Etc. • 1 week ago

@Cronix , First, THANKS for the great explanation! I have a git account but I have never used it. I'm at the "developing local only" stage. Everything you say makes sense, and yes, I probably need some idiot-proofing at this point so that everything "just works". I think I will go that route. The only other question I have is about versioning locally with git, or does git not handle versioning. I want to be able to roll back if I have any issues/bugs that I missed during testing that I can't quickly/easily fix. I understand all of these concepts fairly well. I've just never put them into practice myself.

WallyJ started a new conversation Development Server To Production Server, Versioning, Etc. • 1 week ago

I've been working on my first major web project, and I'm getting close to ready to launch it, but need to learn more about versioning, moving my project from the development server to the production server, and workflow that allows me to create updates in development, test them, then deploy them to production.

Can you point me to some good resources on options, training, etc.

Rather than Googling, or Youtube searching, I thought I would ask for the best resources based on your experience. Thanks!

11th April, 2018

WallyJ left a reply on Varying Modal Content Based On Trigger Button • 2 weeks ago

Concept Of The Day... Brought to you by @Cronix :

If you want to use JQuery... LOAD JQUERY....

Good Grief... I've been battling script code that was never going to work properly until I actually loaded JQuery.

Big thanks to Cronix for helping me walk through the fixes which finally worked in my fiddle which showed me that I was missing one of the basic elements needed. Your patience is beyond admirable my friend!

I simply added:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

to the top of the view. It worked immediately. I will probably work on a "best practice" for including it when needed, but for now, all is well. Thanks again!

10th April, 2018

WallyJ left a reply on Varying Modal Content Based On Trigger Button • 2 weeks ago

I have been force-refreshing the browser. Have even checked using incognito mode in Chrome for a fresh start.

Not sure about jquery being loaded. I thought that was loaded as part of Laravel, much like bootstrap. How can I check that?

There are errors: Uncaught ReferenceError: $ is not defined at this line:

$(function(){

But it gave this error when we didn't have that added from your suggestion.

Also, "Vue warn: Error compiling template" error, which shows almost the whole page

WallyJ left a reply on Varying Modal Content Based On Trigger Button • 2 weeks ago

Sorry, I should have checked my syntax before posting again. I fixed it, and now it works in the fiddle properly, but doesn't work in my code. Again, the HTML my code produces works fine in the fiddle, but not in my project (Homestead on Vagrant)

WallyJ left a reply on Varying Modal Content Based On Trigger Button • 2 weeks ago

Like this?

<script>
        $function(){
            $('#editDealModal').on('show.bs.modal', function (event) {
                var button = $(event.relatedTarget) // Button that triggered the modal
                //var recipient = button.data('whatever') // Extract info from data-* attributes
                var dealtype = button.data('dealtype')
                var price = button.data('price')
                var commissionpercentage = button.data('commissionpercentage')
                // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
                // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
                var modal = $(this)
                modal.find('select[id="dealtype"]').val(dealtype)
                modal.find('input[id="price"]').val(price)
                modal.find('input[id="commissionpercentage"]').val(commissionpercentage)
            })
        });
</script>
Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.