
Originally Posted by
swguy
> it seems the code I have added as per their instructions is redundant ...
where are you adding this code?
Sorry I was a bit vague there. Its includes/modules/attributes.php. I have put the snippet below, its mentioned twice. I know its a developer plugin, it might take them a while to update as they are usually busy. I was curious what the new alternative constant is, if there is one. Bear in mind I have adapted these code snippets to the 2.10 standard, it was working for 1.58a and before, I am aware attributes has been massively reworked so it makes sense it no longer works off the bat:-
PHP Code:
// Determine number of attributes associated with this product
$sql = "SELECT count(*) as total
FROM " . TABLE_PRODUCTS_OPTIONS . " popt
LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " patrib ON (popt.products_options_id = patrib.options_id)
WHERE patrib.products_id = :products_id
AND popt.language_id = :language_id
and patrib.attributes_display_only = 0
LIMIT 1";
$sql = $db->bindVars($sql, ':products_id', $_GET['products_id'], 'integer');
$sql = $db->bindVars($sql, ':language_id', $_SESSION['languages_id'], 'integer');
$pr_attr = $db->Execute($sql);
if ($pr_attr->fields['total'] < 1) return;
// Only process the rest of this file if attributes are defined for this product
$prod_id = $_GET['products_id'];
$number_of_uploads = 0;
$zv_display_select_option = 0;
$options_name = $options_menu = $options_html_id = $options_inputfield_id = $options_comment = $options_comment_position = $options_attributes_image = array();
$attributeDetailsArrayForJson = array();
$discount_type = zen_get_products_sale_discount_type((int)$_GET['products_id']);
$discount_amount = zen_get_discount_calc((int)$_GET['products_id']);
$products_price_is_priced_by_attributes = zen_get_products_price_is_priced_by_attributes((int)$_GET['products_id']);
if (PRODUCTS_OPTIONS_SORT_ORDER == '0') {
$options_order_by = " ORDER BY LPAD(popt.products_options_sort_order,11,'0'), popt.products_options_name";
} else {
$options_order_by = ' order by popt.products_options_name';
}
$sql = "SELECT DISTINCT popt.products_options_id, popt.products_options_name, popt.products_options_sort_order,
popt.products_options_type, popt.products_options_length, popt.products_options_comment, popt.products_options_comment_position,
popt.products_options_size,
popt.products_options_images_per_row,
popt.products_options_images_style,
popt.products_options_rows
FROM " . TABLE_PRODUCTS_OPTIONS . " popt
LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " patrib ON (patrib.options_id = popt.products_options_id)
WHERE patrib.products_id= :products_id
AND popt.language_id = :language_id "
and patrib.attributes_display_only == 0 .
$options_order_by;
$sql = $db->bindVars($sql, ':products_id', $_GET['products_id'], 'integer');
$sql = $db->bindVars($sql, ':language_id', $_SESSION['languages_id'], 'integer');
$products_options_names = $db->Execute($sql);
Bookmarks