magento怎么添加ssl证书

magento怎么添加ssl证书,第1张

Magento是一套电子商务系统,如果要SSL证书,是需要部署到服务器才可以的。

您首先淘一个证书的SSL证书,然后让提供商给您配置到服务器就可以了。

面对Magento系统,服务器环境常见的是:Apache

APACHE安装SSL证书:https://www.gworg.com/ssl/106.html

Apache自动跳转到 HTTPS:https://www.gworg.com/ssl/130.html

今天在做WORD公文模板,其中用了几个复选框控件。

之前用的WORD2010,做完之后关闭设计模式,可以正常点选使用。

因为OFFICE2003-2007-2010之间有些兼容性问题,为确保这个模板的兼容性,在WORD2003里打开了这个模板,发现直接进入了设计模式,退出才能正常使用控件的功能。网上搜的答案大都是把WORD宏的安全级别为“低”,只对本机有效,其他电脑上要再设置,不靠谱。

------------------------------------

找来找去,终于在百度里找到了一个正确答案,怕以后忘了,特此记下,也与有心人共享。

1、WORD模板加入控件设计完毕后,退出设计模式,保存为DOC

2、另存为 RTF格式

3、打开RTF文件,发现仍然是自动进入了设计模式,手动退出设计模式,保存

4、另存为DOC格式,即为最终文件。

------------------------------------

这样得到的文件发给其他人,打开后不会触发宏提示或设计模式之类,可直接正常使用控件的功能。

WORD 2007和2010版做了优化,不存在上述问题,以上办法主要是考虑到大多数人还是习惯使用WORD 2003。

Magento的Mage::getModel('core/email_template')模型可用来发信。

步骤I.

在你的模块(其实任意Module都可以)的etc/config.xml的根标签<config>下添加代码:

<default>

<{限定名1}>

<{限定名n}>

<enabled>1</enabled>

<template>{email模板标签名}</template>

</{限定名n}>

</限定名>

</default>

<global>

<template>

<email>

<{{email模板标签名} translate="label" module="{模块名}">

<label>{任何标识性名}</label>

<file>{email模板html文件名}</file>

<type>html</type>

</{email模板标签名>

</email>

</template>

</global>

a).在global/template/email下定义新的email模板标签,模板文件名。模板文件名类似CMS页,要放到app/locale/{当前语种}/template/email目录或子目录下

b). default/下限定名1...限定名N围绕的template引用global下定义的email模板

限定名1...限定名N表示标签可以嵌套一层或多层用于与其他default下标签区分。

一个例如下:

<default>

<customer_email>

<services_request>

<enabled>1</enabled>

<template>customer_email_service_template</template>

</services_request>

</customer_email>

</default>

<global>

<template>

<email>

<customer_email_service_template translate="label" module="sales">

<label>Customer Services Request</label>

<file>customer_services.html</file>

<type>html</type>

</customer_email_service_template>

</email>

</template>

</global>

步骤II.

创建customer_services.html放到app/locale/{当前语种}/template/email目录下(内容省略).

步骤III. 代码调用例:

/* @var $translate Mage_Core_Model_Translate */

$translate = Mage::getSingleton('core/translate')

$translate->setTranslateInline(false)

$storeId = Mage::app()->getStore()->getId()

$template = Mage::getStoreConfig('customer_email/services_request/template', $storeId)

$recipient = array(

'name' =>'Baby',

'email' =>'[email protected]'

)

$sender = array(

'name' =>'Koda Guo',

'email' =>'[email protected]'

)

$mailTemplate = Mage::getModel('core/email_template')

$mailTemplate->setDesignConfig(array('area'=>'frontend', 'store'=>$storeId))

->sendTransactional(

$template,

$sender,

$recipient['email'],

$recipient['name'],

array( // parameters to email

'param1'=>'abc',

'param2'=>'def',

'param3'=>'ghi'

)

)

$translate->setTranslateInline(true)

使用Magento模板机制,一旦定义了新的模板,就可以在后台System->Transactional Mail处定制该模板,从而方便维护.


欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/bake/11631944.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-17
下一篇 2023-05-17

发表评论

登录后才能评论

评论列表(0条)

保存