Has Magento a fallback for default email templates? - magento

Hi I have created an module with a custom transactional email, which works fine when i place the default-template-file in
app/locale/de_DE/template/email/sales/mymail.html
but i need to place it into my template
app/design/frontend/ultimo/custom/locale/de_DE/templete/email/sales/mymail.html
but on this path it isn't found, i even tried otherplaces like
app/design/frontend/base/default/locale/de_DE/templete/email/sales/mymail.html
app/design/adminhtml/default/default/locale/de_DE/templete/email/sales/mymail.html
but neither works. Isn't there any fallback mechanism for these file? If yes, can anyone explain it to me?
Thanks

Related

dj_rest_auth restrict user registration to a certaing group

Based on Django REST framework: Check user is in group , I have succesfully restricted my custom views to certain groups.
Yet, I need to restrict dj_rest_auth.views.RegisterView to a certain group.
How can I make it?
I thought of trying to set a wrapper class over RegisterView, and link my wrapper class in urls.py, but what methods should I override?
Thank you SO much!
Well, it seems dj-rest-auth is ready for this need:
#settings.py
REST_AUTH_REGISTER_PERMISSION_CLASSES = ("rest_framework.permissions.IsAuthenticated","api.permissions.HasLoginPermission")
Keep in mind there's a bug in dj-rest-auth<1.1.12 that prevents those string to work.

How to re-brand SpringXD?

Is there a way to re-brand SpringXD?
I would like to remove the default SpringXD logo appearing in the XD shell and the Admin User Interface.
You can't do that unless change the banner.txt content in the spring-xd-dirt.jar and spring-xd-shell.jar.
From other side explain, please, the reason of that: may be we ask you for the JIRA issue.

Why does a "on a non-object" error occurs with this extension in Magento?

I'm having an Issue with a blog extension in Magento CE 1.6.2.0.
I installed this extension: Neotheme_nBlog.
I created an entry in the administrator.
Then I went to http://www.example.com/index.php/blog/ to see the recently created entry.
What I saw was an error like this:
Fatal error: Call to a member function getName() on a non-object
in /home/example.com/public_html/app/design/frontend/default/caramel/template/magicat/left.phtml
I searched in google the terms: "template/magicat/left.phtml" getName and what I only found is sites having this issue, but no support at all.
Please note: I know what does that error mean in PHP ("unfortunately" I'm not new at that). What I don't understand is what's happening with such [NON/null] object and how to fix it without killing a dozen of kittens.
Question: What can I do to solve it? What is the nature of the error, regarding Magento?(again: not PHP).
Notes: The Magento site (http://magento.stackexchange.com) is somewhat poor and strict to bring support of such nature, so asking there is not an option.
Edit (as answer to comment, and to clarify):
Neotheme is still not responding the request.
Don't know what should I look on such file (instances are not initialized there, but only accessed).
I'm using the default theme (caramel), which has esthetical changes (does not have layout changes).
It's hard to say without seeing your system specifically, but on this
template/magicat/left.phtml
It looks like you've added a template named magicat/left.phtml to your system -- either via an extension or custom development. Somewhere in this file PHP's called getName on a non-object. There's a variety of reasons this could be happening, and without seeing the specific line of code PHP's complaining about in your system, it's hard to say. It'd also be helpful to know if magicat is part of the extension or something else.
The most common reason for this error in a template is code that relies on a block being there that's been removed by another extension (eitehr via layout XML or observer methods)
$this->getLayout()->getBlock('some_block')->getName();
The next most common is people using the registry to communicate between templates and views, but a registry key not being set
Mage::registry('some_item')->getName();
Without knowing the variable and context, it's doubtful anyone will be able to help you.

file/page not found when uploaded online

I am working on a new module of existing live project. It is a website developed in PHP Zend Framework. New module is on admin side. It runs properly on my localhost/virtualhost.
When I uploaded it online with correct directory path it is found that one file is not found.
It is called like
www.example.com/admin/controllerName/actionName
All the actions works except one action that doesn't display anything and returns exception error mentioning that page or file not found.
What could be the issue? I have checked folders. If one action for the same controller works than why doesn't other. Both have their .phtml files in View section.
Help would be appreciated.
Would I be right if I guessed your local development environment was Windows?
It's probably a filename case sensitivity issue.
Assuming your request looks like
www.example.com/admin/fusionmaps/newpage
I'm not sure how you've setup your modules but if it's reasonably standard, you should have something like this (note the upper and lowercase characters)
application/modules/admin/controllers/FusionmapsController.php
The controller classname should be Admin_FusionmapsController with action public function newpageAction()
The view script should be at
application/modules/admin/views/scripts/fusionmaps/newpage.phtml

Save file in magento after checkout completation

I need to save a file after a succesfully checkout. So I'm using the checkout_type_onepage_save_order_after event. When checking out, it stucks if I have some shitty code in there but it goes nicely if I have valid code in the observer. So it gets called, at least I think it does. Can't test it since it doesn't write my file, doesnt write anything in the log etc. So, what could be wrong? Why doesn't it write some stuff into the log? As I said, with other events it works perfectly. It's a new magento installation.
http://pastebin.com/TWyj6CYt cache is disabled. I'm using 1.5
I suggest you use the following event : sales_model_service_quote_submit_after
This event triggers right after the successful creation of an order.
You can also use Mage::log("Observer called"); just to check if your event observer is being invoked.
I hope this helps you :)
You have a class name Xxx_saveCheckout_Model_Observer. Class name parts usually all have uppercase initial letters, the autoloader expects that. Try changing it to Xxx_SaveCheckout_Model_Observer (with a capital 'S').
Also make sure the config file has a /config/global/models section, although it might be missing from your pastebin on purpose.

Resources