Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recently Viewed Products


Guest

Recommended Posts

I tried installing the variation posted by amanda but found it would only display the current product being viewed rather than keeping track of all previously viewed products. Hitting the "Erase" language only reloaded the page with the same product being shown as viewed (the one being viewed, not any prior products viewed). I then tried the original contribution and it seems to be working fine (except when I run cookie_cleanup it never seems to find any rows affected, which I find hard to believe).

 

Any suggestions on what might be the problem with the amanda mod? Any thoughts on the cookie issue?

Link to comment
Share on other sites

  • Replies 92
  • Created
  • Last Reply

Top Posters In This Topic

I tried installing the variation posted by amanda but found it would only display the current product being viewed rather than keeping track of all previously viewed products.  Hitting the "Erase" language only reloaded the page with the same product being shown as viewed (the one being viewed, not any prior products viewed).  I then tried the original contribution and it seems to be working fine (except when I run cookie_cleanup it never seems to find any rows affected, which I find hard to believe).

 

Any suggestions on what might be the problem with the amanda mod?  Any thoughts on the cookie issue?

I think I figured out the cookie issue. I need to wait longer (nothing had expired yet). Any thoughts on the amanda mod guys? Has anyone else installed it using the manual install instructions?

Link to comment
Share on other sites

I tried installing the variation posted by amanda but found it would only display the current product being viewed rather than keeping track of all previously viewed products.  Hitting the "Erase" language only reloaded the page with the same product being shown as viewed (the one being viewed, not any prior products viewed).  I then tried the original contribution and it seems to be working fine (except when I run cookie_cleanup it never seems to find any rows affected, which I find hard to believe).

 

Any suggestions on what might be the problem with the amanda mod?  Any thoughts on the cookie issue?

 

 

let me try :

 

 

In application_top.php:

 

 

after:

 

// include shopping cart class

require(DIR_WS_CLASSES . 'shopping_cart.php');

 

I have:

 

require(DIR_WS_CLASSES . 'viewed_products.php');

 

 

after:

 

// create the shopping cart & fix the cart if necesary

if (tep_session_is_registered('cart') && is_object($cart)) {

if (PHP_VERSION < 4) {

$broken_cart = $cart;

$cart = new shoppingCart;

$cart->unserialize($broken_cart);

}

} else {

tep_session_register('cart');

$cart = new shoppingCart;

}

 

I have:

 

if (((tep_session_is_registered('customer_id')) or (ENABLE_PAGE_CACHE == 'false')) and (!$spider_flag)){

if (!is_object($viewed)) {

tep_session_register('viewed');

$viewed = new viewed_products;

$viewed->viewed_items = array();

}

}

 

 

after:

 

