Post by JNeuhoff » Thu Jun 29, 2017 11:48 am

Actually, creating twig-templates is harder, and for Opencart offers no major advantages.
It's easy enough to add support for the PHP template engine to the OC frontend.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by ovi » Thu Jun 29, 2017 5:25 pm

JNeuhoff wrote:
Thu Jun 29, 2017 11:48 am
Actually, creating twig-templates is harder, and for Opencart offers no major advantages.
It's easy enough to add support for the PHP template engine to the OC frontend.
It's not harder to create twig templates (you just have to get used to with twig), but I agree that twig doesn't offer any advantages for Opencart.

If anybody knows any real advantages of twig for OC please post them here, because IMO twig is not suitable for OC, because most extensions do changes in templates and now they must support 2 different versions: one for tpl (OC 1.5.x and OC 2.x) and the other for twig (OC 3.x +). And I still believe, based on the few tests I made, that twig slows down OC.
Last edited by ovi on Thu Jun 29, 2017 6:35 pm, edited 1 time in total.

ovi
Newbie

Posts

Joined
Sun Nov 09, 2014 12:31 am

Post by ashwani_multi » Thu Jun 29, 2017 5:55 pm

i m converting my all module 3.x found that much slower any suggestion

Opencart Quick checkout
View All modules
Any opencart issue contact me at support@opencartextensions.in

Thank you


User avatar
New member

Posts

Joined
Tue Dec 09, 2014 2:40 pm
Location - Ludhiana,Punjab,India

Post by DigitCart » Thu Jul 06, 2017 3:57 pm

Daniel wrote:
Fri Mar 03, 2017 2:04 pm
3. All files are only allowed to be written in extension folders, except templates which of course go under the template folder.
artcore wrote:
Mon Jun 26, 2017 6:54 pm
$allowed = array(
'admin/controller/extension/',
'admin/language/',
'admin/model/extension/',
'admin/view/image/',
'admin/view/javascript/',
'admin/view/stylesheet/',
'admin/view/template/extension/',
'catalog/controller/extension/',
'catalog/language/',
'catalog/model/extension/',
'catalog/view/javascript/',
'catalog/view/theme/',
'system/config/',
'system/library/',
'image/catalog/'
);
I am confused. Can we use the system/library directory?

My Extensions / DigitCart


User avatar
Active Member

Posts

Joined
Thu Jun 22, 2017 5:32 pm


Post by OpenCart Addons » Thu Jul 06, 2017 9:04 pm

DigitCart wrote:
Thu Jul 06, 2017 3:57 pm
I am confused. Can we use the system/library directory?
Yes, you can add extension files to system/library/

The OpenCart wiki has been updated to show what directories you're able to add extension files to.


Regards,
Joel.

Image
Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by ovi » Thu Jul 13, 2017 11:33 pm

Daniel wrote:
Fri Mar 03, 2017 2:04 pm
1. You are not allowed to modify any DB tables. If you need to store any data for your extension you need to create a new table and use joins.
Are we allowed to create indexes or the restrictions is for columns only?

ovi
Newbie

Posts

Joined
Sun Nov 09, 2014 12:31 am

Post by uksitebuilder » Fri Jul 14, 2017 12:23 am

You can of course do anything you like with the tables you create.

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by ovi » Fri Jul 14, 2017 2:52 am

ovi wrote:
Thu Jul 13, 2017 11:33 pm
Daniel wrote:
Fri Mar 03, 2017 2:04 pm
1. You are not allowed to modify any DB tables. If you need to store any data for your extension you need to create a new table and use joins.
Are we allowed to create indexes or the restrictions is for columns only?
What I meant is: Are we allowed to create indexes on Opencart's default tables?

ovi
Newbie

Posts

Joined
Sun Nov 09, 2014 12:31 am

Post by uksitebuilder » Fri Jul 14, 2017 1:30 pm

That would be modifying them, so I would say no, but it is a grey area.

If you believe there are tables that should be indexed that aren't currently indexed, you should probably put in a pull request at github for changes to the install sql

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by JNeuhoff » Mon Jul 31, 2017 7:14 pm

Daniel wrote:
Fri Mar 03, 2017 2:04 pm
3. All files are only allowed to be written in extension folders, except templates which of course go under the template folder.
This approach has the following subtle issue which should be resolved:

Assuming I install 3 different module extensions via the admin backend at

Extensions > Installer > Upload

where each module extension creates the same folder (highlighted in bold):
  1. admin/model/extension/module/my-module-1.php
  2. admin/model/extension/module/my-module-2.php
  3. admin/model/extension/module/my-module-3.php
If I then uninstall the first extension module via

Extensions > Installer > Uninstall

it will then remove the folder module
  1. admin/model/extension/module
leaving the 2nd and 3rd extension with a missing folder and its file. See also this github entry.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Daniel » Fri Aug 25, 2017 5:44 am

Ill fix this issue tomorrow.

OpenCart®
Project Owner & Developer.
OpenCart commercial support now available!


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by open4dev » Tue Sep 12, 2017 3:17 pm

Hello

I would like to ask some clarifications about the cloud version in order to decide the best approach for migrating my extensions.
1) It is not clear to me how/what will be stored in the cloud. Is there a document/link that explains in more detail this new app model?
2) Will there be a special "OC3 cloud version" or are we talking about the same software?
3) An extension of mine adds a new column (i.e. a new property) in the products table and an additional property for each product option. If I were to create new tables (instead of altering existing ones) for my extension that would be used with joins, I would have to create new tables to store the relations product_id-<new_property> and product_option_id-<new_option_property>. Since the products are the main concept of the app, these tables will replicate rather a lot of information for databases with a lot of products/product options. Is this the correct way to go?

Having the above clarifications would help me migrate my extensions respecting this new spirit of the cloud philosophy.
Thanks in advance
Best regards

open4dev (extensions page)


Newbie

Posts

Joined
Fri Oct 24, 2014 1:52 pm

Post by JNeuhoff » Tue Sep 12, 2017 8:27 pm

OK, I'll try to answer from what I have learned about the cloud version so far:
open4dev wrote:
Tue Sep 12, 2017 3:17 pm
I would like to ask some clarifications about the cloud version in order to decide the best approach for migrating my extensions.
1) It is not clear to me how/what will be stored in the cloud. Is there a document/link that explains in more detail this new app model?
Basically the hosting, no need to download and install on your own webhost. There is also the online marketplace for extensions for simple extension installs, though at the moment there's hardly any extensions listed in there.
open4dev wrote:
Tue Sep 12, 2017 3:17 pm
2) Will there be a special "OC3 cloud version" or are we talking about the same software?
From what I can see on github the cloud version is pretty much the same as the other OC 3.0.2.x release.
open4dev wrote:
Tue Sep 12, 2017 3:17 pm
3) An extension of mine adds a new column (i.e. a new property) in the products table and an additional property for each product option. If I were to create new tables (instead of altering existing ones) for my extension that would be used with joins, I would have to create new tables to store the relations product_id-<new_property> and product_option_id-<new_option_property>. Since the products are the main concept of the app, these tables will replicate rather a lot of information for databases with a lot of products/product options. Is this the correct way to go?
Any additional DB fields for e.g. the 'oc_product' or other tables would have to be stored in their own DB tables, and the model would have to be extended for the DB queries using SQL joins. Also the allowed folders for 3rd party extensions are more restrictive, too, you can see the list of allowed folders for extensions in file admin/controller/marketplace/install.php

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by open4dev » Thu Sep 14, 2017 2:39 pm

@JNeuhoff

Thanks for taking the time answering my questions, I appreciate that.

So if I understand it correctly I could opt-out from the cloud version, right? My modules will be installable when a user uses his/her own webhost but will not be installable in the cloud version. If later I decide to support the cloud version I could create a new version of my module specifically for the cloud.

Is my understanding correct?

JNeuhoff wrote:
Tue Sep 12, 2017 8:27 pm
Also the allowed folders for 3rd party extensions are more restrictive, too, you can see the list of allowed folders for extensions in file admin/controller/marketplace/install.php
Actually there is an additional hidden restriction: while the admin/controller/extension/ folder is allowed to be written, the way the permissions are checked in the admin/controller/startup/permission.php do not allow to create a sub-folder in the extension directory i.e. extension/my_module/my_controller.php will result in a "permission denied" page, while extension/my_controller.php will work ok. This is the case only for the controller part of the extension, language, model and template parts do not have this issue.
Last edited by open4dev on Thu Sep 14, 2017 10:11 pm, edited 1 time in total.

