Magento - How to change URL of a link - php

Basically I need to change an URL to a page that does not exist in the admin panel -> CMS -> Pages
The link is http://www.mywebsite.com/contacts
I know how to edit the contents of this page, since it's located at "/app/design/frontend/shopper/default/template/contacts" but the issue is that I want to change the URL to http://www.mywebsite.com/kontakt
Any ideas?
Thanks!

Never Edit Core Magento files in any case. If you change the config.xml located at app/code/core/Mage/Contacts/etc/config.xml, all your changes will be lost when your Mage version is upgraded.
1) Make a new module and change frontname for your contacts page
OR
2) Make a new CMS page having URL key kontact, content having Contact form block, make a new URL rewrite and redirect contacts to kontact and you're done

You can easily do that, just update line 40 in app/code/core/Mage/Contacts/etc/config.xml
from <frontName>contacts</frontName>
to <frontName>kontakt</frontName>
try to remove cache and if your compilation is enble then try to recompile that
EDIT
Please override contact module after it test in core file and move into local folder

Related

Create new module position in Joomla 3

So I want to create a new module position in Joomla 3! I know you add the position name in the templateDetails.xml of the file. But what next? Do I need to add css to the styling of the template? Also what next, do I need to add more code to the index.php file or how can I do this? I have searched the web for some help but it seems as if the tutorials havn't been updated because some of the files they are describing, like for example lib/framework, I don't have that in my template? ANy help greatly appreciated!
I am not sure i got your problem properly, but
if you want to just create module position, you need to do 2 steps: define position in templateDetails.xml and insert jdoc:include code in template's index.php like you did in your code above, thats all. By doing this you define positions where your modules could be displayed.
Then if you want to add module, you should go to Joomla administrator panel -> module manager and create module, choosing position you created.

Magento 1.7: Where is the top.phtml file located?

When i searched about it, I found this file on this path:
app/design/frontend/BASE/default/template/catalog/navigation/top.phtml
But when i do any sought of change in it, it didn't work or not show any change. I think I am working in wrong file. What I actually want to do is to add thumbnails to menu at frontend.
I am new to magento. Please help me in this regard.
Best way of knowing path of any template file is : Using Template path hint
Goto Admin->System->configuration->Developer
Then select main website option from Current Configuration Scope dropdown on left hand side.
Then enable template path hint.
Navigate to the front end refresh and u can see the path for various blocks.
For better understanding of the template path hint try this video tutorial.
Actually the top.phtml file is in app/design/frontend/base/default/template/catalog/navigation/top.phtml as you have mentioned
Go to admin->system->configuration, now on the left panel click on design and in the Package area see the Current Package Name.
This is the current package you are using. Say this is... "default"
Now in the Themes area, check the Templates field.
This is the template of the above package that you are using. Say this is "modern"
If the field is blank it means you are using the default template.
Now the top.phtml file you need to edit is in or should be copied to app/design/frontend/default/modern/........
Paste it there and edit it.....
The reason for copying and editing is to keep a backup of original base package.
Try to flush magento cache at backend: "Configuration => Cache Management"
You maybe want to check if you have 'base' configured in the theme settings in Magento. Maybe it's overwritten in another package.
You may want to look weather you have a different theme active app/design/frontend/<themename>/<themevariation>/template/catalog/navigation/top.phtml
see http://www.newsjournal3.com/12-magento/13-how-to-override-magento-top-navigation
you have to put the topmenu.phtml in the html directory

SugarCRM Home Page URL

I am using sugarCRM Open Source Application for my own purpose.
When I click the Home link the above URL is like:
ajaxUILoc=index.php?module=Home&action=index&ParentTab=sales
How can I find out the flow of code using the above url. I have verified the sugarCRM developers guide regarding the url, but I cannot get the solution. How they call the functions or classes using like this.
Actually why I am asking is I want to modify the existing code to add some extra modules.
I am struggling for last one week without solution.
ajaxUILoc=index.php?module=Home&action=index&ParentTab=sales
That is saying you are in the sales Tab and on the 'Index' Page of the Home Module.
Firstly there is a modules directory in the root of the application inside which is a directory for each module, secondly for customisations there is a custom directory in the root of the application, where is generally all custom code is placed to make SugarCRM upgrade safe. There is a customCode variable you can add for placing custom code in the custom files.
Example:
'customCode'=>'{if $surrent_user->user_name==\'admin\'} .....some code...... {/if} {if $current_user->user_name!=\'admin\'} <input name="assigned_user_name" value="{$fields.assigned_user_name.value}" readonly="readonly"> {/if}',
The SugarCRM forums can be quite good http://www.sugarcrm.com/forums

How do I set a template for CubeCart?

I'm a php developer and currently working on a project in which I'm required to change the layout of a web page created using CubeCart. I've never worked before with CubeCart. I've created a template but don't konw where to place my stylesheet and other things on server as there are a lot of folders and files. This is very confusing. Can anyone please help me?
Thanks.
Just looking through their site, I found this page on editing the look/feel. It seems you're looking for this folder: /public_html/store/skins .
It would be best to make a new folder in there to store your working template. Copy all the default skin files into it and edit those.
To turn it on, go into the store admin and then [Store Config] -> [General Settings] then the [Styles and Misc] section. There should be a drop down for Store Skin - change it to yours.

How to override a user profile view,, in our own plugin, in elgg

I have created a new plugin named 'adv' in my elgg site.
And in this plugin iam listing the users.Which using the view from other elgg plugin 'profile
ie the page profile/views/default/profile/listing.php.
Now i need to set a link in the existing view of each user.So i have to edit the profile plugin , mainly the page profile/views/default/profile/listing.php
But how can i do this, without modifying elggs default plugin 'profile'.
I have tried a method that i have copied the folder 'profile' from profile/views/default/profile and put it in adv/views/default/.But it donot working.]
Is any solution for adding new link to the user view with editing other plugin, only editing our own plugin example 'adv'.
You'll need to override the profile/listing view, but only when Elgg is rendering your plugin's pages, not to interfere with other plugins that might want to use the core profile/listing view.
My approach to this problem is the following:
Create a new directory that will hold the views that you want to override.
In your case, I'd create the "adv/views/mod" directory within your_site_root/mod.
Add the view you'd like to override into this directory.
Again, your case, copy the profile/views/default/profile/listing.php to the following location: adv/views/mod/default/profile/listing.php
Make your modifications to the newly created view.
You can now safely modify the adv/views/mod/default/profile/listing.php file to your liking
Tell Elgg to use the special view when your plugin is rendering the page. This means you'll have to call the set_view_location(..) method either from your page_handler function, or the php files that are referenced by your page_handler and usually prepare the data for the views (like index.php or read.php, but I don't know your plugin's file hierarchy)
So in your case you'd call set_view_location('profile/listing', $CONFIG->pluginspath . 'adv/views/mod/'); either from your page_handler or from one of the above files.
Make sure that $CONFIG is present and available by referencing it (global $CONFIG).
Please check if "Use view filepath cache (recommended)", is disabled in the site administration. Because elgg uses hard view cache. Or delete the view_cache file from the data directory. And also make user your plugin is below the "Profile" in the plugin list.

Categories