Post by BYOLARIS4 » Sun Jan 19, 2020 7:33 pm

OC 3.1.0.0 - USING TWIG FILES - SOME MODIFIED VIA ADMIN PANEL


Hi, I've got a little extension to save me some time and scrape some Aliexpress product name, description and image for me on the product modification page but I can't add it to my store.

Upload via admin installer page: showing up when uploaded ->go to modification page -> not showing there

I've read somewhere that the problem comes from the fact that I've modified some twig files directly from the admin panel so these twig files are not even writable?

What can I do? Exploring Opencart for 2 weeks so I have a lot of things to learn :)

extensions name : ......ocmod.zip
extensions folder : ->install.xml
->upload

Install.xml ;

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
    <modification>
	<name>Get product from Aliexpress</name>
	<code>get_product_from_aliexpress_ocmod</code>
	<version>2.x</version>
    <author>byolaris</author>
	<link>http://mysite.com</link>
	<file path="admin/controller/catalog/product.php">
		<code>modify_powerby_text</code>
		<operation>
			<search><![CDATA[public function add() {]]></search>
			<add position="after"><![CDATA[
				$this->document->addScript('../admin/view/javascript/getSingleProduct/aliexpress.js');
				]]>
			</add>
		</operation>
		<operation>
			<search><![CDATA[public function edit() {]]></search>
			<add position="after"><![CDATA[
				$this->document->addScript('../admin/view/javascript/getSingleProduct/aliexpress.js');
				]]>
			</add>
		</operation>
	</file>
	<file path="admin/controller/catalog/mproduct.php">
		<operation>
			<search><![CDATA[public function add() {]]></search>
			<add position="after"><![CDATA[
				$this->document->addScript('../admin/view/javascript/getSingleProduct/aliexpress.js');
				]]>
			</add>
		</operation>
		<operation>
			<search><![CDATA[public function edit() {]]></search>
			<add position="after"><![CDATA[
				$this->document->addScript('../admin/view/javascript/getSingleProduct/aliexpress.js');
				]]>
			</add>
		</operation>
	</file>
    </modification>
i can I manually import the upload folder via FTP but where I need to put the XML? UPDATDE :
Or do I need to convert this XML with other attributes so I can add the code to the desired twig files?
Need help O0

Thanks in advance :bang:
Last edited by BYOLARIS4 on Sun Jan 19, 2020 9:54 pm, edited 1 time in total.

Newbie

Posts

Joined
Thu Jan 02, 2020 6:01 am

Post by JNeuhoff » Sun Jan 19, 2020 7:53 pm

Upload the unzipped XML file as 'get_product_from_aliexpress.ocmod.xml' to your 'system' folder, and then try again to do a Refresh via the admin's Extensions > Modifications.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by BYOLARIS4 » Sun Jan 19, 2020 8:51 pm

JNeuhoff wrote:
Sun Jan 19, 2020 7:53 pm
Upload the unzipped XML file as 'get_product_from_aliexpress.ocmod.xml' to your 'system' folder, and then try again to do a Refresh via the admin's Extensions > Modifications.
Just tried but doesn't seem to work, same effect

Newbie

Posts

Joined
Thu Jan 02, 2020 6:01 am

Post by straightlight » Sun Jan 19, 2020 10:16 pm

Either your folder permissions are not properly configured or your storage folder is not located outside of your public_html folder. For folder permissions, see the install.txt file from the downloaded package of Opencart's original ZIP file downloaded from opencart.com . For your storage folder configuration, see this FAQ: viewtopic.php?f=176&t=200804#p717782

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 JNeuhoff » Mon Jan 20, 2020 1:29 am

Also, use OpenCart 3.0.3.2, not 3.1.0.0, as the latter is an alpha-release, whereas the first one is the latest stable release.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by paulfeakins » Fri Jan 29, 2021 12:28 am

Unfortunately it seems like they're getting rid of OCMOD entirely in 3.1.0.0:
"As of OpenCart 3.1.0.0+ OCMOD will be removed from the OpenCart source code. Only the event system will be used for modifications."
https://github.com/opencart/opencart/wi ... ion-System

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by straightlight » Fri Jan 29, 2021 12:29 am

paulfeakins wrote:
Fri Jan 29, 2021 12:28 am
Unfortunately it seems like they're getting rid of OCMOD entirely in 3.1.0.0:
"As of OpenCart 3.1.0.0+ OCMOD will be removed from the OpenCart source code. Only the event system will be used for modifications."
https://github.com/opencart/opencart/wi ... ion-System
Yup.

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 fegdeed » Fri Jan 29, 2021 3:01 am

straightlight wrote:
Fri Jan 29, 2021 12:29 am
paulfeakins wrote:
Fri Jan 29, 2021 12:28 am
Unfortunately it seems like they're getting rid of OCMOD entirely in 3.1.0.0:
"As of OpenCart 3.1.0.0+ OCMOD will be removed from the OpenCart source code. Only the event system will be used for modifications."
https://github.com/opencart/opencart/wi ... ion-System
Yup.
Why not give the ability to use them both? So people can decide whether they prefer to use ocmod or events?
Unless there's a security issue with using ocmod(which I have not seen any reports of that), why eliminate it completely when a lot of extensions on the marketplace uses it?

Image
Get a secure, fast, and reliable web hosting service from https://turnuphosting.com.


Active Member

Posts

Joined
Fri Sep 21, 2018 12:01 am

Post by mikeinterserv » Fri Jan 29, 2021 3:17 am

Trying to tread the line between competent developers and everyone else is NO easy task :-)

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by straightlight » Fri Jan 29, 2021 3:40 am

mikeinterserv wrote:
Fri Jan 29, 2021 3:17 am
Trying to tread the line between competent developers and everyone else is NO easy task :-)
So what are you saying? That between those lines developers are incompetent?

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 » Fri Jan 29, 2021 3:41 am

fegdeed wrote:
Fri Jan 29, 2021 3:01 am
straightlight wrote:
Fri Jan 29, 2021 12:29 am
paulfeakins wrote:
Fri Jan 29, 2021 12:28 am
Unfortunately it seems like they're getting rid of OCMOD entirely in 3.1.0.0:
"As of OpenCart 3.1.0.0+ OCMOD will be removed from the OpenCart source code. Only the event system will be used for modifications."
https://github.com/opencart/opencart/wi ... ion-System
Yup.
Why not give the ability to use them both? So people can decide whether they prefer to use ocmod or events?
Unless there's a security issue with using ocmod(which I have not seen any reports of that), why eliminate it completely when a lot of extensions on the marketplace uses it?
That is the reason why, exactly; you haven't seen any reports of that. However, the main issue was not about security but rather compatibility issues among different extensions.

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 fegdeed » Fri Jan 29, 2021 3:51 am

straightlight wrote:
Fri Jan 29, 2021 3:40 am
mikeinterserv wrote:
Fri Jan 29, 2021 3:17 am
Trying to tread the line between competent developers and everyone else is NO easy task :-)
So what are you saying? That between those lines developers are incompetent?
Lol I wonder what he meant by that... :laugh:

Image
Get a secure, fast, and reliable web hosting service from https://turnuphosting.com.


Active Member

Posts

Joined
Fri Sep 21, 2018 12:01 am

Post by mikeinterserv » Fri Jan 29, 2021 3:52 am

straightlight wrote:
Fri Jan 29, 2021 3:40 am
So what are you saying? That between those lines developers are incompetent?
Probably only you came away with that impression, clearly not what I meant at all
Actually do you EVER READ ANYTHING properly

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by fegdeed » Fri Jan 29, 2021 4:00 am

straightlight wrote:
Fri Jan 29, 2021 3:41 am
That is the reason why, exactly; you haven't seen any reports of that. However, the main issue was not about security but rather compatibility issues among different extensions.
That's understandable...

Image
Get a secure, fast, and reliable web hosting service from https://turnuphosting.com.


Active Member

Posts

Joined
Fri Sep 21, 2018 12:01 am

Post by straightlight » Fri Jan 29, 2021 4:04 am

fegdeed wrote:
Fri Jan 29, 2021 4:00 am
That is the reason why, exactly; you haven't seen any reports of that. However, the main issue was not about security but rather compatibility issues among different extensions.
[/quote]
That's understandable...
[/quote]

It sure is. For many years, users have encountered countless conflicts as the master branch involves other approach to publish the extensions through the Marketplace. :)

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 » Fri Jan 29, 2021 4:05 am

