Order Information page: When a product purchased has downloadable attributes, the "name" is listed as the product's name, but the attribute name is never listed, only the file name. (The product is a book and the chapters are the attributes)
I've been trying to display the attribute name (instead of the file name) but have been unsuccessful. Any suggestions?
Editing the relative header_php.php file for tpl_modules_downloads.php to pull products_options_values from TABLE_ORDERS_PRODUCTS_ATTRIBUTES
header_php.php Original:
header_php.php My edits:Code:$sql = "SELECT date_format(o.date_purchased, '%Y-%m-%d') AS date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd WHERE o.customers_id = customersID AND o.orders_id = ordersID AND o.orders_id = op.orders_id AND op.orders_products_id = opd.orders_products_id AND opd.orders_products_download_id = downloadID AND opd.orders_products_filename != ''";
tpl_modules_downloads.php - Adding in:Code:$sql = "SELECT date_format(o.date_purchased, '%Y-%m-%d') AS date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename, opa.products_options_values FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " opa, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd WHERE o.customers_id = customersID AND o.orders_id = ordersID AND o.orders_id = op.orders_id AND op.orders_products_id = opd.orders_products_id AND op.orders_products_id = opa.orders_products_attributes_id AND opd.orders_products_download_id = downloadID AND opd.orders_products_filename != ''";
Code:<?php echo $downloads->fields['products_options_values'];?>
Result: No errors but nothing to echo
Thanks for your help!


Reply With Quote
