I want to show some custom text at "My personal information" page in customer's account using a plugin in Prestashop. I have no idea how to do this?
Any help is much appreciated!
It is not possible to do it by a plugin or module, because prestashop is not providing any HOOK for that page / place.
But you can do it by a little work out there. I am considering you are using prestashop 1.5 , so lets work with that.
1) First create a cms page at admin and note its id. Lets consider its id is 10.
2) Now open the file override/controllers/front/IdentityController.php . In this class file create a function like below.
public function initContent()
{
parent::initContent();
$identityCmsPage = new CMS(10, $this->context->language->id_lang);
$this->context->smarty->assign('identityCmsPage', $identityCmsPage);
}
Now after that, open file at your themes folder themes/your theme/indentity.tpl
and display that cms page contents like
{$identityCmsPage->content}
and you will have that cms page contents there.
Note: This code is not tested and may have errors. Please adjust accordingly if you got any.
Related
I am building a Shopify website https://fone-kase-plus.myshopify.com/.
For example, I want to modify code of this page only: https://fone-kase-plus.myshopify.com/pages/iphone-6 .
How is it possible to do it?
If you go in the admin, and to that page (from Online Store/Pages) on the right you will see "Theme Template" and a name. That's the template that is applied to that page.
That name is a file in your theme under templates with a name like page.your-template-name.liquid.
If you copy that file and create another one like page.another-template-name.liquid you can then apply that template only to the pages you want. Then you modify that template file to make a page as you like.
Title says it all. I want to create a custom prestashop page, but I don't know how.
What I actually want to do: create a button that opens a custom page. I can't find anything useful in the internet so I came here to ask for help. Could someone explain me how to do that?
There are many ways to add a new page, it depending in your needs.
By a CMS page, you can add the content you need in the HTML editor, like the product description: http://doc.prestashop.com/display/PS16/CMS+-+Managing+Static+Content
By a front controller from a module: https://devdocs.prestashop.com/1.7/modules/concepts/controllers/front-controllers/
By creating a new page, here my explanation: Prestashop custom page with own template
The point 1 is the most easy way for a common user, the rest of the points require advanced knowledge.
I'm trying to change the text "SKU" to something else on the Admin site, in two places:
On the Product Variant column header, when you're looking at the Product in the admin site.
On the Variant Options screen, under the Inventory header.
The purpose is to change the name for the Admin user to see something else, it doesn't need to impact the front end site. I already tried modifying the translation in en.default.json but that didn't work.
Its a build in text in the Shopify pages and code.
You can use a Javascript to do it by writing a Chrome/Firefox extension to do it or using a bookmarklet in your address bar.
A bookmraklet is a JS code which is running on the given page when you click it
Here are few samples:
http://www.hongkiat.com/blog/100-useful-bookmarklets-for-better-productivity-ultimate-list/
Well I want to make a custom page in opencart admin panel to insert and delete some data from opencart database
For example :
Set an image slider on opencart home page and fetching images from database & for insertion of images, I want to create a custom page in opencart admin panel ??
So how can it be possible ??
You can duplicate any module and create other for your needs. Remember to duplicate and change the filename so the "new" extension can work properly.
Folder to consider for admin:
admin->controller->{type of module}->module's name
admin->model->(type of module)->module's name
admin->language->english (always)->(type of module)->module's name
optional:
admin->language->(other languages)->(type of module)->module's name
you may try,
1,Login as Admin-> systems -> design ->banners -> insert ->
YOUR BANNER NAME-> add banner ->
Title: YOUR TITLE
Image: YOUR IMAGE -> Save
2, Login as Admin-> extensions -> Modules ->Slideshow -> Edit -> add Module -> SELECT YOUR BANNER -> Save
Also when duplicating modules be aware that you may also need to change the existing class name to different one. For example when duplicating module flat rate you will also need to change in the controller /admin/controller/shipping/flat.php :
class ControllerShippingFlat extends Controller {
to something new like :
class ControllerShippingFlatDuplicate extends Controller {
It's posible, but in my opinion if you want to create a new "admin page" in your Opencart you can do it using vqmod.
so, you don't have to rewrite any core file.
you can donwload any free extension on the opencart website to take an example
You can simply duplicate some simple modules available in opencart admin panel like Welcome module or Banner or Slideshow module.
This method will help you to disable the module or change the position of content in future.
Duplicating opencart module tutorial : http://opencart.hostjars.com/blog/58
As a beginner it's better to duplicate an existing module and modifying it as per requirement. When you get the idea of how opencart modules work, you can build modules from scratch.
Yes, it is pretty safe and sound to duplicate a module in opencart and it is a bit logical with any of the cms as no one is going to create a module from scratch for a very little functionality like inserting some values to database.
As depicts you just want to insert some images links, so you can proceed with replicating the catalog / information functionality in opencart admin panel.
You just need to create a new table in database to store new modules data and fetching new module data in front end.
If you want to create a custom module or custom page for your store you can check below link. There is complete solutions for your question and describe very deeply.
Create custom module: http://www.php-dev-zone.com/2015/02/opencart-custom-module-development.html
I have a component with several categories of games and I want to display a different banner depending on the category. I need the banner (and link) to be customizable so it's not simply a case of showing categoryX.jpg or whatever.
I saw this Joomla help page on another question, but it only seems to display a module type, not one specific module. I'd like to use various mod_custom modules and display the one appropriate to the category (I can store each module's ID if necessary).
Any ideas?
This can be done in a 2 step process:
Use the "Load module into article" plugin to allow yourself to access the module using a plugin call like:
{module [*mod_id*]} // where *mod_id* is the module id
Now that you can call a plugin to put your module anywhere, you now need to go to the view code of your/a component you wish to add the module to and add this code:
echo JHTML::_('content.prepare', '{module [*mod_id*]}');
Please see this link - http://www.alltogetherasawhole.org/group/developers/forum/topics/running-joomla-content-plugins - regarding point number 2. I was trying to do the same thing and I found it didn't work, and the reason for this was a comment you can find on the page link above:
"I noticed that some plugin actually expect option=com_content for them to process onPrepareContent properly, so you might actually want to "fool" them by callin JRequet::setVar and restoring the correct values after the trigger."
If you would like to show module within PHP code then use this code, it's worked for me :
<?php echo JHTML::_('content.prepare', '{loadposition position-2}'); ?>
If you want to show module inside html content then just put this code where you want to show module.
{loadposition position-2}
It loads all modules which are assigned to position-2.
You can also use the Joomla Module Renderer
$doc = JFactory::getDocument();
$renderer = $doc->loadRenderer('modules');
$position = 'custom_position_name';
$options = array('style' => 'raw');
echo $renderer->render($position, $options, null);
Just a heads up, Along with being assigned the module position, that module also has to be set to "Display on All pages".
Joomla has this functionality built in. You can use the {loadposition XX} command within your content items. You can specify custom module positions that do not appear in your template to insure that you have the correct module in the correct article.
http://docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F
You could create a new module?
If each category appears in the querystring (catid=X) then you could take a similar approach to https://support.pillwax.com/open-source/doku.php?id=joomla:header_image.
Alternatively, that link might actually do it for you.