Page 4 of 4 FirstFirst ... 234
Results 31 to 37 of 37
  1. #31

    Default Re: Displaying Product Viewed in Product Listing Page

    Quote Originally Posted by DivaVocals View Post
    Just wanted to interject a thought here.. Not sure what the OP's objective is, but wanted to point out that hit counters are a notoriously BAD way to encourage conversion sales.. It's the opposite as a matter of fact.. It's a screaming advertisement to site visitors about how many people MAY or MAY NOT have been to your site. It may not paint the picture most site owners are after when implementing these solutions, which is that your site is a trusted source for whatever product your site is selling.. "Trusted" based solely on nothing more than the number of times a "visitor" clicked off a counter on the site.. IMHO showing featured, or best seller products is a much better way to communicate this message..
    Thank you for your kind advise. It might be... Here I just would like to achieve the function, so as to make sure the code doesn't have a bug to work in Zencart.

    I just tested in my store by the code again and indeed it looks up correct model, and twice are match. But it just could not get correct product view report.

    So far, still could not get working code, maybe I have to give up the funtion...

  2. #32

    Default Re: Displaying Product Viewed in Product Listing Page

    Thank you for your kind advise. It might be... Here I just would like to achieve the function, so as to make sure the code doesn't have any bug to work in Zencart.

    I just tested in my store by the code again and indeed it looks up correct model, and twice are match. But it just could not get correct product view report.

    So far, still could not get working code, maybe I have to give up the funtion...

  3. #33
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Displaying Product Viewed in Product Listing Page

    Because this is driving me nuts ... let's try getting the products_viewed another way ...

    Edit the file:
    /includes/modules/pages/index/main_template_vars.php

    and add the code in RED:
    Code:
      // always add quantity regardless of whether or not it is in the listing for add to cart buttons
      if (PRODUCT_LIST_QUANTITY < 1) {
        $select_column_list .= 'p.products_quantity, ';
      }
    
    // bof: force products_viewed
    $select_column_list .= 'pd.products_viewed,';
    // eof: force products_viewed
    
      // set the product filters according to selected product type
    Then in the file:
    /includes/modules/your_templates_dir/products_listing.php

    use this code for the Case:
    Code:
      case 'PRODUCT_LIST_MODEL':
            $lc_align = '';
    //      $lc_text = $listing->fields['products_model'];
            $lc_text = $listing->fields['products_model'] .
     ( $listing->fields['products_viewed'] > 0 ? '<li>' . 'Views: ' . $listing->fields['products_viewed'] . '</li>' : '') . '<br />';
            break;
    What this does is get the info from the database when all the other data is gathered so that the products_viewed is available like the other information in the listing ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #34
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Displaying Product Viewed in Product Listing Page

    Quote Originally Posted by Eric Chen View Post
    Thank you for your kind advise. It might be... Here I just would like to achieve the function, so as to make sure the code doesn't have a bug to work in Zencart.

    I just tested in my store by the code again and indeed it looks up correct model, and twice are match. But it just could not get correct product view report.

    So far, still could not get working code, maybe I have to give up the funtion...
    Invest your time into building effective sites with good content.. Site counters are passes, notoriously inaccurate and will not provide the benefit you think they will.

    Dump That Free Hit Counter And Start TrackingIt seems that every other web site we visit has some sort of hit counter on the main page, supposedly telling us how many people have been there before us. This week we’re going to address this popular trend, explain why you don’t need one, and what you should be doing instead.
    Most Internet marketers will normally implement a hit counter on their site for one or both of two reasons — to give them a rough estimate of the number of visitors, and/or to give visitors the impression that their site is popular and thus worthy of a good look.
    Let’s consider the first reason. There is nothing wrong with wanting to know how many people have visited your web site, in fact it’s something that you really do need to know. But putting a visible hit counter on your home page is not the answer, especially not one of those free services.
    For one thing, the free services require you to in some way promote their site. For another, they are normally slow and increase the time it takes for your pages to load. But most importantly, a hit counter doesn’t provide you with all of the information you need.
    Just look at any of the top web sites on the Internet. We promise that you will not find a visible hit counter on any of them! That alone should tell you that the common hit counter is worthless. If a visible counter was worthwhile, don’t you think Yahoo or Infoseek would have one?

    You just can’t win with a visible hit counter. If your site does not get many visitors, all it’s going to do is make sure that the visitors you do get know that they are not visiting a popular site. If anything, all this will do is discourage them from exploring your web site in detail.
    On the other hand, maybe your site gets 50,000 visitors a day and you think that letting people know this via a hit counter is a good idea. Not really. If your web site gets lots of traffic it is because you are doing something right, and having a hit counter isn’t going to affect this.
    Unfortunately, what normally happens is that the misguided Internet marketer will set up a visible hit counter on their home page and then artificially inflate their visitor count. This is done in the hopes that it will impress people, but it’s a terribly bad idea and does not work.
    In the early days of the web it was "cool" to have a hit counter on your home page, but they are so commonplace these days that no one pays them any attention anyway. No matter what your reason for using a visible hit counter, we say dump it and start tracking!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #35

    Default Re: Displaying Product Viewed in Product Listing Page

    Quote Originally Posted by Ajeh View Post
    Because this is driving me nuts ... let's try getting the products_viewed another way ...

    Edit the file:
    /includes/modules/pages/index/main_template_vars.php

    and add the code in RED:
    Code:
      // always add quantity regardless of whether or not it is in the listing for add to cart buttons
      if (PRODUCT_LIST_QUANTITY < 1) {
        $select_column_list .= 'p.products_quantity, ';
      }
    
    // bof: force products_viewed
    $select_column_list .= 'pd.products_viewed,';
    // eof: force products_viewed
    
      // set the product filters according to selected product type
    Then in the file:
    /includes/modules/your_templates_dir/products_listing.php

    use this code for the Case:
    Code:
      case 'PRODUCT_LIST_MODEL':
            $lc_align = '';
    //      $lc_text = $listing->fields['products_model'];
            $lc_text = $listing->fields['products_model'] .
     ( $listing->fields['products_viewed'] > 0 ? '<li>' . 'Views: ' . $listing->fields['products_viewed'] . '</li>' : '') . '<br />';
            break;
    What this does is get the info from the database when all the other data is gathered so that the products_viewed is available like the other information in the listing ...
    Wonderful!!! It is working now by inserting the new code programmed in another way. Appreciated...

  6. #36

    Default Re: Displaying Product Viewed in Product Listing Page

    Quote Originally Posted by DivaVocals View Post
    Invest your time into building effective sites with good content.. Site counters are passes, notoriously inaccurate and will not provide the benefit you think they will.
    Thank you again for your kind advise. I will follow it, although now the new code fulfilled the function of products viewed report on products listing page. Anyway, appreciated for all of yours.

  7. #37
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Displaying Product Viewed in Product Listing Page

    Quote Originally Posted by Eric Chen View Post
    Wonderful!!! It is working now by inserting the new code programmed in another way. Appreciated...
    It is really odd that you could not get the function zen_products_lookup to work for the products_viewed but could for everything else ...

    The direct adding of the products_viewed to the SELECT does work around the problem, but you should not have had to do that ...

    NOTE: just a reminder, it is a good time to upgrade to Zen Cart v1.5.4 to get your code up to date!
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. v154 Featured Listing Not displaying on Product Listing Page
    By cyberfolli in forum Templates, Stylesheets, Page Layout
    Replies: 24
    Last Post: 28 Aug 2015, 12:17 AM
  2. Displaying Product Viewed in the product_info_diplay
    By safarce in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 15 Jun 2011, 04:24 PM
  3. Category - Product listing - displaying Defined Page
    By WHOSYOURDADDY in forum Basic Configuration
    Replies: 1
    Last Post: 28 Oct 2009, 07:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR