Jump to content

Move to https problem var $link->getPageLink


yvesima

Recommended Posts

Hello

i' m on Presta 1.6.1.17

I want to move on https. All is ok 

just one link is still on http

Whan i look on the template (.tpl) source i've this code

href="{$link->getPageLink('cart'

i don't know where is incremented this variable

Please can you help me

 

Thanks

Link to comment
Share on other sites

For PS 1.6. responsible file for to get https link is: /config/config.inc.php this block

/* Link should also be initialized in the context here for retrocompatibility */
$https_link = (Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
$context->link = new Link($https_link, $https_link);

/**

 

Link to comment
Share on other sites

  • 5 weeks later...

Hi

i ve send a post to the developper but no reply since...........and several reminders

It was a recommanded theme by prestashop

I ve changed a lot of basedir by

{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}

but there is one ajax link whicch not work

in a .tpl file  i've

{if ($product.allow_oosp || $product.quantity > 0)}
											<p class="addcart_icon">
												{if isset($static_token)}
                                                			<a class="button ajax_add_to_cart_button " href="{$link->getPageLink('cart',true, NULL, "add=1&amp;id_product={$product.id_product|intval}&amp;token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart' mod='tvhomeproducttab2'}" data-id-product="{$product.id_product|intval}"></a>
												{else}
                                                
													<a class="button ajax_add_to_cart_button " href="{$link->getPageLink('cart',true, NULL, 'add=1&amp;id_product={$product.id_product|intval}', false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart' mod='tvhomeproducttab2'}" data-id-product="{$product.id_product|intval}"></a>
												{/if}
											</p>
										{/if}

so i've searched in classes Link.php and i put a trace which shows https and not http


        $uri_path = Dispatcher::getInstance()->createUrl($controller, $id_lang, $request, false, '', $id_shop);
      echo($this->getBaseLink($id_shop, $ssl, $relative_protocol).$this->getLangLink($id_lang, null, $id_shop).ltrim($uri_path, '/'));
	  echo '<br>'.__LINE__;
		return $this->getBaseLink($id_shop, $ssl, $relative_protocol).$this->getLangLink($id_lang, null, $id_shop).ltrim($uri_path, '/');

So i see the trace https but the link stays at http

i've empty all cache...

i don't understand what happen

Can somebody help me?

Hope to be clear...

 

Thanks

 

Link to comment
Share on other sites

  • 3 weeks later...

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...