Post by Dayo » Sat Apr 11, 2009 9:06 pm

I don't know if this affects other browsers but although the application is dynamic, the payments options page (only one I can confirm for sure) is cached in memory and if you remove or add a new payment option, the payment page displays the options you had the last time you visited. This will definitely affect all sorts of pages.

Something like this should be written into the page headers to force browsers not to cache content.

Code: Select all

<?php 
header('Expires: Fri, 1 Jan 1999 00:00:00 GMT'); 
header('Cache-Control: no-store, no-cache, must-revalidate'); 
header('Cache-Control: post-check=0, pre-check=0', FALSE); 
header('Pragma: no-cache'); 
?>

New member

Posts

Joined
Thu Nov 13, 2008 3:27 am

Post by Daniel » Sun Apr 12, 2009 2:26 am

Jesus christ! This is not a bug. You are really paranoid.

I save the information from the shipping modules and payment modules in a session. If I don't do this it means I need to read the xml data from UPS or another shipping module on every page checkout request. This means the system might run slower or UPS might block the site from hitting it so many times.

When ever you update the cart or login / logout the shipping and payment information gets deleted.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Dayo » Sun Apr 12, 2009 3:35 am

Daniel wrote:You are really paranoid.
Sorry for being so irritating ;D

What happened was this. After reinstalling OPC in an attempt to confirm one of the other "bugs", I got to the payments page and realised I had not activated the moneybookers module I wanted to use.

So I logged into the admin on a separate tab and did the activation.

However, I noticed that after going back to the basket and starting the checkout flow, the module was not showing up at payment. For a while, I thought I had done something wrong so I went back into admin, deactivated and reactivated with no luck. Refreshing the page several times didn't help either and neither did logging off and back on.

I then activated paypal in admin and after mucking around for a while, the two both came up. I later went and deactivated paypal and again, even after logging off and on, refreshing and whatnot, the paupal module was still there. The only thing that got rid of it was closing the browser and relaunching it.

I bet that was not how you expected it to work which is why I made the post.

I have edited layout.tpl as follows to stop page caching...

Code: Select all

<base href="<?php echo $base; ?>" />
<!-- no cache headers -->
<meta http-equiv="Expires" content="Fri, 1 Jan 1999 00:00:00 GMT">
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<!-- end no cache headers -->
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/stylesheet.css" />
First and only edit I have made to the code.

New member

Posts

Joined
Thu Nov 13, 2008 3:27 am

Post by Daniel » Sun Apr 12, 2009 5:11 am

just click update on the cart.

after closing down the browser and restarting it should not have shown paypal if it was disabled.


Also logging off it will kill it.

this is the log off code:

Code: Select all

    	if ($this->customer->isLogged()) {
      		$this->customer->logout();
	  		$this->cart->clear();
			
			unset($this->session->data['shipping_address_id']);
			unset($this->session->data['shipping_method']);
			unset($this->session->data['shipping_methods']);
			unset($this->session->data['payment_address_id']);
			unset($this->session->data['payment_method']);
			unset($this->session->data['payment_methods']);
			unset($this->session->data['comment']);
			unset($this->session->data['order_id']);
			unset($this->session->data['coupon']);
			
      		$this->redirect($this->url->https('account/logout'));
    	}
after never using safari before I have found it is very buggy and does things the wrong way.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: No registered users and 5 guests