Jump to content

SSL Problems


Recommended Posts

Hi there

 

I am new to presta so please dont kill me :)

 

I have tried to activate SSL but I got a funny error message when I try to add a product to the cart

 

the url in the settings is the same for both non-ssl and ssl domain

 

Impossible to add the product to the cart.

 

textStatus: 'error'

errorThrown: ''

responseText:

 

 

could you please suggest why it doesnt work...as it should?

 

 

Thanks in advance

 

Teo

Edited by teodor.boev (see edit history)
Link to comment
Share on other sites

Ok, you should check product-list.tpl file, can you find out there:

 

<a class="exclusive ajax_add_to_cart_button" href="http://..." title="Add to cart">Add to cart</a>

 

and how it looks in your product-list.tpl file?

Link to comment
Share on other sites

if thats the correct snippet ....

 

<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}&token={$static_token}", false)}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>

Edited by teodor.boev (see edit history)
Link to comment
Share on other sites

  • 5 months later...

hello

 

prestashop 1.5.6 has got feature to force ssl connection:

LKMLM1f.png

it;s available under preferneces > general tab in your back office

Many thanks Vekia,

 

I just want to activate SSL in main page, customer account, etc..  but not in all the pages.

 

I have the problem with the ajax cart when I redirect the main page to https.

 

Regards!!

Link to comment
Share on other sites

hello

 

it will be a bit hard to create redirect only for certain pages, why not to use ssl on each page? in my opinion it's much better than ssl only for certain pages.

 

 

im going to check code to find redirects

 

I enabled SSL for customer account identification and order processing, but I want the customer to come into the store to be redirected to https.

 

I use PS 1.5.4.1, and my .htaccess contain:

rewriteengine on
rewritecond %{HTTPS} off
rewritecond %{HTTP_HOST} ^www.domain.com$ [OR]
rewritecond %{HTTP_HOST} ^domain.com$
rewriterule ^$ "https\:\/\/domain\.com\/" [R=301,L]
 

However, with this redirection the ajax cart give me the next error:

"XMLHttpRequest cannot load http://www.domain.com/?rand=1381215842360. Origin https://www.domain.com is not allowed by Access-Control-Allow-Origin."
 
¬¬
 
Many thanks in advance!
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...