13 May 2009, 3:04 PM
New Zenner
- Join Date:
- May 2009
- Posts:
- 1
- Plugin Contributions:
- 0
Media Manager - add product id to product name (drop down menu)
Hello,
Is it possible to add a products id number alongside its name in the pull-down menu found in the media manager section (admin).
Looking at the media_manager.php (admin side) would edits be required somewhere here:
lines 293 - 302
$product_array = $zc_products->get_products_in_category($current_category_id, false);
if ($product_array) {
$contents[] = array('text' => zen_draw_form('new_product', FILENAME_MEDIA_MANAGER, '', 'get') . ' ' .
zen_draw_pull_down_menu('current_product_id', $product_array) . ' ' . '<input type="submit" name="add_product" value="Add">' .
zen_draw_hidden_field('current_category_id', $current_category_id) .
zen_draw_hidden_field('action', 'add_product') .
zen_draw_hidden_field('page', $_GET['page']) .
zen_draw_hidden_field('mID', $mInfo->media_id) . ' </form>');
} else {
$contents[] = array('text' => ' ' . TEXT_NO_PRODUCTS);
I have been able to add the id number to the list of assigned products using this edited code:
line 308
$contents[] = array('text' => '<a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'action=remove_product&mID='.$mInfo->media_id . '&page=' . $_GET['page'] . '&product_id='. $products_linked->fields['product_id']) . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a> ' . $zc_products->products_name($products_linked->fields['product_id']) . " | " . $products_linked->fields['product_id'] . '<br />');
After a trawl through the forums, I was unable to find any similar posts - if anyone could point me in the right direction that would be great.
Thanks for your help.