case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {

if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));

} else {

$cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

 

I have:

 

case 'viewed_remove' : $viewed->remove();

break;

 

 

In product_info.php:

 

after:

 

<?php require(DIR_WS_INCLUDES . 'footer.php');

 

I have:

 

if (((tep_session_is_registered('customer_id')) or (ENABLE_PAGE_CACHE == 'false')) and (substr(basename($PHP_SELF), 0, 8) != 'checkout') and ($spider_flag == false)) {

$viewed->add_viewed($HTTP_GET_VARS['products_id']);

}

?>

 

In footer.php:

 

I Have:

 

<?php

if (((tep_session_is_registered('customer_id')) or (ENABLE_PAGE_CACHE == 'false')) and (substr(basename($PHP_SELF), 0, 8) != 'checkout') and ($spider_flag == false)) {

if ($viewed->count_viewed() > 0) {

require(DIR_WS_MODULES . 'viewed_products.php');

}

}

?>

 

 

If in doubt, the first thing I would recommend is to remove the IF statements.

So do not check on the IF variables if you do not use these variables.

 

amanda.

Treasurer MFC

Link to comment
Share on other sites

I'm guessing that the addition of

 

case 'viewed_remove' : $viewed->remove();

break;

 

in application_top.php might have something to do with it, but I'm happy with the original contribution, so we may never know. Thanks for the response though.

 

Dave

Link to comment
Share on other sites

I think I figured out the cookie issue.  I need to wait longer (nothing had expired yet).  Any thoughts on the amanda mod guys?  Has anyone else installed it using the manual install instructions?

 

 

The screenshots of the enhancement look great but I just wanted to chime in that I'm having the exact same problems as baddog. Any further ideas why this is happening?

 

Thanks,

Mike

Link to comment
Share on other sites

The screenshots of the enhancement look great but I just wanted to chime in that I'm having the exact same problems as baddog.  Any further ideas why this is happening?

 

Thanks,

Mike

 

That is strange, did you try it without the IF statements:

 

if (((tep_session_is_registered('customer_id')) or (ENABLE_PAGE_CACHE == 'false')) and (substr(basename($PHP_SELF), 0, 8) != 'checkout') and ($spider_flag == false)) {

 

so just the bare statements like:

 

$viewed->add_viewed($HTTP_GET_VARS['products_id']);

 

in product_info etc.?

Treasurer MFC

Link to comment
Share on other sites

That is strange, did you try it without the IF statements:

 

if (((tep_session_is_registered('customer_id')) or (ENABLE_PAGE_CACHE == 'false')) and (substr(basename($PHP_SELF), 0, 8) != 'checkout') and ($spider_flag == false)) {

 

so just the bare statements like:

 

$viewed->add_viewed($HTTP_GET_VARS['products_id']);

 

in product_info etc.?

 

 

Then I tried removing the IF condition, I get the following error:

 

Fatal error: Call to a member function on a non-object in C:\dev\Apache2\htdocs\osc\product_info.php on line 18

 

Line 18 is:

 

$viewed->add_viewed($HTTP_GET_VARS['products_id']);

 

 

To prevent the error, I tried adding the following line before line 18:

 

require(DIR_WS_CLASSES . 'viewed_product.php');

 

But then I get the cannot redeclare object error.

 

 

Any ideas with the new info?

 

Thanks,

Mike

Link to comment
Share on other sites

Then I tried removing the IF condition, I get the following error:

 

Fatal error: Call to a member function on a non-object in C:\dev\Apache2\htdocs\osc\product_info.php on line 18

 

Line 18 is:

 

$viewed->add_viewed($HTTP_GET_VARS['products_id']);

To prevent the error, I tried adding the following line before line 18:

 

require(DIR_WS_CLASSES . 'viewed_product.php');

 

But then I get the cannot redeclare object error.

Any ideas with the new info?

 

Thanks,

Mike

 

 

mike,

 

are you sure you have

 

 

if (!is_object($viewed)) {

tep_session_register('viewed');

$viewed = new viewed_products;

$viewed->viewed_items = array();

}

 

in your application_top ?

Treasurer MFC

Link to comment
Share on other sites

mike,

 

are you sure you have

if (!is_object($viewed)) {

tep_session_register('viewed');

$viewed = new viewed_products;

$viewed->viewed_items = array();

}

 

in your application_top ?

 

 

Yes, I do have that code block in application.top. In fact, I followed your installation instructions to the letter.

 

I've been fiddling around so much to try to make it work. When the Recently Viewed box doesn't appear what does that mean?

 

Mike

Link to comment
Share on other sites

Yes, I do have that code block in application.top.  In fact, I followed your installation instructions to the letter.

 

I've been fiddling around so much to try to make it work.  When the Recently Viewed box doesn't appear what does that mean?

 

Mike

 

basically what how it works or should work:

 

in application_top you define the class and register the array as a session variable.

 

require(DIR_WS_CLASSES . 'viewed_products.php');

 

if (!is_object($viewed)) {

tep_session_register('viewed');

$viewed = new viewed_products;

$viewed->viewed_items = array();

}

 

 

everytime you visit a product_info page, the product id gets added to the array with:

 

$viewed->add_viewed($HTTP_GET_VARS['products_id']);

 

 

in the footer or wherever you include the module, it checks if the array contains any product id's. If it does not, the box will not display. If it does, it displays.

 

if ($viewed->count_viewed() > 0) {

require(DIR_WS_MODULES . 'viewed_products.php');

}

 

 

that is all there is to it.

 

Do you have the debug mod installed so you can see the session variables ?

 

that would give you something like this :

 

SESSION:

 

Array

(

[cart] => shoppingcart Object

(

[contents] => Array

(

)

 

[total] => 0

[weight] => 0

[cartID] =>

[content_type] =>

)

 

[viewed] => viewed_products Object

(

[viewed_items] => Array

(

[464] => 1

[463] => 1

[461] => 1

[468] => 1

[246] => 1

[99] => 1

[430] => 1

[120] => 1

[426] => 1

[459] => 1

[462] => 1

)

 

)

Treasurer MFC

Link to comment
Share on other sites

basically what how it works or should work:

 

in application_top you define the class and register the array as a session variable.

 

require(DIR_WS_CLASSES . 'viewed_products.php');

 

if (!is_object($viewed)) {

  tep_session_register('viewed');

  $viewed = new viewed_products;

  $viewed->viewed_items = array();

}

everytime you visit a product_info page, the product id gets added to the array with:

 

$viewed->add_viewed($HTTP_GET_VARS['products_id']);

in the footer or wherever you include the module, it checks if the array contains any product id's. If it does not, the box will not display. If it does, it displays.

 

if ($viewed->count_viewed() > 0) {

  require(DIR_WS_MODULES . 'viewed_products.php');

}

that is all there is to it.

 

Do you have the debug mod installed so you can see the session variables ?

 

that would give you something like this :

 

SESSION:

 

Array

(

    [cart] => shoppingcart Object

        (

            [contents] => Array

                (

                )

 

            [total] => 0

            [weight] => 0

            [cartID] =>

            [content_type] =>

        )

 

    [viewed] => viewed_products Object

        (

            [viewed_items] => Array

                (

                    [464] => 1

                    [463] => 1

                    [461] => 1

                    [468] => 1

                    [246] => 1

                    [99] => 1

                    [430] => 1

                    [120] => 1

                    [426] => 1

                    [459] => 1

                    [462] => 1

                )

 

        )

 

 

 

Hi Amanda,

 

Thanks for all your responses. Here's something strange. When I insert some debugging code to the following in application.top:

 

if (((tep_session_is_registered('customer_id')) or (ENABLE_PAGE_CACHE == 'false')) and (!$spider_flag)){

if (!is_object($viewed)) {

echo 'viewed object created';

tep_session_register('viewed');

$viewed = new viewed_products;

$viewed->viewed_items = array();

}

}

 

The debugging message is shown at the top of EVERY page I request. This is telling me that the session object isn't being retained for some reason. Unless I'm misunderstanding the symptoms, this 'viewed object created' message should only be displayed once (when the $viewed object is created).

 

Does this help deciper the cause of the problem? Currently, the Recently Viewed box only shows the currently viewed item and never adds to the list -- i.e., only one item is ever shown in the box.

 

Thanks,

Mike

Link to comment
Share on other sites

Hi Amanda,

 

Thanks for all your responses.  Here's something strange.  When I insert some debugging code to the following in application.top:

 

if (((tep_session_is_registered('customer_id')) or (ENABLE_PAGE_CACHE == 'false')) and (!$spider_flag)){

if (!is_object($viewed)) {

echo 'viewed object created';

tep_session_register('viewed');

$viewed = new viewed_products;

$viewed->viewed_items = array();

}

}

 

The debugging message is shown at the top of EVERY page I request.  This is telling me that the session object isn't being retained for some reason.  Unless I'm misunderstanding the symptoms, this 'viewed object created' message should only be displayed once (when the $viewed object is created).

 

Does this help deciper the cause of the problem?  Currently, the Recently Viewed box only shows the currently viewed item and never adds to the list -- i.e., only one item is ever shown in the box.

 

Thanks,

Mike

 

 

Amanda,

 

By the way, no, I don't have the debug mod installed (at least I don't think so). I'm currently running OSC on a test server and I don't have root access to config the server.

 

Mike

Link to comment
Share on other sites

Amanda,

 

By the way, no, I don't have the debug mod installed (at least I don't think so).  I'm currently running OSC on a test server and I don't have root access to config the server.

 

Mike

 

 

what if you tried this :

 

if (tep_session_is_registered('viewed') && is_object($viewed)) {

} else {

echo 'viewed object created';

tep_session_register('viewed');

$viewed = new viewed_products;

}

 

this is the same condition as used for the shoppingcart just above :

 

// create the shopping cart & fix the cart if necesary

if (tep_session_is_registered('cart') && is_object($cart)) {

if (PHP_VERSION < 4) {

$broken_cart = $cart;

$cart = new shoppingCart;

$cart->unserialize($broken_cart);

}

} else {

tep_session_register('cart');

$cart = new shoppingCart;

}

Treasurer MFC

Link to comment
Share on other sites

what if you tried this :

 

if (tep_session_is_registered('viewed') && is_object($viewed)) {

} else {

    echo 'viewed object created';

    tep_session_register('viewed');

    $viewed = new viewed_products;

  }

 

this is the same condition as used for the shoppingcart just above :

 

// create the shopping cart & fix the cart if necesary

  if (tep_session_is_registered('cart') && is_object($cart)) {

    if (PHP_VERSION < 4) {

      $broken_cart = $cart;

      $cart = new shoppingCart;

      $cart->unserialize($broken_cart);

    }

  } else {

    tep_session_register('cart');

    $cart = new shoppingCart;

  }

 

 

 

Sorry, I'm a Java dude and a PHP newbie so I apologize that some of my questions may seem elementary.

 

I did try what you suggested but that didn't change the behavior.

 

What version of PHP are you running? I'm on 4.3.6.

 

Mike

Link to comment
Share on other sites

Sorry, I'm a Java dude and a PHP newbie so I apologize that some of my questions may seem elementary.

 

I did try what you suggested but that didn't change the behavior.

 

What version of PHP are you running?  I'm on 4.3.6.

 

Mike

 

 

same here, maybe it has something to do with the settings in php.ini though.

 

not sure if you can access yours but mine reads this about sessions :

 

 

[session]

; Handler used to store/retrieve data.

session.save_handler = files

 

; Argument passed to save_handler. In the case of files, this is the path

; where data files are stored. Note: Windows users have to change this

; variable in order to use PHP's session functions.

; As of PHP 4.0.1, you can define the path as:

; session.save_path = "N;/path"

; where N is an integer. Instead of storing all the session files in

; /path, what this will do is use subdirectories N-levels deep, and

; store the session data in those directories. This is useful if you

; or your OS have problems with lots of files in one directory, and is

; a more efficient layout for servers that handle lots of sessions.

; NOTE 1: PHP will not create this directory structure automatically.

; You can use the script in the ext/session dir for that purpose.

; NOTE 2: See the section on garbage collection below if you choose to

; use subdirectories for session storage

session.save_path = c:/temp

 

; Whether to use cookies.

session.use_cookies = 1

 

; This option enables administrators to make their users invulnerable to

; attacks which involve passing session ids in URLs; defaults to 0.

; session.use_only_cookies = 1

 

; Name of the session (used as cookie name).

session.name = PHPSESSID

 

; Initialize session on request startup.

session.auto_start = 0

 

; Lifetime in seconds of cookie or, if 0, until browser is restarted.

session.cookie_lifetime = 0

 

; The path for which the cookie is valid.

session.cookie_path = /

 

; The domain for which the cookie is valid.

session.cookie_domain = www.crystallight.com.tw

 

; Handler used to serialize data. php is the standard serializer of PHP.

session.serialize_handler = php

 

; Define the probability that the 'garbage collection' process is started

; on every session initialization.

; The probability is calculated by using gc_probability/gc_divisor,

; e.g. 1/100 means there is a 1% chance that the GC process starts

; on each request.

 

session.gc_probability = 1

session.gc_divisor = 100

 

; After this number of seconds, stored data will be seen as 'garbage' and

; cleaned up by the garbage collection process.

session.gc_maxlifetime = 10800

 

; NOTE: If you are using the subdirectory option for storing session files

; (see session.save_path above), then garbage collection does *not*

; happen automatically. You will need to do your own garbage

; collection through a shell script, cron entry, or some other method.

; For example, the following script would is the equivalent of

; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):

; cd /path/to/sessions; find -cmin +24 | xargs rm

 

; PHP 4.2 and less have an undocumented feature/bug that allows you to

; to initialize a session variable in the global scope, albeit register_globals

; is disabled. PHP 4.3 and later will warn you, if this feature is used.

; You can disable the feature and the warning seperately. At this time,

; the warning is only displayed, if bug_compat_42 is enabled.

 

session.bug_compat_42 = 1

session.bug_compat_warn = 1

 

; Check HTTP Referer to invalidate externally stored URLs containing ids.

; HTTP_REFERER has to contain this substring for the session to be

; considered as valid.

session.referer_check =

 

; How many bytes to read from the file.

session.entropy_length = 0

 

; Specified here to create the session id.

session.entropy_file =

 

;session.entropy_length = 16

 

;session.entropy_file = /dev/urandom

 

; Set to {nocache,private,public,} to determine HTTP caching aspects

; or leave this empty to avoid sending anti-caching headers.

session.cache_limiter =

 

; Document expires after n minutes.

session.cache_expire = 60

 

; trans sid support is disabled by default.

; Use of trans sid may risk your users security.

; Use this option with caution.

; - User may send URL contains active session ID

; to other person via. email/irc/etc.

; - URL that contains active session ID may be stored

; in publically accessible computer.

; - User may access your site with the same session ID

; always using URL stored in browser's history or bookmarks.

session.use_trans_sid = 0

Treasurer MFC

Link to comment
Share on other sites

same here, maybe it has something to do with the settings in php.ini though.

 

not sure if you can access yours but mine reads this about sessions :

[session]

; Handler used to store/retrieve data.

session.save_handler = files

 

; Argument passed to save_handler.  In the case of files, this is the path

; where data files are stored. Note: Windows users have to change this

; variable in order to use PHP's session functions.

; As of PHP 4.0.1, you can define the path as:

;    session.save_path = "N;/path"

; where N is an integer.  Instead of storing all the session files in

; /path, what this will do is use subdirectories N-levels deep, and

; store the session data in those directories.  This is useful if you

; or your OS have problems with lots of files in one directory, and is

; a more efficient layout for servers that handle lots of sessions.

; NOTE 1: PHP will not create this directory structure automatically.

;        You can use the script in the ext/session dir for that purpose.

; NOTE 2: See the section on garbage collection below if you choose to

;        use subdirectories for session storage

session.save_path = c:/temp

 

; Whether to use cookies.

session.use_cookies = 1

 

; This option enables administrators to make their users invulnerable to

; attacks which involve passing session ids in URLs; defaults to 0.

; session.use_only_cookies = 1

 

; Name of the session (used as cookie name).

session.name = PHPSESSID

 

; Initialize session on request startup.

session.auto_start = 0

 

; Lifetime in seconds of cookie or, if 0, until browser is restarted.

session.cookie_lifetime = 0

 

; The path for which the cookie is valid.

session.cookie_path = /

 

; The domain for which the cookie is valid.

session.cookie_domain = www.crystallight.com.tw

 

; Handler used to serialize data.  php is the standard serializer of PHP.

session.serialize_handler = php

 

; Define the probability that the 'garbage collection' process is started

; on every session initialization.

; The probability is calculated by using gc_probability/gc_divisor,

; e.g. 1/100 means there is a 1% chance that the GC process starts

; on each request.

 

session.gc_probability = 1

session.gc_divisor    = 100

 

; After this number of seconds, stored data will be seen as 'garbage' and

; cleaned up by the garbage collection process.

session.gc_maxlifetime = 10800

 

; NOTE: If you are using the subdirectory option for storing session files

;      (see session.save_path above), then garbage collection does *not*

;      happen automatically.  You will need to do your own garbage

;      collection through a shell script, cron entry, or some other method.

;      For example, the following script would is the equivalent of

;      setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):

;          cd /path/to/sessions; find -cmin +24 | xargs rm

 

; PHP 4.2 and less have an undocumented feature/bug that allows you to

; to initialize a session variable in the global scope, albeit register_globals

; is disabled.  PHP 4.3 and later will warn you, if this feature is used.

; You can disable the feature and the warning seperately. At this time,

; the warning is only displayed, if bug_compat_42 is enabled.

 

session.bug_compat_42 = 1

session.bug_compat_warn = 1

 

; Check HTTP Referer to invalidate externally stored URLs containing ids.

; HTTP_REFERER has to contain this substring for the session to be

; considered as valid.

session.referer_check =

 

; How many bytes to read from the file.

session.entropy_length = 0

 

; Specified here to create the session id.

session.entropy_file =

 

;session.entropy_length = 16

 

;session.entropy_file = /dev/urandom

 

; Set to {nocache,private,public,} to determine HTTP caching aspects

; or leave this empty to avoid sending anti-caching headers.

session.cache_limiter =

 

; Document expires after n minutes.

session.cache_expire = 60

 

; trans sid support is disabled by default.

; Use of trans sid may risk your users security.

; Use this option with caution.

; - User may send URL contains active session ID

;  to other person via. email/irc/etc.

; - URL that contains active session ID may be stored

;  in publically accessible computer.

; - User may access your site with the same session ID

;  always using URL stored in browser's history or bookmarks.

session.use_trans_sid = 0

 

Thanks for the reply but I don't think the problem is rooted in server settings as many features of OSC depend on session variables. On my build, everything works great except for the recently viewed products infobox (and I have tons of contributions installed).

 

I think the problem is due to either a conflict with another contribution, the PHP version I'm running is different from the author's, or there is something I'm missing from the installation (and I think I've installed everything to the letter of the instructions).

 

