Wonder if you can help me. I have a Magento installation and when a customer selects "forgot password" the system does NOT send the reset password email.
All the other emails are working fine. I have setup the New Password template and assigned it in the admin of Magento.
I can't for the life of me figure out why only the Reset password emails are not sending and the others are.
Please help.
Thanks,
Ev
To solve the issue it is enough to delete the custom customer.xml used by your theme in app/design/frontend///layout/, so default layout shipped with base theme (in app/design/frontend/base/default/layout/customer.xml) will be used.
Or the custom customer.xml can be updated to include the following section:
<customer_account_resetpassword translate="label">
<label>Reset a Password</label>
<remove name="right"/>
<remove name="left"/>
<reference name="head">
<action method="setTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
<action method="setHeaderTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="content">
<block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>
</reference>
</customer_account_resetpassword>
Check out the app/code/core/Mage/Customer/controllers/AccountController.php file. Look for forgotPasswordPostAction. Analyze it step by step - check if $this->getRequest()->getParams() provides you the emal addresss, check if it validates (maybe some local changes have been made to the validation code). Look at the password generation code - is the new passsword generated? Check out the Mage_Customer_Model_Customer class and the sendPasswordReminderEmail method and try to track the bug in there. Print all the values you can get there (email, names, store configs and check for exceptions and warnings - turn php error displaying!).
This should help you tracking down the problem, and gather enough data to identify it.
Related
Is there a simple way to change the column settings on Magento's "Contact Us" page through the CMS? It seems that by default the "Contact Us" page is not listed among the other CMS pages. Do I need to override the settings via XML?
Thank you for your help!
First, determine the "layout handle" for the contact page. For u i guess it is "contacts_index_index"
U can find this in file app/design/frontend/your-package/your-theme/layout/local.xml or contact.xml
<contacts_index_index translate="label">
<label>Contact Us Form</label>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
<action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action>
</reference>
<reference name="content">
<block type="core/template" name="contactForm" template="contacts/form.phtml"/>
</reference>
</contacts_index_index>
Change the setTemplate call to reference your template
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
<action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action>
</reference>
Alternately, add the handle reference to your local.xml file. The local.xml file is applied last, so whatever goes in there "wins"
<layout>
<contacts_index_index>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
</contacts_index_index>
</layout>
This is what worked for me:
Go to CMS > Manage Pages interface in the admin panel.
Create the contact page here and insert the following code:
<!– CONTACT FORM –>
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}
<!– END OF CONTACT FORM –>
Click on the Design tab and change the layout to 1 column.
I am writing a Magento Extension that is trying to hide the Discount Code section on the checkout cart page. I wrote the following code to replace the current cart.phtml with my custom template.
<layout version="0.1.0">
<checkout_cart_index>
<reference name="checkout.cart">
<action method="setTemplate">
<template>company/module/cart.phtml</template>
</action>
</reference>
</checkout_cart_index>
</layout>
Everything looked good until I realized it even overwrote the template the cart page uses for an empty cart. I have tried many combinations for switch the "checkout_cart_index"
name to the reference name but I cannot get it to just replace that template. I further investigated and found in the default layout it sets the cart values here:
<reference name="content">
<block type="checkout/cart" name="checkout.cart">
<action method="setCartTemplate"><value>checkout/cart.phtml</value></action>
<action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
I tried again using "SetCartTemplate" but I cannot get it to display yet alone behave as I am intending. Any ideas?
In your layout update
<checkout_cart_index>
<reference name="checkout.cart">
<action method="setCartTemplate"><value>path/to/your/cart.phtml</value></action>
<action method="setEmptyTemplate"><value>path/to/your/noItems.phtml</value></action>
<action method="chooseTemplate"/>
</reference>
</checkout_cart_index>
chooseTemplate will choose the right template
Try to Rewrite this core class to hide the discount code section in your cart page
Mage_Sales_Model_Quote_Address_Total_Discount
I am using Magento 1.7.0.2 and would like to show some links only when the customer is logged out.
If I add the below code to local.xml nothing happens (I am logged out):
<customer_logged_out>
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>Test</label><url helper="customer/getLoginUrl"/><title>Test</title><prepare/><urlParams/><position>100</position></action>
</reference>
<remove name="reorder"></remove>
</customer_logged_out>
However as soon as I remove the customer_logged_out tags the link gets displayed (for everyone) ie:
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>Test</label><url helper="customer/getLoginUrl"/><title>Test</title><prepare/><urlParams/><position>100</position></action>
</reference>
<remove name="reorder"></remove>
If I try to use customer_logged_in tags nothing gets displayed also.
Why are these logged_in/logged_out tags not working in local.xml?
I have the login form and register form, integrated in the same page. ie, in the login page itself.
I am having a problem in showing the error messages, as if error occurs in any one of the forms, then the error messages are displayed in both the login and register sections.
for example, suppose if we provide wrong login data to login, then the error message is displayed on the top of both the login and register forms, since both the forms are in the same page.
If we try to register with an already existing email address, then also, error message saying email already exists, displayed on the top of login form and register form.
My requirement is that i need to display the error message only in the corresponding form.
In order to integrate both login and register form in to the login page itself, i changed the file \app\design\frontend\anz\default\layout\customer.xml and it is as follows
Layout for customer login page
<customer_account_login translate="label">
<label>Customer Account Login Form</label>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml"/>
</reference>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<block type="page/html_wrapper" name="customer.form.register.fields.before" translate="label">
<label>Form Fields Before</label>
<!--action method="setMayBeInvisible"><value>1</value></action-->
<action method="setElementClass"><value>rewards</value></action>
</block>
<block type="enterprise_customer/form" template="customer/form/userattributes.phtml" name="customer_form_user_attributes">
<action method="setFormCode"><code>customer_account_create</code></action>
<action method="setEntityModelClass"><code>customer/customer</code></action>
</block>
<block type="enterprise_customer/form" template="customer/form/userattributes.phtml" name="customer_form_address_user_attributes">
<action method="setFormCode"><code>customer_register_address</code></action>
<action method="setEntityModelClass"><code>customer/address</code></action>
</block>
<reference name="content">
<block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
<action method="append"><block>customer.form.register.fields.before</block><alias>form_fields_before</alias></action>
<action method="append"><block>customer_form_user_attributes</block></action>
<action method="append"><block>customer_form_address_user_attributes</block></action>
</block>
</reference>
<update handle="customer_form_template_handle"/>
</customer_account_login>
I am a newbie in magento. Any help would be greatly appreciated.
I changed your code a little bit. Please tell me where your forms are rendered?
<customer_account_login translate="label">
<label>Customer Account Login Form</label>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<block type="page/html_wrapper" name="customer.form.register.fields.before" translate="label">
<label>Form Fields Before</label>
<!--action method="setMayBeInvisible"><value>1</value></action-->
<action method="setElementClass"><value>rewards</value></action>
</block>
<block type="enterprise_customer/form" template="customer/form/userattributes.phtml" name="customer_form_user_attributes">
<action method="setFormCode"><code>customer_account_create</code></action>
<action method="setEntityModelClass"><code>customer/customer</code></action>
</block>
<block type="enterprise_customer/form" template="customer/form/userattributes.phtml" name="customer_form_address_user_attributes">
<action method="setFormCode"><code>customer_register_address</code></action>
<action method="setEntityModelClass"><code>customer/address</code></action>
</block>
<reference name="content">
<block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml"/>
<block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
<action method="append"><block>customer.form.register.fields.before</block><alias>form_fields_before</alias></action>
<action method="append"><block>customer_form_user_attributes</block></action>
<action method="append"><block>customer_form_address_user_attributes</block></action>
</block>
</reference>
<update handle="customer_form_template_handle"/>
</customer_account_login>
Welcome to Magento Theming :-)
First, it's generally a better practice to use local.xml layout file under your custom theme (it's not there by default, it's for the end implementer to use). This way, you won't have to needlessly merge changes into customer.xml to keep it up to date.
In your local.xml, you can use the <update /> directive to include the layout update xml from one handle into another (which is effectively what you are doing already):
<customer_account_login>
<update handle="customer_account_create" />
</customer_account_login>
You will need to customize your create template customer/form/register.phtml and remove its <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> call.
I tried a simple way to achieve the requirement. There may be better ways to do this, but I think this one is simple.
I had created a hidden variable and I put those hidden variable in forms to identify which form is submitted. These hidden variable is passed as a parameter after completing the corresponding action. Then I provided an if block to display the messages according to the parameter value.
I did this all by overriding the Mage Customer module.
Two parts to this question:
How can I add My Cart to either local.xml or checkout.xml? I have a custom template, that never had it called. Looking for where it is being removed, but not sure I am looking in the right place.
I have tried adding to local.xml
<reference name="root">
<reference name="top.links">
<action method="addCartLink"></action>
</reference>
</reference>
But it breaks magento. Basically I have a soft add to cart and want to pull the default magento "My Cart" to the header, so the ajax updates on page like it does in the default magento template.
2nd par - Where does the code for "My Cart" live to tweak it?
<reference name="top.links">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCartLink"></action>
</block>
</reference>
You may have to clear your cache.