Twitch Product Image Link on Account History
Display product images with link-back to product on order account history display. Alternate click to reorder (add to cart) link included.
Admin > Configuration > Layout Settings
## SQL Update - Add new switch
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Show <b>Product Image Link</b> on Account History', 'SHOW_PRODUCT_IMAGELINK_ACCOUNT_HISTORY', 'Show', 'Hide = Stock Product Name Text (no image) <br/><br/> Tracer: SHOW_PRODUCT_IMAGELINK_ACCOUNT_HISTORY <br/><br/> Default => Show', '19', '224', 'zen_cfg_select_option(array(\'Show\', \'Hide\'), ', now());
## DELETE CODE
# DELETE FROM configuration WHERE configuration_key in ('SHOW_PRODUCT_IMAGELINK_ACCOUNT_HISTORY');
## DELETE CODE
includes/templates/YOUR_TEMPLATE/templates/tpl_account_history_info_default.php
replace this:
echo $order->products[$i]['name'];
with this:
// Twitch Base7 for 1.57c
if (SHOW_PRODUCT_IMAGELINK_ACCOUNT_HISTORY == 'Show') {
$reorder_image = zen_get_products_image($order->products[$i]['id'], IMAGE_SHOPPING_CART_WIDTH, IMAGE_SHOPPING_CART_HEIGHT); // Twitch Fast Image Lookup
// Add to cart (click to reorder)
// Twitch hide - echo '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $order->products[$i]['id']) . '">'.$reorder_image. $order->products[$i]['name'] .'</a></li><br>' . "\n" ;
// Show product link
echo '<a href="' . zen_href_link(zen_get_info_page($order->products[$i]['id']), 'products_id=' . $order->products[$i]['id']) . '">' . $reorder_image.' '.$order->products[$i]['name'] . '</a>';
} else { // stock
echo $order->products[$i]['name'];
}
Tracer: Twitch Base7
Your coffee donations are appreciated
Bookmarks