Post by halfhope » Tue Jun 29, 2021 6:11 am

Extension Page

The module is an extended version of the "Custom Templates" module. It differs in that it works without ocmod, can replace any tpl / twig file in the engine, has an extended set of conditions for replacing templates and is distributed under a different license. It is a close relative of the "Extended layout" module.

Benefits
  • Uses events, works without embedding into files
  • Compatible with 99% of themes
  • Doesn't affect performance
  • User-friendly interface
Capabilities
  • The module allows you to replace any template files (tpl/twig) in OpenCart, depending on the conditions
  • Shows a list of modifiers and strings that make changes to the file of the template being replaced
For example

You can set the selected template (tpl/twig):
  • for a page of a specific product, category, manufacturer, products in the selected category, etc.
  • for the site header, for the selected customer group
  • slideshow module for mobile devices (and any other modules and devices)
  • for the module of recommended products in the selected categories
  • for specific blog posts of any news / article module
  • for the product page of the manufacturer Apple, only for registered users who logged in from a mobile device using the USD currency (all at the same time)
Available filters
  • Categories (for category and product pages)
  • Manufacturers (for manufacturer and product pages)
  • Information pages (for information pages)
  • Products (for product pages)
  • Languages
  • Currencies
  • Customer groups
  • Stores (multi-store)
  • Ranges (from 0 to a, from a to b, from b or more) - Cost of items in the cart, number of items in the cart, subtotal, weight,
  • Device type (Mobile, Tablet, Desktop)
  • Platform (Windows, Linux, MacOS and others)
  • Browser (Chrome, FireFox, Opera and others)
  • Custom $ _GET parameter. For example, gallery_id=2 or record_id=12 or route=gallery/gallery, you can use multiple values ​​separated by commas
Compatibility
  • OpenCart/OcStore 2.3 and 3.x.
  • Languages Russian, English
  • Compatible with 99% of themes
Demo Demo description

9 templates are replaced in the demo module:
  • Template of the home page, for desktop PCs (Desktop)
  • Template of categories Windows, PC, MP3 Players
  • Template of manufacturers Apple, Hewlett-Packard, Sony, for Russian language
  • Template of products from the category Windows, Macs
  • Template of products from Canon manufacturers
  • Template of selected products - Apple Cinema 30, HP LP3065
  • Featured Products module template for Canon, Palm products
  • Featured Products Module template for Windows, Macs Category Pages
  • Featured Products Module template for Guests
License
  • The license covers one store / multi-store + subdomain.
  • The purchase of the module entitles you to receive updates for 1 year.
Checksums
  • custom_templates_pro_v1.1_oc_v2.3.ocmod.zip md5 c5ab746383393a8dea094e4537c3f689
  • custom_templates_pro_v1.1_oc_v3.x.ocmod.zip md5 74304e289e90ac0ed9dc566bf4d13370
Installation
  • Install the module through the "Extension Manager".
  • After installation, go to "Extensions > Modules" and install the "Custom templates Pro" module.
Manual
  • Template paths are specified without file extension. For example, common/home or extension/module/featured.
  • The template to be replaced is assigned in the first pop-up window. The template that will replace it is in the second (in the form with conditions).
  • Be careful not to forget about third-party modifiers that make changes to the template files. The module has a function of displaying a list of modifiers that make changes to the file of the replaced template.
Extension Page

My FREE extensions in marketplace. [ security | flexibility | speedup ]


User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego

Post by straightlight » Wed Jun 30, 2021 8:07 pm

Uses events, works without embedding into files
Not referring to the extension itself but ... miraculous just having to read this line from users ...

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by halfhope » Wed Jun 30, 2021 8:26 pm

straightlight wrote:
Wed Jun 30, 2021 8:07 pm
Uses events, works without embedding into files
Not referring to the extension itself but ... miraculous just having to read this line from users ...
Thanks to @osworx for introduction in event system. Using the event system lifted my spirits and breathed a new life into my modules. Also, I wrote short event system guide on Russian https://opencartforum.com/blogs/entry/4 ... -23-3x-4x/

