Jump to content

Vantalk

Members
  • Content count

    13
  • Joined

  • Last visited

Profile Information

  • Real Name
    Laurentiu Vintila
  1. Vantalk

    Customers extra fields

    Sal. First thing.. i installed the oldest contrib (7 Nov 2005 Kit's original contrib) and no more updates. just the slight modifications that i wrote in this forum topic. Do that and then tell me if it doesn't work. I shall check my mail for the next 3 days.. please tell me if anything goes wrong till then
  2. Vantalk

    Customers extra fields

    Well the install instructions have some small bugs. So go through and see if you included them, cause you shouldn't: At: "5.In admin/includes/filename.php Add the following lines: define('FILENAME_EXTRA_FIELDS','extra_fields.php');<br><br>" Reomve the: <br><br> Same goes for step 7: "7. In admin/includes/languages/english/customers.php Add line: define('CATEGORY_EXTRA_FIELDS','Extra fields');<br><br>" Remove the: <br><br> See if that works
  3. Vantalk

    Customers extra fields

    Ok. So i diged some more.. to make everything look better in create account and in the email confirmation you have to modify general.php found in /includes/functions/general.php. I simply removed the table tags.. So this is how it looks now for me: function tep_get_extra_fields($customer_id,$languages_id){ $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id); $extra_fields_string =''; if(tep_db_num_rows($extra_fields_query)>0){ $extra_fields_string .= '<td> <tr class="infoBoxContents"><td>'; while($extra_fields = tep_db_fetch_array($extra_fields_query)){ $value=''; if(isset($customer_id)){ $value_query = tep_db_query("select value from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id=" . $customer_id . " and fields_id=" . $extra_fields['fields_id']); $value_info = tep_db_fetch_array($value_query); $value = $value_info['value']; } $extra_fields_string .='<tr> <td class="main" valign="top">' . $extra_fields['fields_name'] . ': </td> <td class="main" valign="top">' . (($extra_fields['fields_input_type']==0) ? tep_draw_input_field('fields_' . $extra_fields['fields_id'],$value) : tep_draw_textarea_field('fields_' . $extra_fields['fields_id'], 'soft', 50, 6,$value,'style="width:400px;"')) . ' ' . (($extra_fields['fields_required_status']==1) ? '<span class="inputRequirement">*</span>': '') .'</td> </tr>'; } $extra_fields_string .= '</td></tr></td></tr>'; $extra_fields_string .= '<tr><td></td></tr>'; } return $extra_fields_string; } Now it looks better in you confirmation email and even in the customers email. Maybe i should call this my little contrib? :D
  4. Vantalk

    Customers extra fields

    What can i say.. it kinda looks ugly but it shows up the completed fields.. So if there is anyone with more knoledge to tell me how can i make the confirmation e-mail show the extra_fields only to me and not the customer? Also i believe the big space and the small thingy at the finish is caused by the fact that the fields where put in a box (as in create account).. How can i get rid of the borders of that box in create account? Any help would be hugely apreciated. :blush:
  5. Vantalk

    Customers extra fields

    I seem to found out a solution (at least for desperate guys :blush: ) to make extra_fields contrib show in e-mail confirmation and almost anywhere you want it. Here is what i did: 1. In file english.php add: define('SHOW_EXTRA_FIELDS', tep_get_extra_fields($customer_id, $languages_id)); Do this in any other language file. 2. In checkout_process.php find the line: $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } 3. After add (you can add it anywhere else in the file between the two comments: // lets start with the email confirmation; // send emails to other people): $email_order.="\n". SHOW_EXTRA_FIELDS . "\n"; Downsize of this: It makes kinda of a big space before it shows the fields, has a small i dono what that is and can be edited as normal fields.. at least you can't save changes. You can add the constant SHOW_EXTRA_FIELDS in almost anywhere where you want to make the completed fields show up.
  6. Vantalk

    Customers extra fields

    To make it clear: your suposed to enter you site address /admin then /extra_fields.php and click enter. The right link for using the contribution is http://mysite/admin/extra_fields.php IMPORTANT: Replace mysite with the name of your site (for ex: www.george.com, www.hereiam.ro, nowww.eu) ITS NOT extra fields.php its extra_fields.php !!remember to put the underscore
  7. Vantalk

    Customers extra fields

    Dear Kit. Wanted to let you know that you did a great job with this contribution. One thing though. If there is any link in admin to use this contribution i can't see it. Maybe my admin is kinda messed up and I do beliebe that it's so cause it only works on specific browsers :blush: So if the contrib does contain a link in admin, please specify for the novices that might go through the same trouble, that they can access the contrib via navbar. ex: http://mysite/admin/extra_fields.php. Took a while till i found that out :D
×