Totally Zenned
- Join Date:
- Aug 2007
- Location:
- Gijón, Asturias, Spain
- Posts:
- 2,880
- Plugin Contributions:
- 7
View a product/category in the catalog from a link in admin product/category listing
I wanted an quick way to get to the catalog page of the category or product I was editing in the Admin, so this is what I did...this may be of interest to others
Both edits are in admin/includes/modules/category_product_listing.php
- Category Link
In the admin category listing I made the category title a link to the shop category:
line 24
from
<td class="pageHeading"><?php echo HEADING_TITLE; ?> - <?php echo zen_output_generated_category_path($current_category_id); ?></td>
to
td class="pageHeading"><?php echo HEADING_TITLE; ?> - <?php //ORIGINAL echo zen_output_generated_category_path($current_category_id);
echo '<a href="' . zen_catalog_href_link('index', zen_get_path($current_category_id)) . '" target="_blank" title="View in shop">' . zen_output_generated_category_path($current_category_id) . '</a>'; ?>
</td>
and a bit of extra css to make it look consistent:
h1,.pageHeading, .pageHeading a{
color:#003D00; /727272/
font-size:16px;
font-variant:small-caps;
font-weight:bold;
}
- Product Link
In admin product listing I made the product id a link for me to drag and drop which opens a new window in my browser configuration. I found that having the link open a new window with "_blank" would work but the admin product-edit page would open too, maybe someone knows how to stop the jscript row select from firing in this case.
line 328
from
<td class="dataTableContent" width="20" align="right"><?php echo $products->fields['products_id']; ?></td>
to
<td class="dataTableContent" align="right" valign="middle"><?php //original echo $products->fields['products_id'];
echo '<a href="' . zen_catalog_href_link('product_info','cPath='.zen_get_product_path($products->fields['products_id']).'&products_id='.$products->fields['products_id']) . '" title="View in shop">' . $products->fields['products_id'] . '</a>'; ?></td>
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...