Prestashop module admin panel with custom view - view

I need to know how to create a module on Prestashop with a custom view on admin. The documentation is very poor and I don't understand how to call a view with parameters passed by the controller. I'm using Prestashop version 1.6.
I already did these steps:
Created XML.
Created controller with constructor and install/uninstall.
Created table on DB and class.
Linked on admin menu my module.
When I go to my tab on admin panel I see a table with my db data. I need to load a custom tpl file where I can customize completely my page.
I have read so many guides and documentation (ufficial or not) but nothing clear.

Just follow the HTML and CSS in getCOntent() function in your main php file.
Whatever HTML and CSS return getContent() function will be view of your module in admin panel.
Just concentrate in getContent function of other existing module and you will get what you want.
I f you want to load a separate view than create it separate and load it in getContent() function.

Related

How do I get Magento 2 data to use in the template?

I am starting in the Magento development world, and I'm creating a new theme.
On my theme, I have a block which displays business contact info, but I don't know how to get the data from the store.
I have to make a custom menu as well, but stop in the same problem: getting category data from the store.
I also wanted to know if there is any place where you can find more references on this data return issue, such as what available methods and classes are available, for example.
Where do you want to display the custom data ? In a product page or your custom module's separate page ?
If you want to use custom block in sidebar you can follow steps given here
https://aureatelabs.com/magento-2/how-to-add-a-static-block-in-a-sidebar-column-magento-2/.
Here are some ref you can use:
https://itectec.com/magento/magento-magento-2-get-custom-module-data-in-theme-phtml/
https://code.vky.co.in/display-custom-module-collection-data-frontend-magento-2/

How do I use strapi.query from within my custom admin plugin (UI)?

I have created a blank plugin via strapi generate:plugin test. Everything was created just fine and the menu item in strapi backoffice appears as expected. I have also created a custom content type "product" via strapi UI.
Now I want to query existing products from a custom view provided by my custom plugin.
I have read the documentation twice. It always suggests to use a global strapi object to access a query function strapi.query(...).
The (global) strapi object exists, but it does NOT provide the query function... What am I missing?

Create admin front with a simple form via a module [Magento]

I am pretty new to Magento and am trying to understand how to create admin (backend) page. I have figured how to create/define the controller and action (along with editing the config.xml).
But now the next problem at hand is to display a simple form in that page. I understand that, I have an option to create blocks and mention the blocks in a layout.xml. But from what I figure is that layout.xml needs to be present in the theme folder. Which I can't do as my magento extension will be installed and I have no access to the user's system.
So the doubt is. How to display a simple from in a backend (admin) page
without having to make any changes to the theme's layout ?
For the admin panel module you don't need to mention the block in the layout.xml of your theme, you only need it to be defined in config.xml file in your "app/code/local///etc/" and a layout file is created in "app/design/adminhtml/default/default/".inside the Block create a folder named "Adminhtml" inside it your can create your form.
Refer this
http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/how_to_create_an_admin_form_module

How to retrieve configuration values immediately after they're saved

I'm using a system.xml file to add a new section to to my Magento installation in app/code/local/NameSpace/Module/etc/system.xml. I've read that you can create an IndexController and override postAction() however of all the examples I've seen a custom layout is used rather than system.xml, is there a reason for this or can controllers be made to work for both of them?
If they can't is there any other way to have a file run after the user clicks 'Save Config' so I can immediately start using the values with Mage::getStoreConfig()?

Does Magento loads every xml file from the layout folder?

When calling $this->loadLayout() in your controller, does Magento fetches all of the xml files from the layout folders in the current design package?
I am trying to figure out how the customer login form pulls out the template from:
persistent/customer/form/login.phtml, is it because there is only a layout file: persistent.xml present?
EDIT:
I figured it out I didn't see there is a new module in 1.6.1.0 and also there are changes in model resource names
The customer login form pulls in because of the template or code block type referenced in that block's XML tag (in persistent.xml).

Resources