Forums / All Other Contributions/Addons / Can't see my 'Recently Viewed Items' in products page with Tabbed Pro installed

Can't see my 'Recently Viewed Items' in products page with Tabbed Pro installed

Started by vinnyna on 14 Dec 2011, 11:25 AM · Views: 2,261

Results 1 to 1 of 1
14 Dec 2011, 11:25 AM
#1
vinnyna avatar

vinnyna

New Zenner

Join Date:
Nov 2011
Posts:
30
Plugin Contributions:
0

Can't see my 'Recently Viewed Items' in products page with Tabbed Pro installed

Hi,
I have a custom template and I installed Tabbed Pro, Zen light box, Wish list and got that working. I then wanted 'Recently Viewed Items'

I followed the instructions and since I wanted to have the Recently viewed items in the centre box on the products page I followed the below as given in the install notes.


For the centerbox to show up underneath your product page:

  • Go to includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php and find: <!--bof also purchased products module--> <?php require($template->get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');?> <!--eof also purchased products module-->

and add this below:

<!--bof recent products module--> <?php require($template->get_template_dir ('tpl_modules_recent_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates') . '/tpl_modules_recent_products.php'); ?> <!--eof recent products module-->

How ever I do not see the Recently Viewed items at all on the products page. I am not sure if it has to with Tabbed pro code or I did some thing wrong. Can anyone help?

I enabled SINGLE COLUMN STATUS to ON in sideboxes/recent_products in TOOLS >Layout BOXES CONTROLLER.
When I enable left/right column status to ON and Location to LEFT.
I get to see the recent viewed items however the images appear as very large images and throws the whole web page out (that is a another problem for latter) . So I know the module works. I would like to have the recently viewed items appear below my home, categories and products pages.

To view the site i am working on https://www.naturallyahimsa.org

The tpl_product_info_display.php info is below.


<?php /** * Template designed by zen-cart-power.net* * Power your Zen Cart! * @copyright Copyright 2008-2011 Newlement */ ?> <!-- bof Get reviews section --> <?php $review_status = " and r.status = '1'"; /* This is where you change the parameter value to output 1000 charaters or equivelent */ $reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 1000) as reviews_text, r.reviews_rating, r.date_added, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$_GET['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$_SESSION['languages_id'] . "'" . $review_status . " order by r.reviews_id desc"; $reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS); ?> <!-- eof Get reviews section --> <!-- bof Get additional images--> <?php require(DIR_WS_MODULES . zen_get_module_directory('additional_images.php')); ?> <!-- eof Get additional images--> <!-- VINNY TABBED PRO INSERT --> <?php //BOF :: Tabbed Products Pro :: require(DIR_WS_MODULES . 'tabbed_products_pro.php'); //EOF :: Tabbed Products Pro :: ?> <!-- VINNY TABBED PRO INSERT --> <div class="centerColumn" id="productGeneral"> <!--bof Product Name--> <h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1> <!--eof Product Name--> <!--bof Form start--> <?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data"') . "\n"; ?> <!--eof Form start--> <?php if ($messageStack->size('product_info') > 0) echo $messageStack->output('product_info'); ?> <!--bof Category Icon --> <?php if ($module_show_categories != 0) {?> <?php /** * display the category icons */ require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?> <?php } ?> <!--eof Category Icon --> <!--bof Prev/Next top position --> <?php if (PRODUCT_INFO_PREVIOUS_NEXT == 1 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?> <?php /** * display the product previous/next helper */ require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?> <?php } ?> <!--eof Prev/Next top position--> <div class="right-side-info float-right"> <!--bof Product Price block --> <span id="productPricesDetails" class="productGeneral"> <?php // base price if ($show_onetime_charges_description == 'true') { $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />'; } else { $one_time = ''; } echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : TEXT_PRICE) . zen_get_products_display_price((int)$_GET['products_id']); ?></span> <!--eof Product Price block --> <!--bof free ship icon --> <?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?> <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div> <?php } ?> <!--eof free ship icon --> <?php if ($flag_show_product_info_reviews == 1) { if ($reviews->fields['count'] > 0 ) { ?> <div id="productReviewRating"> <?php //echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $stars_image_suffix . '.gif', sprintf('stars_', get_product_rating($_GET['products_id'])));

echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . get_product_rating($GET['products_id']) . '.gif', 'stars'. get_product_rating($GET['products_id']));
//echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params()) . '">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars
' . get_product_rating($GET['products_id']) . '.gif', 'stars'. get_product_rating($_GET['products_id'])) . '</a>';
?>

</div> <?php } } ?> <!--bof Product details list --> <?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?> <ul id="productDetailsList" class="floatingBox back"> <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li><span class="product-info-label">' . TEXT_PRODUCT_MODEL . '</span>' . $products_model . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li><span class="product-info-label">' . TEXT_PRODUCT_WEIGHT . '</span>' . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_quantity == 1) ? '<li><span class="product-info-label">'. TEXT_PRODUCT_QUANTITY . '</span>' . $products_quantity . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li><span class="product-info-label">' . TEXT_PRODUCT_MANUFACTURER . '</span>' . $manufacturers_name . '</li>' : '') . "\n"; ?> </ul> <div class="clearBoth"></div> <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style clearBoth"> <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> <a class="addthis_button_tweet"></a> <a class="addthis_counter addthis_pill_style"></a> </div> <script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script> <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=<?php echo LINKS_ADDTHIS_SERVICE_USERNAME; ?>"></script> <!-- Translate --> <!-- AddThis Button END --> <?php } ?> <!--eof Product details list --> <!--bof Attributes Module --> <?php if ($pr_attr->fields['total'] > 0) { ?> <hr /> <?php /** * display the product atributes */ require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?> <?php } ?> <!--eof Attributes Module --> <!--bof Quantity Discounts table --> <?php if ($products_discount_type != 0) { ?> <?php /** * display the products quantity discount */ require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?> <?php } ?> <!--eof Quantity Discounts table --> <div class="clearBoth"></div> <!--bof Add to Cart Box --> <?php if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') { // do nothing } else { ?>
        <?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
        if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
          // hide the quantity box and default to 1
          $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        } else {
          // show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        }
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);