mikeinterserv wrote:
Fri Jan 29, 2021 3:52 am
straightlight wrote:
Fri Jan 29, 2021 3:40 am
So what are you saying? That between those lines developers are incompetent?
Probably only you came away with that impression, clearly not what I meant at all
Actually do you EVER READ ANYTHING properly
That's simply because I might of been the first one who read it.

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 fegdeed » Fri Jan 29, 2021 4:08 am

mikeinterserv wrote:
Fri Jan 29, 2021 3:52 am
straightlight wrote:
Fri Jan 29, 2021 3:40 am
So what are you saying? That between those lines developers are incompetent?
Probably only you came away with that impression, clearly not what I meant at all
Actually do you EVER READ ANYTHING properly
Chill guys, let's not start a war of words over difference of opinions. :)

Image
Get a secure, fast, and reliable web hosting service from https://turnuphosting.com.


Active Member

Posts

Joined
Fri Sep 21, 2018 12:01 am

Post by mikeinterserv » Fri Jan 29, 2021 5:35 am

straightlight wrote:
Fri Jan 29, 2021 3:40 am
mikeinterserv wrote:
Fri Jan 29, 2021 3:17 am
Trying to tread the line between competent developers and everyone else is NO easy task :-)
So what are you saying? That between those lines developers are incompetent?
Well I don't want to interrupt the thread but its done so here's what I mean