Has anyone been successful in installing this contribution as I'm apparently not the only one having problems getting this potentially awesome contribution to work?

 

Mike

Link to comment
Share on other sites

Thanks for the reply but I don't think the problem is rooted in server settings as many features of OSC depend on session variables.  On my build, everything works great except for the recently viewed products infobox (and I have tons of contributions installed).

 

I think the problem is due to either a conflict with another contribution, the PHP version I'm running is different from the author's, or there is something I'm missing from the installation (and I think I've installed everything to the letter of the instructions).

 

Has anyone been successful in installing this contribution as I'm apparently not the only one having problems getting this potentially awesome contribution to work?

 

Mike

 

I am guessing here but maybe the session settings in admin ?

 

mine read :

 

force cookie use = false

check ssl session id = false

check user agent = false

check ip address = false

prevent spider sessions = true

recreate session = false

Treasurer MFC

Link to comment
Share on other sites

I am guessing here but maybe the session settings in admin ?

 

mine read :

 

force cookie use = false

check ssl session id = false

check user agent = false

check ip address = false

prevent spider sessions = true

recreate session = false

 

 

My admin settings are the same. Strange...

 

Mike

Link to comment
Share on other sites

I've just installed the contribution mod of Amanda.

Into admin section I've setup all session value to false, but I don't see this contribution in action.

