This is a pretty strange issue. If I enable the Authorize.net payment method, the input fields to enter your CC details is missing from HTML. This is a pretty much out of the box installation with just some theme work having been done, and I didn't touch the opc templates.
If I enable Saved CC payment method, the fields appear correctly.
I did not make any changes to the OOTB Authorize.net files in Magneto and even tried disabling my entire theme and it doesn't have any impact.
Screenshot of code:
http://cl.ly/image/3g1n2x021N2s
After looking into this more, it looks like this line in templates/checkout/payments/method.phtml is not returning any HTML:
$this->getPaymentMethodFormHtml($_method)
I found this method and it in-turn is trying to load a child.
public function getPaymentMethodFormHtml(Mage_Payment_Model_Method_Abstract $method)
{
return $this->getChildHtml('payment.method.' . $method->getCode());
}
That is about how far I have gotten.
I would try the following steps:
Check your exception log under /var/log/exception.log
Check your PHP error log
Disable your current theme by renaming your theme folder eg: /app/design/frontend/default/themename >> /app/design/frontend/default/_themename - this rules out the possibility of invalid theme/layout XML issues. Make sure it falls back to an untouched base default theme!
Disable your non-standard extensions by setting <active>false</active> in the XMLs found under /app/etc/modules one by one.
Try see if there is a difference in value $method->getCode() when saved CC is turned on & off.
If possible, update the Authorize.net extension. If not, at least check if your /app/etc/modules/Mage_Authorizenet.xml is as follows:
<config>
<modules>
<Mage_Authorizenet>
<active>true</active>
<codePool>core</codePool>
<depends>
<Mage_Paygate/>
<Mage_Sales/>
<Mage_Checkout/>
</depends>
</Mage_Authorizenet>
</modules>
</config>
This is a workaround if you don't find any solution for your problem.
You can create your own payment form for authorize.net
Authorize.net form used cc.phtml file for display Authorize.net fields so you can copy this file and set this form from xml.
Go to your checkout.xmland in <checkout_onepage_index translate="label"> tag find checkout.payment.methods which display all methods put action methods something like this
<action method="setMethodFormTemplate"><method>authorizenet</method><template>payment/form/authorizenet.phtml(which is copy of your cc.phtml)</template></action>
I have not test it.
Authorize.net use this block for display form fields so further you can look into this file
app\code\core\Mage\Paygate\Block\Authorizenet\Form\Cc.php
You can also check if Mage_Authorizenet or Mage_Paygate module are disabled in your Magento admin.
System -> ADVANCED -> Advanced
Make sure that they are enabled there.
Related
Installed clear magento 2.3.2
Created simple custom theme which contain (theme.xml, registration.php and CustomTheme/Magento_Customer/layout/customer_account_create.xml).
Also I created a simple extension which add a custom field to customer accout create form (This extension also use customer_account_create.xml).
<body>
<referenceContainer name="form.additional.info">
<block class="CompanyName\ModuleName\Block\Test" name="test"
template="CompanyName_ModuleName::form/test.phtml"/>
</referenceContainer>
</body>
After that I got strange behavior:
If my CustomTheme/Magento_Customer/layout/customer_account_create.xml as is like original file from core, non-standard field is added to the form without problems from my custom extension.
But if I will modify my file CustomTheme/Magento_Customer/layout/customer_account_create.xml (for example I just added this string to remove minicart: `).
My non-standard field does not apply to the form
Everything looks as if I modify the layout for my needs in custom theme (delete some elements from the registration page), then all other custom extension that use this layout or reference to this layout will stop working.
https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-override.html
I think you need to read a little more the concepts and process of development of your own custom theme before doing any big modifications, at the end you will have a really bad outcome and not sustainable code.
I figured out this issue.
Me helped this sections of the documentation
https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-extend.html
https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-override.html
Is it possible to customize the backend interface of Magento. The requirements include:
A custom theme for the backend
Removing all the default menu in the admin panel such as catalog, Mobile, Promotions, etc and replacing them with custom menus. For example, there will be a menu for managing all the order related tasks, another one for managing all the customer related tasks and so on.
The content of each page under the above mentioned menus will have custom layouts.
I am aware of the fact that, the layout changes can be managed through themes but I am not sure how to implement customized menus. Should I create a different module for rendering this customized backend interface? This is my first project on Magento. Please advise on the implementation of these requirements.
Add a new adminhtml theme
Start by adding a new folder inside the app/design/adminhtml/default folder. To start out, the folder should also contain one sub-folders called template.
So, for example, you add a folder called mytheme, and inside it you add another folder called template.
Overriding Magento configuration
All you have to do is add a new config.xml file inside app/code/local/MyCompany/Adminhtml/etc. Add the following code inside the file:
Note: if you created this file by following one of my earlier guides you don’t have to create it again and you would simply add the section at the appropriate location inside the existing file.
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<MyCompany_Adminhtml>
<version>0.1.1</version>
</MyCompany_Adminhtml>
</modules>
<stores>
<admin>
<!-- override default admin design package and theme -->
<design>
<package>
<name>default</name>
</package>
<theme>
<default>mytheme</default>
</theme>
</design>
</admin>
</stores>
</config>
You will also have to tell Magento about this new module in an XML file placed inside /app/etc/modules. This file could be called MyCompany.xml and inside you would copy/paste:
Note: if you created this file by following one of my earlier guides you don’t have to create it again.
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<MyCompany_Adminhtml>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Adminhtml />
</depends>
</MyCompany_Adminhtml>
</modules>
</config>
Changing template files
Now to change the default Magento templates you basically copy the .phtml files from the app/design/adminhtml/default/default/template folder into your own template folder and change the contents of the .phtml file to suit your needs.
For example, if you want to change the login box and remove the Magento copyright message:
Copy app/design/adminhtml/default/default/template/login.phml into the app/design/adminhtml/default/mytheme/template folder and then change the to put your own legal note.
It's possible to customize the Magento backend.Please try this way.
But developer must be the main admin user and client be the second admin user.Because the main admin user can set privileges for other users.
Step 1: Create a New User
From the Admin menu, select System > Permissions > Users.
Click the Add New User button.
In the Account Information section, do the following:
Enter the User Name for account.The User Name should be easy to remember. It is not case-sensitive. For example, if your user name is “John,” you can also log in as “john.”
Complete the following information:
First Name
Last Name
Email addressThis email address must be different from the one that is associated with your original Admin account.
Assign the Password for the account.
The password should be seven or more characters long, and include both letters and numbers.
In the Password Confirmation box, repeat the password to make sure it was entered correctly.
Set This Account is to “Active.”
Step 2: Define the Role
In the User Information panel on the left, click User Role. Then, in
the list of Roles, select Administrators. (Initially, it will be the
only role available.)
When complete, click the Save User button.You now have two accounts
with Administrator access.
Customize interface - Already have the extension to modify the interface. check it http://www.magentocommerce.com/magento-connect/v-admin.html
Customize menu - We need to work on seperate module and i think that it will be a big work.
I am currently working on a live website, but the trouble is they would like to switch theme so what I would like to install the new theme and only make it viewable by my ip address.
The trouble is I do not know how to change the Magento theme and skin values programmatically.
Could any of you help me out here?
So this is not a direct answer. Best practices are going to be to back up your database, and system, and restore to a development environment files and database.
Edit the two entries for each store in the core_config_data table to change the url from the live site to the dev site url.
Then develop your new or modified theme on the dev site and deploy the files to the live server when you are ready to push your changes.
There could be an alternative way to do this. You could make a new store in on your Magento install See How to Make Multiple Stores and then copy the theme folder to your development them name directory. And finally configure the new/dev store to use your dev theme.
Both of these are viable options. Trying to trick Magento to serve one theme to your IP and another to everyone else seems like asking for trouble.
This can be done with no modifications to the Magento core.
It involves Chrome and setting your user agent as something custom.
First off, create an exception in Magento - we'll set the matched expression as dev and set the package to new-theme. This will set your package as new-theme if your user-agent matches dev (will serve the theme located in app/design/frontend/new-theme:
Then the second and final step is to open your Developer Toolbar in Chrome and set your user-agent as dev:
Take these 2 easy steps and you can programatically set your theme package only for yourself without affecting others.
You can do it with
Mage::getSingleton('core/design_package')->setTheme('default');
For the implementation just create a block that loads on all pages and add it to the constructor.
XML would be something like that:
<layout version="0.1.0">
<default>
<reference name="content">
<block type="kervin/theme" name="kervin.theme"/>
</reference>
</default>
</layout>
and theme.php, the block would be:
class My_Kervin_Block_Theme extends Mage_Core_Block_Template
{
public function __construct()
{
if ($_SERVER["REMOTE_ADDR"] == 'xxx') {
Mage::getSingleton('core/design_package')->setTheme('default');
}
}
}
I installed an extension to add custom fields to customer registration form.I want to add some option value in dropdown menu box of input validation in backend admin page..could you plz tell me the path of the folder where can I find the phtml file which is responsible for that part ?
-Thanks.
The files you are looking for are in:
app/design/adminhtml/default/default/template
But just changing the .phtml file won't do the job. The customer model itself should be extended to provide for your extra field. Therefore i highly recommend you to write a module for this instead of altering Magento core code. This to make sure that you can still use updates in the future.
Writing such an module requires more in depth knowledge of Magento. For more information on custom adminhtml see here.
For information on extending the core functionality look here.
If you don't feel like programming this all yourself take a look at customer attribute modules on Magento Connect.
I am using Magento 1.7.0.2 and my login and register page design has problem. It is not taking the template path from my custom theme. Instead, it is taking the template path from base persistent folder.
For example, the login template path is taken from
frontend/base/default/template/persistent/customer/form/login.phtml instead of
frontend/default/MY_THEME/template/customer/form/login.phtml
It’s strange how this persistent folder come into action.
I try below things also
1) Copy the persistent folder from design base directory to your custom theme directory. And then modify the design on the files you copied.
2)Disable the persistent shopping cart feature. You can do this from :
System -> Configuration -> CUSTOMERS -> Persistent Shopping Cart -> General Options -> Enable Persistence = No
3)directly disable the module by editing the file: app/etc/modules/Mage_Persistent.xml by setting active = false.
Also did Refresh my Magento cache and also browser cache!
Is there any other solution or suggestion that i have to applied other then this?
Waiting for your kind response.
Copy login.phtml from frontend/base/default/template/persistent/customer/form/ to frontend/default/MY_THEME/template/persistent/customer/form/ (You have already done this)
Clear the Magento CACHE. Even your browser cache.
If still doesn't shows up, then check the folder path. If you have placed it correctly, it should show the Theme Template path in the hints. There is no bug in Magento which causes this kinda problem.
Make sure the Theme where you have copied the persistent login.phtml is the Theme that you are using in design settings.
Copy your template from frontend/default/MY_THEME/template/customer/form/login.phtml to frontend/default/MY_THEME/template/persistent/customer/form/Login.phtml, then refresh your Cache. Now the changes you did to the Login.phtml should be loaded.
Sometimes a module can overwrite the template used for the login form. And maybe you are missing the template files. You should check for layout xml handles like:
<customer_account_login>
<reference name="customer_form_login">
<action method="setTemplate"><template>template/name.phtml</template></action>
</reference>
</customer_account_login>
Another thing you should check is if the block used for the login is the core one because again a template override may happen from a module.