open4dev (extensions page)


Newbie

Posts

Joined
Fri Oct 24, 2014 1:52 pm

Post by imdevlper18 » Thu Sep 14, 2017 10:05 pm

Actually there is an additional hidden restriction: while the admin/controller/extension/ folder is allowed to be written, the way the permissions are checked in the admin/controller/startup/permission.php do not allow to create a sub-folder in the extension directory i.e. extension/my_module/my_controller.php will result in a "permission denied" page,
Thanks. Was shifting one extension and i created a folder as there were lot of files. But shall need to undo this.
Thanks for information.
Last edited by imdevlper18 on Thu Sep 14, 2017 11:47 pm, edited 1 time in total.

Opencart Extensions | Professional opencart support | Support Ticket | support@cartbinder.com


User avatar
Active Member

Posts

Joined
Sun May 11, 2014 2:04 pm


Post by JNeuhoff » Thu Sep 14, 2017 11:11 pm

Actually there is an additional hidden restriction: while the admin/controller/extension/ folder is allowed to be written, the way the permissions are checked in the admin/controller/startup/permission.php do not allow to create a sub-folder in the extension directory i.e. extension/my_module/my_controller.php will result in a "permission denied" page, while extension/my_controller.php will work ok. This is the case only for the controller part of the extension, language, model and template parts do not have this issue.
Thanks for pointing that one out. I came across the same issue and had to restructure my extensions accordingly.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by stalker780 » Sat Sep 30, 2017 12:42 am

Including anything except upload folder and install.xml in archive is now restricted for cloud extensions.

Is it possible to allow keeping at least install.txt or readme.txt file there?

Cause now people are asking questions without reading installation instructions I filled on a module page. Seems they are used to look inside archive and to search instructions there, but not on a download page.

At least for now OC3 and OC Cloud means the same. Right? Modules can be purchased via admin area (at least it's planned) the same as via marketplace on opencart.com. And in the last case people can explore archives.

Is it planned that OC3 and Cloud extensions will be different and|or incompatible? Or "Cloud" that's just a name of a new admin area marketplace?

Newbie

Posts

Joined
Thu Jan 03, 2013 6:00 pm

Post by JNeuhoff » Sat Sep 30, 2017 12:56 am

As you noticed they are now not allowing any files other than the upload folder and install.xml in the ocmod.zip file for the OpenCart Cloud version. The OpenCart site will soon be flooded with unneeded support requests because too many users won't find the online documentation on the OpenCart marketplace.

We may end supporting the OpenCart cloud installer and instead advise our customers to use the normal OpenCart extension installer.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by stalker780 » Sat Sep 30, 2017 1:27 am

open4dev wrote:
Thu Sep 14, 2017 2:39 pm
Actually there is an additional hidden restriction: while the admin/controller/extension/ folder is allowed to be written, the way the permissions are checked in the admin/controller/startup/permission.php do not allow to create a sub-folder in the extension directory i.e. extension/my_module/my_controller.php will result in a "permission denied" page, while extension/my_controller.php will work ok. This is the case only for the controller part of the extension, language, model and template parts do not have this issue.
I created both "extension/my_extension.php" file and "extension/my_extension" folder.
Leaving my_extension.php empty.

This placeholder file is used only to grant access for extension.

Newbie

Posts

Joined
Thu Jan 03, 2013 6:00 pm

Post by stalker780 » Sat Sep 30, 2017 1:40 am

JNeuhoff wrote:
Sat Sep 30, 2017 12:56 am
As you noticed they are now not allowing any files other than the upload folder and install.xml in the ocmod.zip file for the OpenCart Cloud version. The OpenCart site will soon be flooded with unneeded support requests because too many users won't find the online documentation on the OpenCart marketplace.

We may end supporting the OpenCart cloud installer and instead advise our customers to use the normal OpenCart extension installer.
Ahaha! :laugh:

It's better if they would restrict using AngularJS and other frameworks and selfwritten templates as Journal2 does :laugh:

Newbie

Posts

Joined
Thu Jan 03, 2013 6:00 pm
Who is online

Users browsing this forum: No registered users and 13 guests