1) the script into application top, where it goes put? If I put it into upper section, I've a fatal error

2) into install instruction I read: "options for the module products_viewed.php:": where is this file?

I've installed the original contribution, based on cookie, but I've problem that if my cookies are clear, when I'm enter into my web site I can see a long list of products, that I've not see into my session, and when I see the first product my recently viewed box show me this first product.

Thank you

please, visit my website to understand what I say

Edited by 100asa

Skype: centoasa

Skype: remigioruberto

Link to comment
Share on other sites

I've just installed the contribution mod of Amanda.

Into admin section I've setup all session value to false, but I don't see this contribution in action.

1) the script into application top, where it goes put? If I put it into upper section, I've a fatal error

2) into install instruction I read: "options for the module products_viewed.php:": where is this file?

I've installed the original contribution, based on cookie, but I've problem that if my cookies are clear, when I'm enter into my web site I can see a long list of products, that I've not see into my session, and when I see the first product my recently viewed box show me this first product.

Thank you

please, visit my website to understand what I say

 

 

follow these instructions :

 

In application_top.php:

 

 

after:

 

// include shopping cart class

require(DIR_WS_CLASSES . 'shopping_cart.php');

 

I have:

 

require(DIR_WS_CLASSES . 'viewed_products.php');

 

 

after:

 

