Jump to content

Cart problem after changing to SSL


Lesiu

Recommended Posts

Hello,

I successfully added SSL certificate to my store. Hovewer if works fine when I turn on SSL on every page. When I turn it on only on checkout page my cart (blockcart) fails. My store's URL - https://www.krainawody.pl and I have "clean zenism" template. I don't recommend it. My store is PS 1.5.6.0 version. So now it runs fully on https, but when I turn on SSL on checkout page only my blockcart updates when I add a product to a cart. But if I refresh page or change it to another product page it shows 0 products and no total amount. It is ok on checkout page, this is the only page where blockcart works fine. It seems like ajax cart doesn't refresh it's value on refresh, but it should. What's strange - it refreshes vaues when I have SSL on the whole store.

 

Does anybody have a clue what goes wrong? I have modified blockcart on my own so I have popup when I click "add to cart" with "continue shopping" and "checkout" buttons, but it's not it's fault. Yesterday I uploaded original blockcart.tpl and ajax-cart.js and it still didn't refresh blockcart after page refresh.

 

I can upload here those 2 files. I can even create FTP account provided noone breaks anything. I'd like to have SSL only on checkout, but now it's impossible.

 

Please, help.

 

EDIT:

OK, here https://www.prestashop.com/forums/topic/300426-ajax-cart-isnt-opening/ I found similar problem. I had to edit ajax-cart.js na change one GET to POST here:

refresh:function(){$.ajax({type:'POST',url:baseDir+'index.php',async:true,cache:false,dataType:"json",data:'controller=cart&ajax=true&token='+static_token,success:function(jsonData)

Now it works fine, but I don't know if this solution is a good one.

Edited by Lesiu (see edit history)
Link to comment
Share on other sites

  • 1 year later...

To me this solution didn't do the trick.

I found out that what reported here: https://www.prestashop.com/forums/topic/379141-solved-multishop-share-cookiesession/

works like a charm:

 

Quote

 

Create a new override file in: /override/classes/Cookie.php
Paste this code:


<?php

class Cookie extends CookieCore
{
    public function __construct($name, $path = '', $expire = null, $shared_urls = null, $standalone = false)
    {
        parent::__construct('ps');
    }
}

Delete the file: /cache/class_index.php

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...