Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Recently Viewed Products(sales optimized)


b00

Recommended Posts

@@raiwa

Hi Rainer

 

Many thanks, 2nd option worked a treat.

 

Do I have to change a setting somewhere, as the "recently viewed" page still shows all products I have viewed in the last few days and doesn't seem to 'refresh". The computer gets turned of each day, I have reloaded the page, closed and opened a new tab with the site in it., but I still get pages of products viewed. So Im thinking there must be a setting somewhere I need to set/change.

www.grandpas.co.nz?BS234

 

Look forward to your comments.

 

Many thanks

John

Edited by grandpaj
Link to comment
Share on other sites

Hello john @@grandpaj,

 

I would say this is defined in the cookie lifetime.

Have a look in application_top.php:

// set the session cookie parameters

 and in the session functions:

includes/functions/sessions.php

 

I never changed anything there and do not know more details about.

As I already pointed out, recently viewed uses the same general settings like for example the shopping cart content.

 

To clear the recently viewed products you would need to delete the oscommerce cookie in your browser.

 

regards

Rainer

Link to comment
Share on other sites

  • 2 weeks later...

@@raiwa

 

Hi Rainer

 

Once again its me.

 

Just a thought.

Is there anyway that when the "recently viewed" is viewed in list mode that all the description 

text could be to the right(or left) of the image and not wrapped around as current.

I thnik it might look a little tidier.

 

Look forward to your comments

 

Many thanks

 

Grandpa

Link to comment
Share on other sites

Hello John @@grandpaj,

 

Which module are you referring to?? As far as I know there is no recently viewed module supporting list mode, they are all for grid mode. Could you please post a screenshot.

 

regards

Rainer

Link to comment
Share on other sites

Hello John @@grandpaj,

 

the standard product listing module is used there and the same happens in the category product listing, new products and specials page.

So nothing to do with recently viewed.

 

rgds

Rainer

Link to comment
Share on other sites

Just trying to get Recently viewed v3.2r1 to run.  I have uploaded all the new files and the 3 mod files.  Now I'm at setting up admin.  I got past A & B.  Hit a road bump at C  admin > Modules > content :  install Module: Recently Viewed.

 

Just as soon as I click on modules > content I get the following error: 
Fatal error: Cannot redeclare tep_version_readonly() (previously declared in /home/ladybug3597/public_html/osc234/includes/functions/recently_viewed.php:42) in /home/ladybug/public_html/osc234/admin/includes/functions/related_products_funcs.php on line 18

 

Line 18 reads:  } 

   This is after the line - return $version_text;

 

The code is:

        function tep_version_readonly($value){
          $version_text = '<br>Version ' . $value;
          return $version_text;
        }

        function tep_get_products_model($product_id) {
          $product_query = tep_db_query("select products_model from products where products_id = '" . (int)$product_id . "'");
          $product = tep_db_fetch_array($product_query);

          return $product['products_model'];
        }

I had no problem with content until now.  Any ideas? 

 

Dean

Link to comment
Share on other sites

@@dculley

Probably the function function tep_version_readonly($value) is already used in another cm ... Comment it out and see what happens ...

 

Moreover ... Do not post your actual Path in a forum ... Mask it up! It could give you hacking attempts ..

Edited by azpro
Link to comment
Share on other sites

Hello Dean @@dculley,

 

Wrap this around the function:

  if(!function_exists('tep_version_readonly')) {
        function tep_version_readonly($value){
          $version_text = '<br>Version ' . $value;
          return $version_text;
        }
  }
Edited by raiwa
Link to comment
Share on other sites

@@raiwa

 

The above is how it reads already in the includes/functions/recently_viewed.php.  Not sure what you want me to do. Add the  if(!function_exists('tep_version_readonly')) {   to the line in related_products_funcs.php or what. 

-or-

commit out the one in the recently viewed or the one in related products.

Link to comment
Share on other sites

@@dculley

 

find:

        function tep_version_readonly($value){
          $version_text = '<br>Version ' . $value;
          return $version_text;
        }

change to:

  if(!function_exists('tep_version_readonly')) {
        function tep_version_readonly($value){
          $version_text = '<br>Version ' . $value;
          return $version_text;
        }
  }

difference (wrap this around):

  if(!function_exists('tep_version_readonly')) {
...
...
...
  }
Edited by raiwa
Link to comment
Share on other sites

Sorry for the delay in testing, had to step out. 

 

Added the wrap around in admin/includes/functions/related_products_functions.php and that worked.  Thank you so much for your help. :)

 

Dean

Link to comment
Share on other sites

  • 1 month later...

@@raiwa

 