Maybe I should say - Trying to tread the line between developers and everyone else is NO easy task :-)

Meaning that OC tries to cater for NON developers ie ANYBODY and his dog to use opencart, then the commercial side of selling extensions and themes and mods etc etc etc. so the ANYBODY user can add functionality and all sorts to their store WITHOUT a developer. This is where the problems come mainly because ANYBODY can mess things up easily. So while opencart tries to TREAD THE LINE between good solid code that a developer can take and say hey you know this is good I can do something with this. and the ANYBODY user who needs all the STUFF the developer probably does not, there comes a place where its NOT ideal for either the ANYBODY user OR the DEVELOPER - It's hard, maybe impossible to make it perfect for BOTH as sometimes what's good for ONE is NOT good for the other. THEN there is the changing of METHODS - It WAS vqmod - then OCMod then EVENTS - NOW ONLY EVENTS a constant evolution that DOES NOT SUIT EVERYBODY - DEVELOPER or ANYBODY user. The last thing I would do is bring into question the integrity of ANY regular contributor here. If It came across that way I am sorry, I hope my explanation helps.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by straightlight » Fri Jan 29, 2021 6:26 am

mikeinterserv wrote:
Fri Jan 29, 2021 5:35 am
straightlight wrote:
Fri Jan 29, 2021 3:40 am
mikeinterserv wrote:
Fri Jan 29, 2021 3:17 am
Trying to tread the line between competent developers and everyone else is NO easy task :-)
So what are you saying? That between those lines developers are incompetent?
Well I don't want to interrupt the thread but its done so here's what I mean

Maybe I should say - Trying to tread the line between developers and everyone else is NO easy task :-)

Meaning that OC tries to cater for NON developers ie ANYBODY and his dog to use opencart, then the commercial side of selling extensions and themes and mods etc etc etc. so the ANYBODY user can add functionality and all sorts to their store WITHOUT a developer. This is where the problems come mainly because ANYBODY can mess things up easily. So while opencart tries to TREAD THE LINE between good solid code that a developer can take and say hey you know this is good I can do something with this. and the ANYBODY user who needs all the STUFF the developer probably does not, there comes a place where its NOT ideal for either the ANYBODY user OR the DEVELOPER - It's hard, maybe impossible to make it perfect for BOTH as sometimes what's good for ONE is NOT good for the other. THEN there is the changing of METHODS - It WAS vqmod - then OCMod then EVENTS - NOW ONLY EVENTS a constant evolution that DOES NOT SUIT EVERYBODY - DEVELOPER or ANYBODY user. The last thing I would do is bring into question the integrity of ANY regular contributor here. If It came across that way I am sorry, I hope my explanation helps.
A way that you chose to go into. That's all it is. Therefore, strong words from somebody who wants to provide assistance to other users. In the mean time, Events are more useful than people believes since it does not override other peoples' extensions. It's ironic isn't it ? After so many years of battling with VQMod and OCMod files, now that Opencart has come with a more dynamic solution, until the master branch might be released - so to speak, above, and other posts about it, seem to contain contradicted opinions about its Engine. While the Journal fans do have their own versions stating that OCMod / VQMod, as Events might probably never replace new files but might provide its workaround with the core, these people don't seem to bother to have a 10 times heavier package installed on their stores where its own (Journal) Engine simply travels around the platform instead of using Events inside the platform. Well, isn't that a big coincidence? !

Journal, being the most heaviest and unsupported package of all times for Opencart can already be handled by the Events Engine itself while people still worries about the deprecation of OCMod and VQMod, regardless of using a cache Engine or not, which can override other extension lines by a simple search and replace. In addition, Journal also uses its own cache Engine. If we compare all these distributions, altogether, which one would cause the lease trouble becomes the question.

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
Who is online

Users browsing this forum: integraa, Semrush [Bot] and 264 guests