PDA

View Full Version : Magento setup with Vanity SSL



ceiboss
2008-10-30, 09:54 AM
I setup Magento a while back and was using Paypal, so I didn't need the SSL feature. I've moved to Authorize.net and now I need to secure the site. Is there a way to do it without reinstalling everything (including all my products, etc).

I'm also having some issues with sending email from magento. I know I don't have things setup right, but I can't find anyplace to set a login/password for an email address. I've found the smtp server fields.

Any help?

Thanks!

community-manager
2008-10-30, 11:12 AM
Hello Ceiboss,

Here is how you can enable SSL in Magento Commerce:

Log into backend
Click on System > COnfiguration
Click on Web on the left menu
Scroll down and find the SECURE section
Select YES for the question: Use Secure URLs in Frontend

I hope this helps...

About the SMTP problem... Unfortunately, magento commerce does not support this out of the box. Although I've never tried, the following may help. Make sure to backup everything before you try:

Open /app/code/core/Mage/Core/Model/Email/Template.php and add the following to the send() method



public function send($email, $name=null, array $variables = array())
{
if(!$this->isValidForSend()) {
return false;
}

$config = array(
'ssl' => 'tls', //optional
'port' => Mage::getStoreConfig('system/smtp/port'), //optional - default 25
'auth' => 'login',
'username' => 'username@somesite.com',
'password' => 'secret'
);

$transport = new Zend_Mail_Transport_Smtp(Mage::getStoreConfig('sys tem/smtp/host'), $config);

........................

try {
$mail->send($transport); //add $transport object as parameter
$this->_mail = null;
}
catch (Exception $e) {

return false;

}

return true;
}

ceiboss
2008-10-30, 01:41 PM
Well, the email works. Of course I changed the email address I was going to use and broke it, but I'll work that out later. Thanks for the help there.

I'm still having problems with the SSL. What I think needs to happen is that I need to copy some or all of the Magento site to my vanity SSL site and then under System/Configuration/Web under Secure, change the base URL to point to the SSL site. I did try changing the setting as you described, but it didn't work.

Thanks,

Scott

decarvalho
2008-10-30, 11:05 PM
I am having the same problem with email. Tried adding the code to the php page mentioned. The file and code certainly have to do with the issue, but I am getting an error (before I did not get any errors, but the emails would not be sent). My smpt server does require authentication. If I post my code here, could someone take a look at it for me?

ceiboss
2008-11-04, 12:25 PM
I'm still working on this and thought I'd update hoping somebody would have some ideas on what's going on:

1. I deleted my magento install (not the database though).
2. I setup my vanity SSL under Linux.
3. I re-installed magento.

Now, I still have my data which is good considering all the work I went through to set things up. The problem is that when I go to checkout and it tries to get to my secure site, I get the 404 error. I have no idea what or where to go now. I entered and double checked the https://copelandcommunicationscom.secure.myhosting.com/ (and made sure the "/" was on the end). It still gives me the error. How do I fix this? I'm assuming that for some reason the files that need to be transferred to the secure site, haven't been. I did select "Use Secure URLs in Front End". It makes no difference.

Help! I'm so close I can taste it. Thanks

tima
2008-11-04, 02:18 PM
Hello ceiboss,

Just to explain a bit how Vanity SSL works. There is no seperate site for your Vanity SSL site. It is like a website alias that points to the same content on the webserver.

So if your shopping cart is located at http://x.your-site.com/cart/index.php then to use your Vanity SSL you just point your browser at https://vanitySSLname.secure.myhosting.net/cart/index.php and you will see the same content. There is no need to copy any files to any other location to use the Vanity SSL.

Also, please note that Vanity SSL URLs usually end in ".secure.myhosting.net". You may get an error or a redirect to http://myhosting.com if you use ".com" at the end.

Hope this helps.