?>

<?php if ($display_qty != '' or $display_button != '') { ?> <hr /> <div id="cartAdd"> <?php echo $display_qty; echo $display_button; ?> </div> <?php } // display qty and button ?> <?php } // CUSTOMERS_APPROVAL == 3 ?> <!--eof Add to Cart Box--> <!-- VINNY wish List added --> <!--bof Wishlist button --> <br/> <br class="clearBoth" /> <?php if (UN_MODULE_WISHLISTS_ENABLED) { if ( $_SESSION['customer_id'] ) { echo '<div id="productWishlistLink" class="buttonRow back">'; echo zen_image_submit(UN_BUTTON_IMAGE_WISHLIST_ADD, UN_BUTTON_WISHLIST_ADD_ALT, 'name="wishlist" value="yes"'); echo '</div>'; } else { echo '<div>'; echo UN_BOX_WISHLIST_LOGIN_TEXT; echo '</div>'; } } else {} ?> <!--eof Wishlist button --> <!-- VINNY Wish List added --> </div> <div class="left-side-info">
<!--bof Main Product Image -->
<?php 	if (zen_not_null($products_image)) { ?>
<?php

/**
 * display the main product image
 */
require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
<?php } ?> <!--eof Main Product Image--> </div> <!--bof Form close--> </form> <!--bof Form close--> </div> <div class="clearBoth"></div> <!-- VINNY TABBED PRO INSERT --> <?php //BOF :: Tabbed Products Pro :: echo '<div id="tpptabBlock" style="display:none;">' . $tabData . '</div>'; //EOF :: Tabbed Products Pro :: ?> <!-- VINNY TABBED PRO INSERT --> <!--bof Prev/Next bottom position --> <?php if (PRODUCT_INFO_PREVIOUS_NEXT == 2 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?> <?php /** * display the product previous/next helper */ require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?> <?php } ?> <!--eof Prev/Next bottom position --> <!--bof Tell a Friend button --> <?php if ($flag_show_product_info_tell_a_friend == 1) { ?> <div id="productTellFriendLink" class="buttonRow forward"><?php echo ($flag_show_product_info_tell_a_friend == 1 ? '<a href="' . zen_href_link(FILENAME_TELL_A_FRIEND, 'products_id=' . $_GET['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_TELLAFRIEND, BUTTON_TELLAFRIEND_ALT) . '</a>' : ''); ?></div> <?php } ?> <!--eof Tell a Friend button --> <!--bof Reviews button and count--> <?php if ($flag_show_product_info_reviews == 1) { // if more than 0 reviews, then show reviews button; otherwise, show the "write review" button if ($reviews->fields['count'] > 0 ) { ?> <div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params()) . '">' . zen_image_button(BUTTON_IMAGE_REVIEWS, BUTTON_REVIEWS_ALT) . '</a>'; ?></div> <br class="clearBoth" /> <p class="reviewCount"><?php echo ($flag_show_product_info_reviews_count == 1 ? TEXT_CURRENT_REVIEWS . ' ' . $reviews->fields['count'] : ''); ?></p> <?php } else { ?> <div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params(array())) . '">' . zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT) . '</a>'; ?></div> <br class="clearBoth" /> <?php } } ?> <!--eof Reviews button and count --> <!--bof Product date added/available--> <?php if ($products_date_available > date('Y-m-d H:i:s')) { if ($flag_show_product_info_date_available == 1) { ?> <p id="productDateAvailable" class="productGeneral centeredContent"><?php echo sprintf(TEXT_DATE_AVAILABLE, zen_date_long($products_date_available)); ?></p> <?php } } else { if ($flag_show_product_info_date_added == 1) { ?> <?php } // $flag_show_product_info_date_added } ?> <!--eof Product date added/available --> <!--bof Product URL --> <?php if (zen_not_null($products_url)) { if ($flag_show_product_info_url == 1) { ?>
<p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
<?php } // $flag_show_product_info_url } ?> <!--eof Product URL --> <!--bof also purchased products module--> <?php require($template->get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');?> <!--eof also purchased products module--> <!-- VINNY RECENTLY VIEWED ON CENTRE BOX INSERT --> <!--bof recent products module--> <?php require($template->get_template_dir ('tpl_modules_recent_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates') . '/tpl_modules_recent_products.php'); ?> <!--eof recent products module--> <!-- VINNY RECENTLY VIEWED ON CENTRE BOX INSERT --> <!-- VINNY TABBED PRO INSERT --> <?php //BOF :: Tabbed Products Pro :: echo $tabjscript; //BOF :: Tabbed Products Pro :: ?> <!-- VINNY TABBED PRO INSERT -->

Thanks all