Magento Checkout - Unsecure Image

I had a problem with my Magento check, in which the browser reported that the page was not fully encrypted. I looked and realized that one of the images uses http: //

This is the code I used to display the image:

getSkinUrl ('images / search_button.png')? >

As a workaround, I hard-coded the full path to the image, i.e.: https://mysite.com/skin/frontend/default/mytheme/images/search_button.png

Does anyone, how can I name an image dynamically, but does it use https to check and other protected pages?

+3
source share
2 answers

This must be resolved using the "_secure" parameter.

$this->getSkinUrl('images/search_button.png', array('_secure' => true));
+4

, "" ( ) ? , URL- HTTPS?

Magento URL- / URL-, . https://, . Magento .


URL- , URL- URL-. URL:

// Get the URL for another action on our current controller
// and force it to https
$path = "*/*/submit";
$url = Mage::getUrl($path, array('_forced_secure' => true));

, getSkinUrl...

+1

Source: https://habr.com/ru/post/1759117/


All Articles