Hi Rainer

 

Just wondering if it would be possible to have a little text added. To show something like the "Recently Viewed" mnodule can show.

 

Hope this makes some sort of sense.

 

Cheers

 

Grandpa

Link to comment
Share on other sites

Hello John @@grandpaj,

 

I'm very sorry, but I do not understand. Where do you wish to add the text??

 

regards

Rainer

Link to comment
Share on other sites

@@raiwa

 

HI Rainer

 

Sorry, should have posted this in Related Products support, what I meant was to be able to have text the same as Recently Visited addon.

 

Hope that clarifies, I know my explanation is not that good.

 

Cheers

 

Grandpa

Link to comment
Share on other sites

Hello John @@grandpaj,

 

Sorry, still not sure if I got it now. If you refer to the product description which is available for recently viewed, but not included in related products:

In my opinion it is somewhat over engineered to include it. It was in the original recently viewed add-on, so I left it. 

 

If you wish to show it in the related products module, just have alook in the recently viewed module and add the entrances for product_description to the databse query.

Then to show it, just use the example of the recently module :

  below:              // Show the products description if selected in Admin
 

 

Hope this helps

regards

Rainer

Link to comment
Share on other sites

  • 4 weeks later...

@@raiwa

 

Hi Rainer :)

 

Just a small typo;

When you look at the settings in the module (admin side) it shows this.

 

Show the VIEW and BUY buttons
Show the MORE button in the Recently Viewed module?

True
False

Show the product MORE button
Show the  VIEW  and BUY buttons in t he Recently Viewed module?

True
False

 

I added some color for more clear visual understanding. ;)

Link to comment
Share on other sites

Hello @@Tsimi,

 

There is no "Buy" button in the BS version.This feature has been removed to avoid modifications in application_top and simplify installation. Did I miss something or do you refer to the old standard version??

 

My version 3.2r1 BS shows this:

Show the product MORE button
Show the MORE button in the Recently Viewed module?

 

regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

Hello @@Tsimi,

 

Yes, we are bot half wrong half right :)

 

 

I checked the product info module and there it is ok.

In the index module there is a mess, but the solution is to merge both lines together and take off the MODULE_CONTENT_INDEX_RECENTLY_VIEWED_SHOW_VIEW_BUY_BUTTON constant and configuration entrance. As I said it is not used any more in the code.

 

Here the correct fix line 230-232:

      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Show the product price', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_SHOW_PRICE', 'True', 'Show the product price in the Recently Viewed module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Show the product MORE button', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_SHOW_BUTTON', 'True', 'Show the MORE button in the Recently Viewed module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Product order', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_DISPLAY_ORDER', 'Newest', 'Show the oldest or newest product at the beginning of the Recently Viewed module?', '6', '1', 'tep_cfg_select_option(array(\'Newest\', \'Oldest\'), ', now())");

and then line 242:

      return array('MODULE_CONTENT_INDEX_RECENTLY_VIEWED_VERSION_INSTALLED', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_STATUS', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_CONTENT_WIDTH', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_SORT_ORDER', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_CONTENT_LIMIT', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_SHOW_IMAGE', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_SHOW_NAME', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_WORD_LENGTH', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_NAME_LENGTH', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_SHOW_DESCRIPTION', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_DESCRIPTION_LENGTH', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_SHOW_PRICE', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_SHOW_BUTTON', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_DISPLAY_ORDER', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_HEIGHT_MODE', 'MODULE_CONTENT_INDEX_RECENTLY_VIEWED_HEIGHT_VALUE');

Please confirm and I'll upload the fix.

 

Thank you and kindest regards

Rainer

Link to comment
Share on other sites

Link to comment
Share on other sites

@@raiwa

 

Sorry Rainer I didn't had time to check it yet but I am sure it is alright.

I didn't look at the product info module yet and therefore didn't compare them. I should have probably done that in the first place.

Thanks for the upload. As always great work. :thumbsup:

Link to comment
Share on other sites

@raiwa - great addon.  I'm testing it out now.  Please note this minor typo. Otherwise, everything integrates easily.

 

catalog\includes\modules\content\product_info\cm_pi_recently_viewed.php

 

line 250:

 

      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Reviews Module', 'MODULE_CONTENT_PRODUCT_INFO_RECENTLY_VIEWED_STATUS', 'True', 'Should the recently_viewed block be shown on the product info page?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
 

should be:

 

      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Recently Viewed Module', 'MODULE_CONTENT_PRODUCT_INFO_RECENTLY_VIEWED_STATUS', 'True', 'Should the recently_viewed block be shown on the product info page?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...