Hi Pixxie,
it seems to work fine here except for one thing, and that is that the edit (and preview) link shows the current selected category (which is "cPath=0" when the "Top category" is selected).
Actually it's seems weird to me that this link needs cPath at all, since we are editting the product (which is identified by its products_id not by the category it is in). But that is way the core code works too, so I assume there is logic behind it.
Anyway, if a cat id is needed, I think it should be the master cat id i.s.o. the id of the current selected cat.
To change this find in admin/quick_updates.php:
Code:
//// links to preview or full edit
$type_handler = $zc_products->get_admin_handler($products->fields['products_type']);
if(QUICKUPDATES_DISPLAY_PREVIEW == 'true')
echo '<td class="smallText"><a href="' . zen_href_link(FILENAME_PRODUCT, 'cPath=' . $current_category_id . '&pID=' . $products->fields['products_id'] . '&action=new_product_preview&read=only' . '&product_type=' . $products->fields['products_type']) . ' target="blank">' . zen_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a></td>' . "\n";
if(QUICKUPDATES_DISPLAY_EDIT == 'true')
echo '<td class="smallText"><a href="' . zen_href_link($type_handler, 'cPath=' . $current_category_id . '&product_type=' . $products->fields['products_type'] . '&pID=' . $products->fields['products_id'] . '&action=new_product') . '" target="blank">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . '</a></td>' . "\n";
echo '</tr>';
And 2x change $current_category_id to $products->fields['master_categories_id']
So that it reads:
Code:
//// links to preview or full edit
$type_handler = $zc_products->get_admin_handler($products->fields['products_type']);
if(QUICKUPDATES_DISPLAY_PREVIEW == 'true')
echo '<td class="smallText"><a href="' . zen_href_link(FILENAME_PRODUCT, 'cPath=' . $products->fields['master_categories_id'] . '&pID=' . $products->fields['products_id'] . '&action=new_product_preview&read=only' . '&product_type=' . $products->fields['products_type']) . ' target="blank">' . zen_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a></td>' . "\n";
if(QUICKUPDATES_DISPLAY_EDIT == 'true')
echo '<td class="smallText"><a href="' . zen_href_link($type_handler, 'cPath=' . $products->fields['master_categories_id'] . '&product_type=' . $products->fields['products_type'] . '&pID=' . $products->fields['products_id'] . '&action=new_product') . '" target="blank">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . '</a></td>' . "\n";
echo '</tr>';
And maybe that solves (some of the) issues you mentioned?
Bookmarks