Forum Moderators: coopster

Message Too Old, No Replies

Refresh only parts of page possible in PHP?

         

tomhumf

10:40 am on Apr 9, 2009 (gmt 0)

10+ Year Member



Hi,

I'm quite new to PHP but have recently nearly completed a shopping cart. Currently I have some links on the checkout page for the user to modify quantity of items, and remove items. These links go to a process page where functions modify SESSION['cart'] and redirect to the main cart page.

It works fine, apart from when the page is reloaded there is sometimes a big flicker, or you can briefly see the page without the style sheet loaded.

To get around this it would be good to be able the modify SESSION['cart'] and refresh its contents on the page, without loading the whole page.

Is this something that is possible with PHP alone? I have read around it a little and it seems JAVA might be the only way. I am keen for any alternatives you can suggest as I would like to keep the cart free of JAVA if possible.

Thanks

tomhumf

12:54 pm on Apr 9, 2009 (gmt 0)

10+ Year Member



I just had a thought - The process page is currently unstyled as it isn't meant to be seen.

I thought if I could use the same style sheet and layout on the process page, it might eliminate the flicker when returning to cart.

This doesn't seem to be possible though as the process page contains redirects, and I get the 'headers already sent' message...

~~~~~~~~~~~~~

1 hour later

I have made a CSS file specifically for the cart pages, this has left me cut down on loading time and flicker slightly. I also remove some 'addthis' buttons an paypal logos.

It's not too bad now for non SLL operation, when I use SSL though it's still really jumpy. I guess this is down to the time required for encryption, and is maybe unavoidable with my current design?