I am a beginner in using opencart.I need to create an About us page from admin and have to link it to my main menu navigation.How to get this?
Step 1 : Goto information link in catalog tab
Step 2 : click to insert a page or information page like about us
Step 3 : if you have enabled seo then you can write keyword for you aboutus page or information page then your url will be easy to use e.g below if seo is disbaled then your url will be little boring e.g(index.php?route=information/information&information_id=4)or simpler to it which will not be good to share or use
NOTE: for seo you should use .htaccess file
It very simple go to admin panel
catalog -> Information
here you can see all the static pages such as About us,Delivery Information etc
edit them and changes will appear on front page .
to insert new page
catalog -> Information -> Insert
most complex opencart themes have a module like menu that you almost always can edit in the backend, if you wish to you can add it manually, to do so locate header.tpl in catalog->view->theme->common and see if menu is called directly there probably in a section or in an external file, probably located in the same folder, if you wish to you can send me a message with further info and i would be glad to further assist you, its really simple, if you find your way around.
Related
I have a store created on X-Cart, and I want to change/customize the contents of default error/404 page. I am using X-cart 5.3. Any ideas what can be done?
TIA
Ankit, if you want to change the default contents of the error page (not 404) or the maintenance page (this page shows while the store is in rebuilding state), you should look at the public folder of your X-Cart installation.
This folder contains error.html (this page is for admin user), and maintenance.html. Also, public/customer folder contains another error.html (the one that shows to the customers).
Don't modify these files, because they will be overwritten during the upgrade (replacing with the stock ones). Instead, copy them to another folder or create the entire error page from scratch. After that, modify the etc/config.php file to set the correct paths for the error pages like that (replace the <your_dir> part with your folder with the customized pages):
; Error handling options
;
[error_handling]
; Template for error pages
page = "<your_dir>/error.html"
page_customer = "<your_dir>/customer/error.html"
; Template for maintenance pages
maintenance = "<your_dir>/maintenance.html"
Make sure these options are not repeated in the config, if they do - remove the stock ones.
The 404 page is the different case because it is being rendered by the X-Cart templating engine - Twig. There are two ways to edit its content:
You can modify page heading and text labels. Open the X-Cart admin and go to the Store Setup -> Translations page and click on the link with the labels count across the language you want to edit.
Search for "Page not found" label, and click on the globe icon near the trash icon to edit all available translations. That is the heading of the 404 page.
Later on, search for "The requested page could not be found." label and repeat the procedure. This label contains the text of the 404 page.
Please note that any HTML code will be stripped, use the plain text only.
The second option is to modify the template HTML code. You should be accustomed to editing HTML and Twig languages, you should also have the ThemeTweaker addon.
Copy the skins/customer/404.twig file to the skins/theme_tweaker/customer/404.twig and edit it with the text editor.
Rebuild the store at the cache management page afterwards.
I'm creating website with Wagtail and i'd like to understand menu wagtail-way. I found solutions with templatetags or with menu-items. This is simple and working. But Wagtail solves if i need to add some item (link to external site, link to webpage with filters aso...) and how menu can be rearanged? I'm tried to search Wagtail "doc", but it keeps talking just about admin menu and for simple menu there nothing more than few simple hints about parent and children of the Page.
Thanks for any advice or link to doc.
You are correct that Wagtail itself does not include menu management features. If modifying templates to manipulate menus is not an adequate solution (e.g. site editors will need to modify the menu in the future), you will have to either create your own custom logic or use an external library like https://github.com/rkhleics/wagtailmenus.
I have just started working on a wiki where I want registered users to be able to post stuff. I want to have a link on the site which says something along the lines of
"Create new Entry" which when clicked will take the user to an editing template. When the user is done filling in his information and clicks the save button I want that information to be saved in an own page.
My question: What is the approach to achieving something like this?
tag:MediaWiki 1.19.2
PHP 5.3.14 (apache2handler)
MySQL 5.1.63-0+squeeze1-log
There are many URL parameters for editing pages which can do what you want, especially affecting the edit form. There is also an explicit Manual on creating pages with preloaded text, which includes a list of helpful extensions to do such tasks.
I used MultiBoilerplate for this. This extension is very useful because users can select from a drop down list of templates for various pages which can contain default text which users themselves can define.
Tip: if you use the option:
$wgMultiBoilerplateOptions = false;
in LocalSettings.php then administrators can add new templates via the wiki (so without having to change any configurations in php).
I'm a beginner on Opencart and just started developing a module for Opencart which it must inject some lines of javascript and html code in these pages:
- Cart Page
- Product Page
- Confirmation Order Page
- Register form page
The official documentation doesn't have informations about how can i do that, I've tried to find a good documentation about OpenCart but I didn't find anything.
I need help. How can I do that?
Diggin necro topics;) :
The easiest way i think:
upload/catalog/view/theme/[themename]/template/product/product.tpl - here you can add your custom html for product page
[your theme name, you shouldnt overwrite default theme because it can cause damage after update]
It depends on where you're trying to insert the HTML/JavaScript.
Doing things the proper way in OpenCart, you're limited to the column-left, column-right, content-top, and content-bottom positions.
The files you'll need to create are:
admin/controller/module/mymodule.php
admin/language/english/module/mymodule.php
admin/view/template/module/mymodule.tpl
catalog/controller/module/mymodule.php
catalog/language/module/mymodule.php
catalog/view/theme/default/module/mymodule.php
To learn how to do this the first time, it's easiest to replicate an existing stock OpenCart module (preferably a simple one, such as information). Once you've replicated it you'll need to go through each of those files and replace any references to "information" with "mymodule".
After that, if you've done it properly, you should be able to navigate to Admin > Extensions > Modules and see your module in there. Then install it, use the "Add module" button to position the module on all the relevant layouts, hit save and hey presto you have a working module on the front-end.
To modify the front-end output, just edit catalog/view/theme/default/module/mymodule.php
If you want to insert your HTML somewhere other than the 4 available positions OpenCart gives you, position your module in the content-bottom position and use JavaScript/jQuery to inject some HTML where you want.
If this is for your own personal website then as Pawel S suggested it would be easiest to simply modify the relevant view files (ie. catalog/view/theme/[themename]/template/product/product.tpl), however if you're making a module which you plan to distribute then this should be a last resort.
Hope that helps!
I realize this is probably long dead by now, but if you're creating a module that needs to modify existing controllers, languages, models or views the correct tool to use is vQMod.
vQMod allows you to modify existing code on the fly using XML.
https://code.google.com/p/vqmod/
I use trac to manage my projects and I'd like to organize wiki pages the same way trac project does, i.e. by category, subcategory, etc. TitleIndex page on trac site gives a good explanation of the result I want to obtain.
How do I achieve this?
First of all, you can create hierarchically wiki pages, just by modifying the url, and press enter. It is also possible to create a wikilink first, and then press the red link.
For example, when your trac home page is http://trac.server.local/project/wiki, you can type /customers at the end of the url, and press enter. So the new url would be http://trac.server.local/project/wiki/customers. You will get an almost empty page with a button Create this page. Press that button to create that page. After that you can also create pages at the next level, for example
http://trac.server.local/project/wiki/customers/microsoft
http://trac.server.local/project/wiki/customers/google
http://trac.server.local/project/wiki/customers/apple
To generate an index, I use the HierWikiPlugin. On the /wiki/customers page, I enter just
[[SubWiki(customers/,1)]]
to get a list of all subpages below customers. To also see the subpages of those subpages, increase the level, for example
[[SubWiki(customers/,2)]]
You can add subpages using something like:
[[./SubPage]]
This generates a link to a non-existent page. When you click on the link, Trac shows you a page to create a new sub page or a page in the same level...