+ Reply to Thread
Results 1 to 8 of 8

Thread: Add a field in the form Contact Owner

  1. #1

    Angry Add a field in the form Contact Owner

    Hi,

    I have to add a field in the form Contact Owner which must be of type "file" with the id "mycv".

    At first I've created one file field in form called 'mycv'.

    I've created add new variable in the function ajaxContactOwner called "$mycv = false" in rlMessage.class.php.
    After I added a variable to:
    $find = array('{owner_name}', '{mycv}', '{visitor_email}', '{listing_link}', '{message}', '{reply_link}', '{visitor_name}');
    $replace = array($owner_name, $account_info['mycv'], $account_info['Mail'], $link, $message, $reply_link, $account_info['Full_name']);

    At the Backend in the section "E-mail templates / Contact_Owner/ I added {mycv} but I do not receive the contents of the "mycv".

    Can you help me?
    Thank you

  2. #2
    Hello Maurizio,

    Because you forgot to send this variable to ajax method.
    Please open file: ftp://libs>>javascript>>flynax.lib.js
    find method: this.contactOwnerSubmit and add your new variable in ajax method.
    Viktor,
    Flynax technical department,
    Best wishes.

  3. #3
    Hi Viktor,

    I tried but not working.

    This is what I added in flynax.lib.js

    --------

    this.contactOwnerSubmit = function(obj, listing_id){
    xajax_contactOwner($('#contact_name').val(), $('#contact_email').val(), $('#contact_phone').val(), $('#contact_mycv').val(), $('#contact_owner_message').val(), $('#contact_code_security_code').val(), listing_id);
    $(obj).val(lang['loading']);
    };

    -------

    This is what I added in contact_seller_form.tpl

    --------

    <div class="submit-cell">
    <div class="field"><input placeholder="MIO CV" maxlength="30" type="text" name="contact_mycv" id="contact_mycv_{$captcha_box_id}" /><span></span></div>
    </div>

    -------

    And my file rlMessage.class.php

    --------------

    function ajaxContactOwner($name = false, $email = false, $phone = false, $message = false, $code = false, $listing_id = false, $box_index = false, $mycv = false)
    {
    global $_response, $pages, $config, $lang, $account_info, $account, $rlHook, $sql, $rlListingTypes, $rlSmarty, $errors;

    if (!$config['messages_module']) {
    return $_response;
    }

    --------------

    --------------

    $find = array('{owner_name}', '{mycv}', '{visitor_email}', '{listing_link}', '{message}', '{reply_link}', '{visitor_name}');
    $replace = array($owner_name, $account_info['mycv'], $account_info['Mail'], $link, $message, $reply_link, $account_info['Full_name']);

    --------------

    I can not find the error.

    Thanks

  4. #4
    Hello Maurizio,

    I try to explain your error.

    1-st: Why did you set id for field: id="contact_mycv_{$captcha_box_id}". Use only: id="contact_mycv"

    2-nd: in ajax you send variables: xajax_contactOwner(1,2,3,4,5)
    but in php you take it like: function ajaxContactOwner(1,2,3,5,4)

    You should check sequence for variables in js and in php
    Viktor,
    Flynax technical department,
    Best wishes.

  5. #5
    Hi Viktor,

    I tried in every way but not working.
    I attach files that have changed and a print screen of the setting of the Admin side - E-mail Templates "contact_owner" and what I get in the mail.

    This is the e-mail

    ----------------------------

    Dear {owner_name},

    A Maurizio at Gtasclub sent you a message.

    Subject: Request one quote

    Mycv: {visitor_mycv}

    This is the message field and it works ok.

    Contact phone: This is the phone field and it works ok.
    ______________________________________
    Thank you,
    Gatasclub Administration

    ----------------------------

    Can you help me please?
    Attached Images Attached Images
    Attached Files Attached Files

  6. #6
    Hi,
    I solved.
    It was also modified the file templates /template/js/lib.js.
    But I have another problem.
    The attached file is not sent to the mail address of the owner but only the address of the file as an example of received email below.
    How can you make sure that the owner also receives the file?
    ------------------------
    Dear {owner_name},

    A Maurizio at Gtasclub sent you a message.

    Subject: Request one quote

    Mycv: C:\fakepath\Abstract-Painting-HD.jpg

    This is the message field and it works ok.

    Contact phone: This is the phone field and it works ok.
    ______________________________________
    Thank you,
    Gatasclub Administration
    ---------------------

  7. #7
    No one can help me?

  8. #8
    Hello Maurizio,

    If you want you can create a ticket with your problem. And we will try to solve it.
    Viktor,
    Flynax technical department,
    Best wishes.

+ Reply to Thread