// create the shopping cart & fix the cart if necesary

if (tep_session_is_registered('cart') && is_object($cart)) {

if (PHP_VERSION < 4) {

$broken_cart = $cart;

$cart = new shoppingCart;

$cart->unserialize($broken_cart);

}

} else {

tep_session_register('cart');

$cart = new shoppingCart;

}

 

I have:

 

if (((tep_session_is_registered('customer_id')) or (ENABLE_PAGE_CACHE == 'false')) and (!$spider_flag)){

if (!is_object($viewed)) {

tep_session_register('viewed');

$viewed = new viewed_products;

$viewed->viewed_items = array();

}

}

 

 

after:

 

case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {

if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));

} else {

$cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

 

I have:

 

case 'viewed_remove' : $viewed->remove();

break;

 

 

In product_info.php:

 

after:

 

<?php require(DIR_WS_INCLUDES . 'footer.php');

 

I have:

 

if (((tep_session_is_registered('customer_id')) or (ENABLE_PAGE_CACHE == 'false')) and (substr(basename($PHP_SELF), 0, 8) != 'checkout') and ($spider_flag == false)) {

$viewed->add_viewed($HTTP_GET_VARS['products_id']);

}

?>

 

In footer.php:

 

I Have:

 

<?php

if (((tep_session_is_registered('customer_id')) or (ENABLE_PAGE_CACHE == 'false')) and (substr(basename($PHP_SELF), 0, 8) != 'checkout') and ($spider_flag == false)) {

if ($viewed->count_viewed() > 0) {

require(DIR_WS_MODULES . 'viewed_products.php');

}

}

?>

Treasurer MFC

Link to comment
Share on other sites

How can I do to disable page cache?

I've disable all session values, and I'm trying to disable page cache by admin section under configuration-->cache-->use cache-->false

It's right?

Skype: centoasa

Skype: remigioruberto

Link to comment
Share on other sites

How can I do to disable page cache?

I've disable all session values, and I'm trying to disable page cache by admin section under configuration-->cache-->use cache-->false

It's right?

 

Hi 100asa,

 

I noticed that you also have the Recently Viewed Products infobox installed (right column). I wonder if the infobox may be conflicting with Amanda's contribution. Amanda, do you also have this installed and running simultaneously?

 

Thanks,

Mike

Link to comment
Share on other sites

Hi 100asa,

 

I noticed that you also have the Recently Viewed Products infobox installed (right column).  I wonder if the infobox may be conflicting with Amanda's contribution.  Amanda, do you also have this installed and running simultaneously?

 

Thanks,

Mike

 

no, I am not running any recently viewed infobox contribution.

Treasurer MFC

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...