Post by compmuseme » Thu Oct 21, 2021 1:33 am

I've created a couple of extensions during my most recent project and would like to contribute them to the project (total/gratuity and a working version of the Square payment extension).

Does anyone have an updated link to the OpenCart PHP CodeSniffer file, or a copy of it?
Broken link: https://github.com/opencart/opencart/tr ... s/OpenCart

Also, any clarification on the tabs and spacing for Twig and JavaScript files? The OpenCart coding standard says 2 space tabs for Twig and tabs for JavaScript, but many of the 3.0.x Twig files contain quite a bit of JavaScript; how should I reconcile this contradiction in standards and avoid extended back-and-forth or rejection of my code?

Thanks in advance for your time.

Brent/dabbmedia/compmuseme


Newbie

Posts

Joined
Wed Nov 30, 2011 12:39 am

Post by straightlight » Thu Oct 21, 2021 1:49 am

compmuseme wrote:
Thu Oct 21, 2021 1:33 am
I've created a couple of extensions during my most recent project and would like to contribute them to the project (total/gratuity and a working version of the Square payment extension).

Does anyone have an updated link to the OpenCart PHP CodeSniffer file, or a copy of it?
Broken link: https://github.com/opencart/opencart/tr ... s/OpenCart

Also, any clarification on the tabs and spacing for Twig and JavaScript files? The OpenCart coding standard says 2 space tabs for Twig and tabs for JavaScript, but many of the 3.0.x Twig files contain quite a bit of JavaScript; how should I reconcile this contradiction in standards and avoid extended back-and-forth or rejection of my code?

Thanks in advance for your time.
Regarding spaces on TWIG and JS files, see on the Opencart Github repository on the master branch's root folder. Previous versions don't have these criteria unfortunately.

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 compmuseme » Thu Oct 21, 2021 2:38 am

Right, it looks like all the JS on the master was moved to common.js (or out of the templates, at least). Not sure when that version will be released, would like to resolve some issues in 3.0.x for use now (and for users unable to move to version 4 upon release).

I suppose I will submit some pull requests and wait for my aspirations of being a valuable member of the community crushed, lol.

Brent/dabbmedia/compmuseme


Newbie

Posts

Joined
Wed Nov 30, 2011 12:39 am
Who is online

Users browsing this forum: No registered users and 11 guests