I am working on custom extension.I am facing two issues.
1 ) I created a custom html page in Locale->en_Us->template->email->testEmail.hmtl.
And this is my config,.xml code :
<template> <email>
<mymodule_email_settings_client_email_template>
<label>Follow up Emails</label>
<file>test_email.html</file>
<type>html</type>
</mymodule_email_settings_client_email_template>
</email>
</template>
when i try to load it in my controller it reutrns me empty .this is my code of accessing template.
$emailTemplate = Mage::getModel('core/email_template')->loadDefault('mymodule_email_settings_client_email_template');
2) I want to load transactional and newsletter templates by there ids.I have id but don't know how can i use that templates on my custom emails.I want only the code to access the templates like above nothing more than that.Can i use that templates in my custom emails ? Thanks
please check following links use to define custom email template
http://www.excellencemagentoblog.com/magento-sending-custom-emails
http://www.atwix.com/magento/emails-for-custom-events/
hope this help you
Related
I'm trying to embed template edit view in my application. API Reference
Below is the source code to retrieve template edit view url using php client
$templatesApi = new TemplatesApi($apiClient);
# Generate the embed template edit view
$returnUrlRequest = new ReturnUrlRequest();
$returnUrlRequest->setReturnUrl('http://localhost:8080/success');
$editViewUrl = $templatesApi->createEditView($this->getAccountId(), $templateId, $returnUrlRequest)->getUrl();
& it returns below edit view url
https://demo.docusign.net/Member/StartInSession.aspx?StartConsole=1&t=3c5a3d84...&DocuEnvelope=[template_id]
But when I load the above url, it redirects to docusign home page. Where I'm expecting it to show the template edit view.
Any help appreciated. Thanks in advance
It appears there's an issue with the templateId, you need to make sure you provide the correct templateId to the API. This should look like a GUID and the URL you show here doesn't have it.
I download [This][1] template and I added a template to (public_html/My_Host/templates) and change the Template from admin panel (Setup->General Settings->Template) but it does not work just six template work
I download the template from
[1]: https://colorlib.com/preview/theme/hostspace/
[2]: https://colorlib.com/
Did you downloaded WHMCS Templates ? (Note:Normal html5 templates never work as whmcs template ).
If yes, you need to upload and extract in "public_html/WHMCS_DIRECTORY/templates" .
Then it will list out in WHMCS "Setup->General Settings->Template" area.
I'm currently in the process of finalizing a custom controller to accept Ajax request for a quote form. I have been able to successfully set up everything, and it is sending properly. The question I have is relating to the method of linking a
Transactional e-mail template from the CMS to the controller I have set up.
I have a template in the locale of the Magento install, and have been able to load it into the Transactional email manager of the backend. How would I be able to get the id of that template and load it into the mail object? I have attempted using the simple numerical id, and that doesn't seem to be working.
Config.xml
<global>
<template>
<email>
<custom_quote>
<label>Custom Quote Form</label>
<file>custom-quote.html</file>
<type>html</type>
</custom_quote>
<trade_printer>
<label>Trade Printer Form</label>
<file>trade-printer.html</file>
<type>html</type>
</trade_printer>
</email>
</template>
</global>
this is a sample code for sending email with email template
$emailTemplate = Mage::getModel('core/email_template')
->loadDefault('custom_quote');
$emailTemplateVariables = array();
$emailTemplateVariables['myvar1'] = 'Branko';
$emailTemplateVariables['myvar2'] = 'Ajzele';
$emailTemplateVariables['myvar3'] = 'ActiveCodeline';
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
$emailTemplate->send('john#someemail.com','John Doe', $emailTemplateVariables,$storeId=null);
reference
After reading up on the available methods, I discovered that
loadDefault() will always load the template from the locale codebase. Utilizing loadByCode() with the name specified in the Transactional Email editor will load the customized template.
Final Code
$emailTemplate = Mage::getModel('core/email_template')->loadByCode('Template Name Here');
I've introduced a custom EAV attribute for the customer object. Let's call it myvalue. Within several places in magento, I'm printing the value like this:
echo Mage::getSingleton('customer/session')->getCustomer()->getMyvalue();
Now, I'd like to print it to the order confirmation email template. How can I do that?
I've found the solution.
First, I created a new directory mydirectory in app/design/frontend/base/default/template/. In this directory, I put a file myvalue.phtml with the following content.
<?php
$customer=$this->getData('order')->getCustomer();
print_r($customer->getMyvalue());
?>
And I've included this block in the email template using this line:
{{block type='core/template' area='frontend' template='mydirecory/myvalue.phtml' order=$order}}
I make my own template , and its work well on www.90km2.com/index.php
But when I want to see com_content&view=category page on this link : http://www.90km2.com/index.php?option=com_content&view=category&id=23&Itemid=102
It doesn't work. Do you know why joomla didn't show my view?
I try another templates to see this page , all of them was worked well , but this view is not work with my own teplate :(
I would try copying the template which works then modify bit by bit to get your custom template then see when problem shows up. Or create a template which has the minimum stuff in there and see if it works. Just have jdoc:include type="component"/> in the body