Jump to content

hibmem10

Members
  • Content count

    1
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Bob
  1. hibmem10

    [Contribution] Extra Fields

    Hi Everyone, First of all i would like to thank you everyone for this great contribution. I installed the latest version, 2.0j .. everything works great. I question though How can i add the extra field to show in the admin/packingslip.php Or the admin/orders.php page? i try using the "products extra fields in emails" to use for the packingslip but i got an error i added this code on the top of packingslip.php // START: Add products extra fields to order email $products_ordered_extra_fields = ''; $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id = pef.products_extra_fields_id WHERE ptf.products_id = " . tep_get_prid($order->products[$i]['id']) . " AND ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."') ORDER BY products_extra_fields_order"); while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { $products_ordered_extra_fields .= "\n\t" . $extra_fields['name'] . ': ' . $extra_fields['value']; } // END: Add products extra fields to order email and i got the following Error 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 'AND ptf.products_extra_fields_value<>'' and (pef.languages_id=' SELECT pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM products_extra_fields pef LEFT JOIN products_to_products_extra_fields ptf ON ptf.products_extra_fields_id = pef.products_extra_fields_id WHERE ptf.products_id = AND ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='1') ORDER BY products_extra_fields_order [TEP STOP] please help me, i would really appreciate some help.
×