Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

if $isset question (easy for any osc veteran)


Guest

Recommended Posts

Posted

i am using chemo's page cache on my product pages.

 

i have a refresh script that reloads the page with new data if the user hits the submit button.. but it is stripped from the url address bar (doesn't show)

 

would i be able to un-cache the product page ONLY when this value is present? if so, how could i do this?

 

i'm guessing something like if ($isset[$HTTP_GET_VARS['value=1']){

 

but my tests seem futile. am i piecing this together wrong.

 

 

the pages cached are in includes/application_top.php:

$cache_pages = array('index.php', 'product_info.php');
if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true') {
# Start the output buffer for the shopping cart
ob_start();
require(DIR_WS_BOXES . 'shopping_cart.php');
$cart_cache = ob_get_clean();
# End the output buffer for cart and save as $cart_cache string

# Loop through the $cache_pages array and start caching if found
foreach ($cache_pages as $index => $page){
	if ( strpos($_SERVER['PHP_SELF'], $page) ){
		include_once(DIR_WS_CLASSES . 'page_cache.php');
		$page_cache = new page_cache($cart_cache);
		# The cache timelife is set globally 
		# in the admin control panel settings
		# Example below overrides the setting to 60 minutes
		# Leave blank to use default setting
		# $page_cache->cache_this_page(60);
		$page_cache->cache_this_page();
	} # End if
} # End foreach
} # End if

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...