Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Losing all style information when checking out


Luk1

Recommended Posts

Hoping someone can help.  I am in the process of having to move a store to a new host as my old one is shutting up shop.  Things seem generally to be working with one exception.  When I click through from my shopping basket to checkout I lose all formatting from the style sheet.    Anyone have any ideas please?

 

Thanks

 

Link to comment
Share on other sites

If you could post a link that someone can look at it, it might help.

 

Dan

Hi Dan, the site is not yet live so I can't easily post a link.  To access it in test I had to modify my system hosts file.   I'm new to this forum - is there anyway I can post screen shots or attach files of screen shots?

post-287387-0-29211000-1493668512_thumb.jpg

post-287387-0-35564100-1493668526_thumb.jpg

Link to comment
Share on other sites

You can try....I don't think it will help much though....if you can't provide a link provide as much info at you can...things like the version you are running any changes you've made etc.  Was it working and then stopped.  The more information you can provide the better....something you post might ring a bell with someone.  Keep in mind though that it works out the box so something is wrong with your install/set up so it could be that no one might be able to help without having a look at the actual site.

 

Dan

Link to comment
Share on other sites

You can try....I don't think it will help much though....if you can't provide a link provide as much info at you can...things like the version you are running any changes you've made etc.  Was it working and then stopped.  The more information you can provide the better....something you post might ring a bell with someone.  Keep in mind though that it works out the box so something is wrong with your install/set up so it could be that no one might be able to help without having a look at the actual site.

 

Dan

 

