Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Addon installer concept


piernas

Recommended Posts

4 minutes ago, piernas said:

That's the main difference, then. I want to make a public addon. Any vampire who wants to improve it is welcome.

 

If you realy think its needed and get good support for it then Im happy to help.

 

 

Link to comment
Share on other sites

@justcatering Even simpler. Here is my logic for vampires :D

Developer:

  • Create a directory
  • Place all new catalog files of your addon under /catalog directory, with their directory structure.
  • Place all new admin files of your addon under /admin directory, with their directory structure.
  • Create a .php class file like the one I posted in a previous post. It will contain extra actions needed. The installl() method will run your needed queries etc...
  • Place the instructions needed for the addon at the root in a file called  ie."instructions.txt".
  • create a zip file and publish the addon/send it to your customer.

Shopowner:

  • Download the addon
  • Go to the admin ->installer
  • Press the upload button, choose the zip file.

The addon is uncompressed by oscommerce and placed in a temp directory

The installer does some checks (if the addon is already the version is correct, if the oscommerce version is correct and whatever other checks needed along with copirights, programmer's website and other info).

  • Installer reads the class file, processes and shows all that information along with the contents of the install.txt file to the user.
    • If it's installed and version is higher it prompts the shopowner to update it
    • If it's installed and version is same or lower it disables install button, warns the user and offers removing install files.
    • If it is not, prompts for installing it for the first time
  • If the shopowner agrees and presses install/update button then the installer copies the files in temp/catalog/ and temp/admin to the root of the shop (renaming admin if needed) and calls install() method of the class file. There is where the programmer can add methods,  for example, to add a configruration constant or create a new table. Standard methods for some processes could be done by installer while other ones should be processed by the class itself.
  • The installer updates the "installed modules" database table and prompts for removing the files from temp directory. Job done!

Then if you want to know what you have installed with the installer go to the "installed moodules page" that would show info about all of the installed addons.

Example: You want to create an install package for a new language:

  • copy new language files on catalog/ and admin/ folders respectively
  • create the class file on the root. It should have the DB queries to create the entry on the languages db table.
  • zip it.

The user just upload the file, sees the information you introduced in screen ie  (This is a frenck language pack, for oscommerce 6.9.75). If you don't have that language installed the install button shows. You press it and the installer uncompresses, copies files and adds the needed database rows. That's it!

 

 

 

 

Link to comment
Share on other sites

8 minutes ago, wHiTeHaT said:

i put a point on facts.
If you take your knowledges, your studies as a personal credit, i cannot help you with that being offended for it.
I have just make a statement to a fact where YOU as a personality try to make a statement of your historical learning-curve, claiming something that in "these days", things where more perfect.
Sorry, to bad for you that my opinion not fit into your historical story.
My opinion is based on most of the current reality.
not 10/20 years ago when rules in IT was limited to resources.
I like to stay to current facts.
I will not go arround them.
There is also no point in try to dislike my points with trying to cover up for points you make are not ligit anymore.
I never want to underestimate old skill. Contrary......... i like it.
But do not to make the "old way of things" over-rule today's standard.
And for that disparagingly what is reality.
Keep in mind, i like old vision, old way of things, simplify.
Just not try to make something that is not a faxt, to make it a fact.
I not like that and it makes things stand out more out of reality then it is.
In dutch" Schep niet zo op"

I think you just like the sound of your own voice! With an atitude like yours Im sure you have made your milions and are living a cool life.

 

Link to comment
Share on other sites

4 minutes ago, wHiTeHaT said:

The problem i disturb on is....................
Why the installer must have an extra file to check what i have installed.
 

To, among other things, inform you on what are you installing, if you already installed it, what version is it, who wrote the addons, what's the support website or any other convenient information. The installer is done to perform common tasks, gather information for the installed addon tables, ask for user input....

Edited by piernas
Link to comment
Share on other sites

3 minutes ago, wHiTeHaT said:

My intentions are not just for YOU.
My voice is not just FOR YOU.
I feel content in how you feel content for yourself. I have 0 problem with it.
I just cannot accept making claims, read by others, and make them believe YOU are right.
Nothing in what i SAY, i claim to be right in it.
But i like the responds, just like you just doing..... make them put a POINT EXCLAMATION to it.
So...... for that.... i gratefully thank you!

I have no idea what you are ranting on about, but if you can not be civil don't say anything. Have a good evening :)

 

Link to comment
Share on other sites

16 minutes ago, wHiTeHaT said:

[you can tell me 1000 story's about it, it just will not hook into the statement i made,]

Yes, obviously I'm not trying to convince you, it's clear you want to do it your own way and you're persuading me to not do it. I just answered your question about the purpose of the class file.

Link to comment
Share on other sites

On 15/4/2018 at 8:20 PM, TITO4 said:

Hola JUanma.

For those of us with scarce abilities in coding it would be a dream come true. I liked Contribution Tracker for osCommerce 2.3      At least you had an easy way to track for updates of your installed addons. I had it on my Gold versions, but it doesn't work in the newest EDGE shops.

I think I've fixed the addon to work with edge. How can I test it? Do I have to manually create an entry for an addon?

Link to comment
Share on other sites

@wHiTeHaT We're walking in circles with this conversation.

What is your initial goals? To put my grain of sand soing this.

Would you like that this installer become a core functionality?  Yes. My idea or another that works.

If so, what does the current project leader say about it? This

What can we do as a community to make that installer work? (if it is accepted to become a core functionality). Get feedback/discuss/program

But even when it is not.................
What do we need to do....
What we need to follow?
Can't do much myself. I'm not the person who can take those decisions. I just can purpose it to be discussed.

You've talked to a couple of developers. It would be nice if you ask them to join here and expose their oppinion, but I suppose they've already seen the thread and it doesn't interest them to discuss it, right?

 

Link to comment
Share on other sites

I'm sorry. English is not my native tongue (not youurs I think), so I can't follow you unless you talk clear.

What I'm understanding (of course I may be totally wrong) is that you have some ongoing issue with @burt . If I'm right, I think you should solve it with him and not in this thread.

Link to comment
Share on other sites

@piernas I like this idea, but am concerned that it will take up a lot of your time and dev's won't get behind you.  I know how hard this can be, to have little to no help, or worse, dev's actively causing trouble and holding you back :(

But, if you can get a working prototype for testing...it would help to illuminate the way forward. 

Always, it's the best way;  chat and discussions just go circular and lead nowhere.  People have different ideas of how things should be done, and even if the "best way" is not your way...this is your idea.  Therefore you make it how you want, chit-chat is a total waste of time and effort, if the other parties are set on doing things another way.

Edited by burt
Link to comment
Share on other sites

Long thread, I hadn't read it all yet. How about the App Marketplace concept that Harold had started? And the framework...I wonder how much work to get there...

https://library.oscommerce.com/Online&en&oscom_2_4&developers&framework.

 

 

On 4/15/2018 at 8:59 AM, piernas said:

Now that oscommerce community version allows more an more addons with no core code changes I feel an uploader/installer would make things simpler and also help a lot those newcomers that does not have the knowledge to ftp files.

We don't have a repository adapted to it, but we could ideate a simple system that allows to upload a zip file by browser, uncomprees it, do some preliminar checks like if the addon is currently installed and is compatible with the system and with copying files/making registry entries when user press "install".

Been playing with the idea of something like the paypal app updater and came up with this:

installer.thumb.jpg.097fb801ed5c650b6dfe4db9a09b2ac4.jpg

Would like to get feedback from developers about it. It would need, of course, that developers agree with packaging the addons with a certain structure and provide with a file that performs the tasks.

Do you consider interesting to make a similar system?

 

 

Link to comment
Share on other sites

9 hours ago, piernas said:

@burt I have most of the schema done - it's simple as I mentioned before. Need to write the uploading and uncompressing routine to have a functional prototype. If someone is interested in taking a look I'll find a free afternoon next week to finalise it.

Happy to give some time to help with this. let me know when you have somthing and I can help with testing on a couple of my test sites.

 

Link to comment
Share on other sites

Addons are sometimes more complicated than first glance...

An addon could consist of (eg);

1.  product_info content module
2.  sub modules for that content module
3.  action
4.  hook

Not sure how you're going to approach that...but something to think about.

The majority of well coded addons;

  1. dont change core code
  2. consist of up to three files [main, lang, tpl]
  3. consist of one "thing" (bm_, cm_, etc), not usually more than one

It might be that your prototype deals with the "easy" addons first?
And can then be extended to deal with complicated addons?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...