Howto hook or inject code inside orders admin page in openecart - opencart

how inject code inside orders admin page in openecart
Iam developing a module in opencart 3 I need away to hook codes (HTML or JavaScript or PHP ) inside admin order page or inside admin orders list page from the module. is that possible ?
in WordPress that is easy , there is a loot of hooks that developers can use , but in open cart i didn't find anything .

Related

wagtail customized admin panels

is there a way of customizing my own admin panel , not in terms of styling. What i wish to achieve is a analytics tab , similar to wagalytics . The issue im having with wagalytics is that it is using google analytics , and google analytics is blocked by most adblockers and Mozilla fire fox , making the data really unreliable. As such i wish to utitlize other services like django-analytical to my wagtail administration page with a graph similar to that of wagalytics . However , i have not yet found any resources online that teaches me to override the admin and create my own customized panel (different from the customized tabs here ).
Could someone point me towards the right direction?
To add a page (link) to the Wagtail admin menu, you can use the hook register_admin_menu_item.
Create a file my-app/wagtail_hooks.py and this will be run by Wagtail to hook in custom functionality.
rom django.urls import reverse
from wagtail.core import hooks
from wagtail.admin.menu import MenuItem
#hooks.register('register_admin_menu_item')
def register_frank_menu_item():
return MenuItem('Frank', reverse('name-of-analytics-url'), classnames='icon icon-folder-inverse', order=10000)
You will need to set up the view with whatever reporting/graphs yourself, you could look into the source of wagalytics or simply serve whatever reporting django-analytics makes available.
If you want the templates your view use to extend the Wagtail admin templates, you can do this using the wagtailadmin/base.html. e.g. {% extends "wagtailadmin/base.html" %}. Note: you may need to add 'wagtail.admin', to your INSTALLED_APPS.

React + Django app refreshes for every deletion in Django admin panel

I'm not really sure what to share (i.e. which part of my application code) as I'm still a beginner with React so please bear with me.
I have a React application running on top of a Django application. Basically, there are Django Admin Panel URLS, REST API URLS in Django, and one path to catch all paths that don't belong to the first two groups.
I have a page (or a React Container) that calls Django's REST API to query all entries in the users DB Table. This part is okay but what I've noticed is, everytime I manually delete a row in the Django Admin Panel, the whole page refreshes. What are possible reasons for this?
By the way, I'm using Redux as well to manage the whole application state.

create an admin's like application in django

Im really confused about what is all i need to consider for creating a django aplication with almost similar functionality to it's own admin.
The index page should deploy the list of models the user has access to modify or create...almost the same as when you put admin.site.register(MyModel) but with permission restriction. Im not sure how should i ckeck permissions, and show 1 ,2 or many "ModelAdmis" on my main page.
btw admin users are redirected to the admin index page, non-admins go to my page
Before you consider creating a django admin from scratch, you should read the answers to this question Django Admin app or roll my own?
I couldn't find any resource on how to create a django admin from scratch, but here's what you should do if this is your first time overriding a framework's functionality (in my humble opinion):
Understand and make sure you are comfortable with the django admin app
start from the docs https://docs.djangoproject.com/en/1.7/#the-admin
Head over to the django admin app source code so you can start reading the internals of the functionality you want to implement/override in your new admin app.
source code can be found here https://github.com/django/django/tree/master/django/contrib/admin
(this may involve reading other apps source code too)
After those two steps you should have an idea on how the admin app is implemented and it's dependencies, then you can start creating your custom admin app.
an example on how this may go can be found in this qestion:
How to override Django admin's views?
If you are building something new, try to separate the UI from the backend. You can build your UI using react, angular or whatever and interact with django using the API. To build the API you can use the Django Rest Framework.
Don't use the Django Admin as a public interface. Use that only for the admins!
If you start to use the Django Admin as interface for your public site, you'll fight with the package to tailor and secure the views to avoid destructive actions. What happen if you forget a readonly field? What if the user deleted something ON_CASCADE?
Building the UI you are totally free and you can customise easily everything without fighting the django admin package (it's awesome package but is not provided for public use)

DjangoCMS: Application Integration and using CMS content on non-cms (app) pages?

I am using DjangoCMS for a website, and I am trying to add a registration app . Putting it in all works well, at the moment hard-coded into the urls conf, BUT, I would like to use the CMS to set the content on some of pages in the registration flow..
e.g. on the few pages the registration app uses in its flow, like "register", "activate", "activation expired", etc I would like to use CMS content for the relatively static texts, teasers, etc... using text and other plugins, etc.
(I tried to setup pages in django-cms that mirror the same page structure as the registration pages (e.g. as my registration page is under /account/register I created a account page with a child-page register .. and added the template for the registration form to the CMS templates...). This works with some CMSs, but not with djano-cms... :-(.. the moment django-cms takes over the views from the registration app don't get involved anymore, and so forms don't work, etc... )
Is there any way to do this?
As i remember, you can use a show_placeholder tag to display info from any placeholder of any page. So put your registration urls before the ones of django-cms and put in your page some tags referring to your special CMS page (that page should now show up in menu, surely).

Joomla : how to create a Wrapper (iFrame) in tthe Backend Khepri Template

Hello freinds I need help as to how can I add 2 iFrames in the Joomla's Default Back-end Template Khepri.
I want to show the Hosting cPanel and also another application's Control Panel in these iFrames.
Kindly help.
The correct way to do this is to add a new module to the admin. Log in to your Joomla admin then select Extensions > Module Manager > Administrator.
This will get you to the modules manager for the administrative area. It works just like the front end. Click New module, then select Custom HTML and put your iFrame code in there.