So I have realised that it is something to do with secure/non-secure content.  I spotted a warning that said only secure content was displayed and when I clicked "display all" the formatting corrected itself.  It worked on the old (live) site fine.  My new hosts have copied the site across, set up new databases etc and registered a SSL certificate (whereas I think on the old site we were using a shared certificate).  Initially the cart was showing as empty on checking out - but I realised they had not updated the secure server name in config.  I changed that and the cart and checkout is now working properly - just losing the stylesheet  when I go to checkout - which is, I think from other things I have read, where the SSL kicks in (not that I really understand it!).  It works on the live site (http://lloydsyachtclub.com');

  define('HTTPS_SERVER', 'https://lloydsyachtclub.com');

  define('ENABLE_SSL', true);

  define('HTTP_COOKIE_DOMAIN', 'lloydsyachtclub.com');

  define('HTTPS_COOKIE_DOMAIN', 'lloydsyachtclub.com');

  define('HTTP_COOKIE_PATH', '/merchandise/');

  define('HTTPS_COOKIE_PATH', '/merchandise/');

  define('DIR_WS_HTTP_CATALOG', '/merchandise/');

  define('DIR_WS_HTTPS_CATALOG', '/merchandise/');

  define('DIR_WS_IMAGES', 'images/');

  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

  define('DIR_WS_INCLUDES', 'includes/');

  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

  define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

  define('DIR_FS_CATALOG', '/var/sites/l/lloydsyachtclub.com/public_html/merchandise/');

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

  define('DB_SERVER', 'XXXXXXX');

  define('DB_SERVER_USERNAME', 'XXXXXXXXX');

  define('DB_SERVER_PASSWORD', 'XXXXXXXXXX');           I've removed server details for obvious security reasons!

  define('DB_DATABASE', 'XXXXXXXXXXX');

  define('USE_PCONNECT', 'false');

  define('STORE_SESSIONS', 'mysql');

 

post-287387-0-99245400-1493669899_thumb.jpg

Link to comment
Share on other sites

@@Luk1

 

Works fine for me. Clear your cache or open the site in an incognito browser and see how that works.

You will be looking at the current, live, site. It is a copy on a new host provider that is playing up. That isnt live on DNS name servers yet so can only be viewed by defining a host within one of your system files.

Link to comment
Share on other sites

According to your configure.php posted above it is lloydsyachtclub.com (forward slash) merchandise, or did you smudge the actual address?

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

According to your configure.php posted above it is lloydsyachtclub.com (forward slash) merchandise, or did you smudge the actual address?

Thats right. The live site is working fine. The test site IP has not yet been published to the name servers so I'm accessing it by defining the IP within my drivers/etc/hosts file.

Link to comment
Share on other sites

@@Luk1 The problem you describe is usually due to the ssl cert not working. If you have a cert for lloydsyachtclub.com and it is working and your new site is something like lloydsyachtclub.com/newsite/, then the ssl cert will work for the new site as long as its configure file is setup properly. But if you have it setup to load using a different url or IP, the cert won't work for it. I suggest you disable the ssl option in the configure file and see if it works. If it does, then it is due to the ssl cert not working with the sites name.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@@Jack_mcs

 

The link I mentioned above has no cert on the base URL but does have a host supplied secure section (web116.secure-secure.co.uk). If that's the case his configure.php is misconfigured.

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

@@Luk1 The problem you describe is usually due to the ssl cert not working. If you have a cert for lloydsyachtclub.com and it is working and your new site is something like lloydsyachtclub.com/newsite/, then the ssl cert will work for the new site as long as its configure file is setup properly. But if you have it setup to load using a different url or IP, the cert won't work for it. I suggest you disable the ssl option in the configure file and see if it works. If it does, then it is due to the ssl cert not working with the sites name.

I disabled SSL and the problem disappeared. The site uses a template (ie goes beyond the proven "out of the box" osCommerce) so I wonder whether there is something in it's stylesheet - or how it is called - that is causing the problem. If the SSL cert was not configured properly then wouldn't you expect the whole thing to die when it calls what is meant to be https components rather than just to lose it's formatting?

Link to comment
Share on other sites

  1. What version of osC are we talking about here? You say a "template" is involved -- that could mean anything from replacing a few files to completely replacing the stock osC installation.

What level of PHP and server were you running on before (successfully), and has anything changed on the new host? Old versions of osC can have lots of problems when transplanted to recent PHP levels.

Is the entire site SSL, or just (by default) specific pages with sensitive information? Do other SSL pages work, or are they broken too?

If all SSL pages are broken, check that your certificate matches the domain name you are using -- your host might have dropped or added "www." when they obtained the new certificate. You probably weren't running on a "shared" certificate before -- those generally don't work with PHP code. Are you sure you didn't have a private certificate?

Clear out your caches (any osC-related cache on the server, and your browser's). Work with your host to find any caches on the server end.

If just one SSL-protected page is broken, look at the HTML source code in the browser -- maybe it's specifying http: instead of https: for a style file (CSS). It's odd that just one page would break like this, and the others would work, but maybe the "template" is hard coded to http:? However, this should have made it break on the old system too.

Grill your host as to exactly what they changed in files that they brought over -- maybe they accidentally changed something they shouldn't have.

Link to comment
Share on other sites

I disabled SSL and the problem disappeared. The site uses a template (ie goes beyond the proven "out of the box" osCommerce) so I wonder whether there is something in it's stylesheet - or how it is called - that is causing the problem. If the SSL cert was not configured properly then wouldn't you expect the whole thing to die when it calls what is meant to be https components rather than just to lose it's formatting?

The problem is that everyone is having to guess at your setup, as in Franks post. You posted one configure file but said it wasn't the one for the shop with the problem, as I understand it. Without any change to your configure file (with ssl disabled), you should be able to go to https://your domain name/login.php and have the page load normally. If it does, then the ssl for that domain name is working and the other pages probably have a link to some non-secure location. If it doesn't work, then the ssl is not working correctly and you would need to look into that.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 3 weeks later...
On 1.5.2017 at 10:59 PM, frankl said:

@@Luk1

 

Works fine for me. Clear your cache or open the site in an incognito browser and see how that works.

I had the same problem and i I opened the site in an incognito browser and it worked! You are absolutely brilliant! I wouldn't have thought that on my own...Thanks!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...