How to know which site are running my module? - javascript

I am about to sell a module that I coded for e-commerce websites, and I was wondering if it's possible, to insert some extra code in it in order to know which websites are running the module.
In other words, let's say a customer buys my module, then install it on its website, is there a way for me to know which website it is ?
I don't want any other info than "which website", my goal is not to trace users, but simply to have a statistic of the number of websites where my module is installed (because, it can be for instance that a customer buy the module then install it on several other websites...)
Thanks for your help
Aymeric

Difficult to answer without knowing what you are running, PHP, JS, etc. but when I created a similar plugin for WordPress there are some hooks for when a plugin is activated/deactivated. I just put an HTTP call into my API that told me when someone activated or deactivated the plugin and I got a rough idea. I mean, if they don't deactivate it properly, e.g. delete the files, then you would get a false positive of them using it, but not many folk do that.

Related

Changing elements in free PrestaShop theme

I am new to prestaShop and have a few simple questions.
I've chosen this free template: https://ets-demos.com/theme/furniture/en/?fbclid=IwAR2r1GKUUyK5cch374ZhjOtzKBB3ZgGPQ7Uzct21Z7rIP89Atohle_81YGw
Can i change (without coding) the search tool, to be just a small rectangle below the magnifying glass instead of fullscreen?
Can I add facebook/msg/ig fixed references on the left?
If it is possible, or possible only with coding, please let me know.
I am asking these questions here, because the owner of the theme isn't supporting free templates with free technical support :P
Did any of PrestaShop users had a problem with installing it on simple home.pl simple start hosting? When the prestaShop is being installed on domain, it stops at 8% and failure to search file pops out.
Best regards, Martin
Unfortunately, without coding, these cannot be solved.
However, if you don’t have experience in coding, it won’t be an easy thing to do, as it also depends on the theme where to modify and what. These are not global things that apply equally to all themes.
Did any of PrestaShop users had a problem with installing it on simple
home.pl simple start hosting? When the prestaShop is being installed
on domain, it stops at 8% and failure to search file pops out.
What exactly error is displayed?
Your hosting provider may not meet all of the conditions required to run PrestaShop.
For better performance, you may want to choose a hosting provider that has hosting optimized for PrestaShop.
https://digital.com/best-web-hosting/prestashop/

Git adding, committing, and pushing from a website

I'm making a website as a collaboration tool. Several people could be using it, and I need the ability to, from the website, be able to add, commit, and push to git for all users. I had several ideas, but don't know how they'll pan out. Here are some of them:
Create an external Python program waiting for an event from the website. Then the Python program could access the terminal on the local machine and run the necessary commands to add, commit, and push to git.
 The issue with that is that the Python program would have to be running constantly on the local machine of every user of the website. I don't plan to have too many, but I think this would be VERY inconvenient.
Use some complicated JavaScript program to scrape GitHub and automate add, commit, and push through there. Don't think this is a good idea, but I'm open to it.
Will any of these work for what I need? If so, how would I implement them? Is there a formal way of adding, committing, and pushing to Git over the internet that I'm oblivious to? I've done a ton of research and come up empty-handed.
EDIT
Somebody in the comments suggested using the Github API. I didn't find anything useful, but if I'm not seeing something please point it out. I'm specifically looking for something to replace the usual git add ., git commit -m "message" and git push commands, but for my website to automate this.

Should Node.js only be used for "apps"?

Should Node.js be the basis of a website or be used only when certain functionality (eg. a chat room) is needed?
For example, in certain project, I'm using npm and have a node_modules folder and a package.json file in the main directory where all my code is.
However, the question I'm asking is whether or not this is good practice? Should Node.js only be used in, for example a chat-room/ folder? Or is it OK to use the same Node.js installation across an entire website, using when needed?
Many companies recently are having a hard job to detach their front end code from their server, hence, if you are starting a project from scratch, this is something you want to avoid.
Having low coupling applications will give you the flexibility to change your whole Front End stack without changing a single code in your API. Moreover, you will be able to use your API from different applications. They will now work independently.
The routing is how you define the URL, verb and opt parameters.
I hope that is what you have been struggling with.

How to add a "# users online" feature to Meteor app?

I'm working on a Meteor app and I want to add a feature that would say how many people are on the website at a time, similar to omegle.com where it says "38,000+ online now" or whatever. Is this possible with Meteor? If it is, I have no idea how to execute it, and that's why I'm asking it here. Does anybody know how to do this?
You can use presence package for that purpose, see https://atmospherejs.com/package/presence . It provides the live data on the user state. For example, the easiest way to get the number of online users is:
Presences.find({online: true}).count();

How can I calculate UPS shipping using NodeJS?

I'm developing a public e-commerce site in NodeJS and MongoDB, and I'm using forever instead of nginx or anything like that. (please let me know if I'm totally insane for doing this and why before I get too far along :)
As part of this site I need to calculate shipping, but I need to know that the numbers are spot on because I want to charge customers at checkout.
How could I set this up with Node.js?
I kind of have one solution, but I have no guarantee that it's accurate. Has anyone dealt with the UPS APIs using Node?
Thanks in advance for your help
Someone named Jesse D. Pate has developed a native UPS API. I have no idea if it's worthwhile, but the github repo is here, and it can be installed and toyed around with via
npm install ups_node
I think I've got it figured out ...now to start a Github project
This is a universal way to do it:
I modified the ./RatingPackage/PACKAGEXMLTools/Rate_Tool_SampleRequest.xml to include my information then I saved it as testRequest.xml then I posted it to https://wwwcie.ups.com/ups.app/xml/Rate (their test server) using the command
curl -X POST -d "`less testRequest.xml`" https://wwwcie.ups.com/ups.app/xml/Rate
and it returns an XML document that can then be converted to the (superior) json format and used in a web app.
I developed a node module with support for more functionality (and will continue improving) of the UPS API. With this module you can provide rating information, create a shipment, produce a label, void a shipment, track shipments, and perform address validation.
Check it out:
npm install shipping-ups
Read docs here: https://github.com/typefoo/node-shipping-ups

Categories