Budrys Posted November 15, 2017 Share Posted November 15, 2017 My webpage https://galaxybath.co.uk/ I have http in add to cart button: <span class="new-label">New</span> </a><div class="button-container_up"> <a class="button ajax_add_to_cart_button btn btn-default dodaj_do_koszyka" href="http://galaxybath.co.uk/cart?add=1&id_product=1766&token=b1ffdd27046f7997aa3f5df00ead4370" rel="nofollow" title="Add to cart" data-id-product="1766"> </a> That is in "Special" and "New products" modules. How can I find their files? Link to comment Share on other sites More sharing options...
selectshop.at Posted November 15, 2017 Share Posted November 15, 2017 The theme in use is a third party development not respecting Prestashop rules. As I told you before, you should ask the theme developer. The passsage you mentioned is not in a module, but on product_list.tpl of your theme. <a class="button ajax_add_to_cart_button btn btn-default dodaj_do_koszyka1" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}"> The theme is forming the page link wrong. If your site is https: than the link should be also rewritten automatically from http: to https: You need to change on controller or on other central theme file the logic to correct the general link support of https: Ask theme developer. Link to comment Share on other sites More sharing options...
selectshop.at Posted November 15, 2017 Share Posted November 15, 2017 If you don't want to contact developer and ask for debug of your theme, than you can try to add to your .htaccess the following line. Add the hack BEFORE or AFTER, but not inherit Prestashop container. It is a hack, but not the real solution of your problem. This hack will rewrite all pages to https:// BUT slow down you server a little bit. <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L] </IfModule> Link to comment Share on other sites More sharing options...
Budrys Posted November 19, 2017 Author Share Posted November 19, 2017 On 11/15/2017 at 2:24 PM, selectshop.at said: The theme in use is a third party development not respecting Prestashop rules. As I told you before, you should ask the theme developer. The passsage you mentioned is not in a module, but on product_list.tpl of your theme. <a class="button ajax_add_to_cart_button btn btn-default dodaj_do_koszyka1" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}"> The theme is forming the page link wrong. If your site is https: than the link should be also rewritten automatically from http: to https: You need to change on controller or on other central theme file the logic to correct the general link support of https: Ask theme developer. I can't ask him because I finished work with him. I need to fix that on my own. Link to comment Share on other sites More sharing options...
bellini13 Posted November 20, 2017 Share Posted November 20, 2017 The issue is that the theme is coded to always use http, which is wrong class="button ajax_add_to_cart_button btn btn-default dodaj_do_koszyka1" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}"> The 4th parameter to getPageLink is whether or not to use SSL. In this example, the 4th parameter is false. The theme should really default to true, and Prestashop will detect if SSL is being used or not and work properly. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now