Sorry for bad English:)

My FREE extensions in marketplace. [ security | flexibility | speedup ]


User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego

Post by straightlight » Wed Jun 30, 2021 8:44 pm

Not sure which Events documentation from OSWorX you're referring too but the official one is located here: https://github.com/opencart/opencart/wiki/Events-System . As for the Russian version you did, however, if it is compliant with the one that is already in English, it might be a great addition for Russian users to know in the Russian section of the forum as well in order to encourage more users to use Events in the future. Also take note that the Russian version you made refers to a specific extension rather than the use of a development roadmap from the Events engine provided by the core.

Furthermore, $data is not the original delivered array or scalar from the core as the conventional name. It is rather called: $args in these scenarios.

Code: Select all

public function eventControllerDesignLayoutBefore (& $ route , & $ args ) { # code }   
		
	

	public function eventViewDesignLayoutListAfter (& $ route , & $ data , & $ output ) { # code }    
		
	

	public function eventModelDesignLayoutgetLayoutsAfter (& $ route , & $ args , & $ output ) { # code }   
	
These three line portions, as an e.g, seem to shows mixed second parameter as their conventional names for instance.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Wed Jun 30, 2021 8:55 pm

So to add, $ this -> _events instance variable does not seem to provide it's origin where it first started in your e.g .

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Wed Jun 30, 2021 8:59 pm

This section:
In catalog, the paths of view triggers before / after will be different. For example, catalog / view / common / header / before, catalog / view / default / template / common / header / after. This is due to the use of design templates in the catalog section.
(code below on the page) does not actually provide in comments if you are using a /before or /after based on their parameters. Also, no $this->load->view e.g is provided with the searched line being replaced rather than using the $result variable (which I am not sure where this one leads too either). However, as an alternative to $this->load->view , the extension folder must be encouraged to be used at all times when building an extension. String variables could be used to manipulate a template, although it might be less ... preferred but I guess this goes to the developer's preferences on this particular one.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by halfhope » Wed Jun 30, 2021 10:15 pm

Not sure which Events documentation from OSWorX you're referring too but the official one is located here
It was just a couple of words and a piece of code in PM. That was enough for me.
Also take note that the Russian version you made refers to a specific extension rather than the use of a development roadmap from the Events engine provided by the core.
This version for Russian developers who "already in OpenCart", not for explaining for newbie and copy/paste. It shows a conceptual model showing triggers/setters/getters/events and all done in a single short file, this much easier to understand event system. No documentation needed for simple code. We know about official wiki, they don't need to translate. But I'll add link to official wiki.
Furthermore, $data is not the original delivered array or scalar from the core as the conventional name. It is rather called: $args in these scenarios
These three line portions, as an e.g, seem to shows mixed second parameter as their conventional names for instance.
I know about this, I use the same names that are used in Loader class which starts events. The choice of variable names is always up to the developer. $data and $args differ in semantic meaning.
So to add, $ this -> _events instance variable does not seem to provide it's origin where it first started in your e.g .
In example - they're private static without setters/getters.
(code below on the page) does not actually provide in comments if you are using a /before or /after based on their parameters. Also, no $this->load->view e.g is provided with the searched line being replaced rather than using the $result variable (which I am not sure where this one leads too either). However, as an alternative to $this->load->view , the extension folder must be encouraged to be used at all times when building an extension. String variables could be used to manipulate a template, although it might be less ... preferred but I guess this goes to the developer's preferences on this particular one.
Yes, I haven't written much. But I didn't really want to chew everything.

Thank you. Tomorrow I will edit the article and samples.

My FREE extensions in marketplace. [ security | flexibility | speedup ]


User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego
Who is online

Users browsing this forum: No registered users and 6 guests