Skip to content

jeffsenso/prestashop-skills / skills/prestashop-module-development

prestashop-module-development

Verified

Complete PrestaShop module development workflow using modern architecture and best practices. Use when: creating new PrestaShop modules, updating legacy modules to modern code, implementing hooks and actions, setting up module configuration pages, adding front office features, handling database operations, implementing security measures, managing translations, creating cart rules and vouchers, building Symfony console commands, or modernizing existing PrestaShop modules from legacy patterns to current standards.

FileKindSize
CHANGELOG.mdmarkdown12.9 KB
README.mdmarkdown3.5 KB
SKILL.mdskill md21.7 KB
ps9-core-ai/CONTEXT.mdmarkdown6.4 KB
ps9-core-ai/Component/BackOfficeHelp/CONTEXT.mdmarkdown1.0 KB
ps9-core-ai/Component/Behat/CONTEXT.mdmarkdown7.7 KB
ps9-core-ai/Component/CQRS/CONTEXT.mdmarkdown6.8 KB
ps9-core-ai/Component/Configuration/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Component/Console/CONTEXT.mdmarkdown1.1 KB
ps9-core-ai/Component/Context/CONTEXT.mdmarkdown1.8 KB
ps9-core-ai/Component/ContextStateManager/CONTEXT.mdmarkdown2.0 KB
ps9-core-ai/Component/Controller/CONTEXT.mdmarkdown4.7 KB
ps9-core-ai/Component/Cookie/CONTEXT.mdmarkdown1.3 KB
ps9-core-ai/Component/Database/CONTEXT.mdmarkdown1.4 KB
ps9-core-ai/Component/Export/CONTEXT.mdmarkdown964 B
ps9-core-ai/Component/FacetedSearch/CONTEXT.mdmarkdown1.3 KB
ps9-core-ai/Component/Forms/CONTEXT.mdmarkdown6.1 KB
ps9-core-ai/Component/Grid/CONTEXT.mdmarkdown5.2 KB
ps9-core-ai/Component/Hook/CONTEXT.mdmarkdown1.1 KB
ps9-core-ai/Component/Import/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Component/Javascript/CONTEXT.mdmarkdown3.9 KB
ps9-core-ai/Component/Link/CONTEXT.mdmarkdown1.4 KB
ps9-core-ai/Component/Locale/CONTEXT.mdmarkdown1.7 KB
ps9-core-ai/Component/MailTemplate/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Component/Migration/CONTEXT.mdmarkdown10.6 KB
ps9-core-ai/Component/Playwright/CONTEXT.mdmarkdown6.4 KB
ps9-core-ai/Component/PositionUpdater/CONTEXT.mdmarkdown1.4 KB
ps9-core-ai/Component/Router/CONTEXT.mdmarkdown1.7 KB
ps9-core-ai/Component/Smarty/CONTEXT.mdmarkdown1.7 KB
ps9-core-ai/Component/TinyMCE/CONTEXT.mdmarkdown1.4 KB
ps9-core-ai/Component/Twig/CONTEXT.mdmarkdown3.9 KB
ps9-core-ai/Domain/Address/CONTEXT.mdmarkdown1.6 KB
ps9-core-ai/Domain/Alias/CONTEXT.mdmarkdown1.3 KB
ps9-core-ai/Domain/ApiClient/CONTEXT.mdmarkdown1.9 KB
ps9-core-ai/Domain/Attachment/CONTEXT.mdmarkdown1.2 KB
ps9-core-ai/Domain/AttributeGroup/CONTEXT.mdmarkdown1.9 KB
ps9-core-ai/Domain/Carrier/CONTEXT.mdmarkdown1.8 KB
ps9-core-ai/Domain/Cart/CONTEXT.mdmarkdown2.1 KB
ps9-core-ai/Domain/CartRule/CONTEXT.mdmarkdown1.6 KB
ps9-core-ai/Domain/CatalogPriceRule/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Domain/Category/CONTEXT.mdmarkdown1.8 KB
ps9-core-ai/Domain/CmsPage/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Domain/CmsPageCategory/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Domain/Combination/CONTEXT.mdmarkdown2.4 KB
ps9-core-ai/Domain/Configuration/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Domain/Contact/CONTEXT.mdmarkdown1.2 KB
ps9-core-ai/Domain/Country/CONTEXT.mdmarkdown1.8 KB
ps9-core-ai/Domain/CreditSlip/CONTEXT.mdmarkdown1.4 KB
ps9-core-ai/Domain/Currency/CONTEXT.mdmarkdown1.9 KB
ps9-core-ai/Domain/Customer/CONTEXT.mdmarkdown2.0 KB
ps9-core-ai/Domain/CustomerMessage/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Domain/CustomerService/CONTEXT.mdmarkdown2.3 KB
ps9-core-ai/Domain/Discount/CONTEXT.mdmarkdown2.4 KB
ps9-core-ai/Domain/Employee/CONTEXT.mdmarkdown2.3 KB
ps9-core-ai/Domain/Feature/CONTEXT.mdmarkdown1.6 KB
ps9-core-ai/Domain/Hook/CONTEXT.mdmarkdown1.1 KB
ps9-core-ai/Domain/ImageSettings/CONTEXT.mdmarkdown1.7 KB
ps9-core-ai/Domain/Language/CONTEXT.mdmarkdown1.7 KB
ps9-core-ai/Domain/MailTemplate/CONTEXT.mdmarkdown1.7 KB
ps9-core-ai/Domain/Manufacturer/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Domain/Meta/CONTEXT.mdmarkdown1.9 KB
ps9-core-ai/Domain/Module/CONTEXT.mdmarkdown1.6 KB
ps9-core-ai/Domain/Notification/CONTEXT.mdmarkdown1.3 KB
ps9-core-ai/Domain/Order/CONTEXT.mdmarkdown2.6 KB
ps9-core-ai/Domain/OrderMessage/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Domain/OrderReturn/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Domain/OrderReturnState/CONTEXT.mdmarkdown1.6 KB
ps9-core-ai/Domain/OrderState/CONTEXT.mdmarkdown1.9 KB
ps9-core-ai/Domain/Position/CONTEXT.mdmarkdown996 B
ps9-core-ai/Domain/Product/CONTEXT.mdmarkdown2.7 KB
ps9-core-ai/Domain/Profile/CONTEXT.mdmarkdown1.7 KB
ps9-core-ai/Domain/Search/CONTEXT.mdmarkdown1.6 KB
ps9-core-ai/Domain/SearchEngine/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Domain/Security/CONTEXT.mdmarkdown1.7 KB
ps9-core-ai/Domain/Shipment/CONTEXT.mdmarkdown1.8 KB
ps9-core-ai/Domain/Shop/CONTEXT.mdmarkdown2.0 KB
ps9-core-ai/Domain/ShowcaseCard/CONTEXT.mdmarkdown1.4 KB
ps9-core-ai/Domain/SqlManagement/CONTEXT.mdmarkdown1.6 KB
ps9-core-ai/Domain/State/CONTEXT.mdmarkdown1.7 KB
ps9-core-ai/Domain/Store/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Domain/Supplier/CONTEXT.mdmarkdown2.1 KB
ps9-core-ai/Domain/Tab/CONTEXT.mdmarkdown1.5 KB
ps9-core-ai/Domain/Tag/CONTEXT.mdmarkdown1.4 KB
ps9-core-ai/Domain/Tax/CONTEXT.mdmarkdown1.6 KB
ps9-core-ai/Domain/TaxRulesGroup/CONTEXT.mdmarkdown1.7 KB
ps9-core-ai/Domain/Theme/CONTEXT.mdmarkdown1.7 KB
ps9-core-ai/Domain/Title/CONTEXT.mdmarkdown1.6 KB
ps9-core-ai/Domain/Webservice/CONTEXT.mdmarkdown1.9 KB
ps9-core-ai/Domain/Zone/CONTEXT.mdmarkdown1.3 KB
ps9-core-ai/GOTCHAS.mdmarkdown3.9 KB
ps9-core-ai/MULTISTORE.mdmarkdown3.1 KB
ps9-core-ai/STRUCTURE.mdmarkdown11.1 KB
ps9-core-ai/bin/generate-ai-index.shscript17.9 KB
ps9-core-ai/generated/cqrs.mdmarkdown16.1 KB
ps9-core-ai/generated/entities.mdmarkdown2.7 KB
ps9-core-ai/generated/hooks.mdmarkdown3.7 KB
ps9-core-ai/generated/routes.mdmarkdown88.8 KB
references/cart-rules.mdmarkdown8.9 KB
references/configuration-management.mdmarkdown11.9 KB
references/configuration-page.mdmarkdown11.0 KB
references/database-and-entities.mdmarkdown5.7 KB
references/debugging.mdmarkdown5.9 KB
references/entity-doctrine.mdmarkdown12.5 KB
references/forms.mdmarkdown8.5 KB
references/grid-system.mdmarkdown41.0 KB
references/hooks-and-front-office.mdmarkdown8.2 KB
references/legacy-conversion.mdmarkdown3.5 KB
references/module-class-and-installer.mdmarkdown13.7 KB
references/module-structure.mdmarkdown3.4 KB
references/security.mdmarkdown2.4 KB
references/services-and-di.mdmarkdown20.8 KB
references/services-split.mdmarkdown6.0 KB
references/theme-template-injection.mdmarkdown7.4 KB
references/translations.mdmarkdown8.6 KB
references/validation.mdmarkdown2.5 KB
scripts/grid.bundle.jsscript4.4 KB
scripts/translatable-form.bundle.jsscript9.8 KB

scripts/translatable-form.bundle.js

View on GitHub
/**
 * Locale-switcher bundle for PrestaShop TranslatableType forms.
 *
 * USAGE:
 *   1. Copy this file to views/js/{modulename}.form.bundle.js in your module.
 *   2. Replace every occurrence of MODULENAME with your actual module name (lowercase).
 *   3. Load it in your Twig template's {% block javascripts %} block (see configuration-page.md).
 *
 * What it does:
 *   Listens for clicks on .js-locale-item (the language dropdown items rendered by TranslatableType).
 *   Emits a "languageSelected" event, then hides all .js-locale-input fields and shows
 *   only the one matching the selected locale (.js-locale-{iso}).
 *   Updates the .js-locale-btn button label to the selected ISO code.
 *
 * This bundle is required whenever a configuration or entity form contains a TranslatableType
 * field. Without it, clicking a language in the dropdown has no effect.
 *
 * @author    Websenso <bonjour@websenso.com> (https://www.websenso.com)
 * @copyright Since 2009 Websenso
 * @license   https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
 */
window.MODULENAME_form = function (e) { function t(r) { if (n[r]) return n[r].exports; var o = n[r] = { i: r, l: !1, exports: {} }; return e[r].call(o.exports, o, o.exports, t), o.l = !0, o.exports } var n = {}; return t.m = e, t.c = n, t.i = function (e) { return e }, t.d = function (e, n, r) { t.o(e, n) || Object.defineProperty(e, n, { configurable: !1, enumerable: !0, get: r }) }, t.n = function (e) { var n = e && e.__esModule ? function () { return e.default } : function () { return e }; return t.d(n, "a", n), n }, t.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, t.p = "", t(t.s = 12) }({ 11: function (e, t, n) { "use strict"; function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } Object.defineProperty(t, "__esModule", { value: !0 }); var o = function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t } }(), i = n(16), s = window.$, u = function () { function e(t) { r(this, e), t = t || {}, this.localeItemSelector = t.localeItemSelector || ".js-locale-item", this.localeButtonSelector = t.localeButtonSelector || ".js-locale-btn", this.localeInputSelector = t.localeInputSelector || ".js-locale-input", s("body").on("click", this.localeItemSelector, this.toggleLanguage.bind(this)), i.EventEmitter.on("languageSelected", this.toggleInputs.bind(this)) } return o(e, [{ key: "toggleLanguage", value: function (e) { var t = s(e.target), n = t.closest("form"); i.EventEmitter.emit("languageSelected", { selectedLocale: t.data("locale"), form: n }) } }, { key: "toggleInputs", value: function (e) { var t = e.form, n = e.selectedLocale, r = t.find(this.localeButtonSelector), o = r.data("change-language-url"); r.text(n), t.find(this.localeInputSelector).addClass("d-none"), t.find(this.localeInputSelector + ".js-locale-" + n).removeClass("d-none"), o && this._saveSelectedLanguage(o, n) } }, { key: "_saveSelectedLanguage", value: function (e, t) { s.post({ url: e, data: { language_iso_code: t } }) } }]), e }(); t.default = u }, 12: function (e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(11), o = n.n(r); (0, window.$)(function () { new o.a }) }, 16: function (e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), t.EventEmitter = void 0; var r = n(17), o = function (e) { return e && e.__esModule ? e : { default: e } }(r); t.EventEmitter = new o.default }, 17: function (e, t, n) { "use strict"; function r(e) { console && console.warn && console.warn(e) } function o() { o.init.call(this) } function i(e) { if ("function" != typeof e) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e) } function s(e) { return void 0 === e._maxListeners ? o.defaultMaxListeners : e._maxListeners } function u(e, t, n, o) { var u, l, a; if (i(n), l = e._events, void 0 === l ? (l = e._events = Object.create(null), e._eventsCount = 0) : (void 0 !== l.newListener && (e.emit("newListener", t, n.listener ? n.listener : n), l = e._events), a = l[t]), void 0 === a) a = l[t] = n, ++e._eventsCount; else if ("function" == typeof a ? a = l[t] = o ? [n, a] : [a, n] : o ? a.unshift(n) : a.push(n), (u = s(e)) > 0 && a.length > u && !a.warned) { a.warned = !0; var c = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit"); c.name = "MaxListenersExceededWarning", c.emitter = e, c.type = t, c.count = a.length, r(c) } return e } function l() { if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments) } function a(e, t, n) { var r = { fired: !1, wrapFn: void 0, target: e, type: t, listener: n }, o = l.bind(r); return o.listener = n, r.wrapFn = o, o } function c(e, t, n) { var r = e._events; if (void 0 === r) return []; var o = r[t]; return void 0 === o ? [] : "function" == typeof o ? n ? [o.listener || o] : [o] : n ? h(o) : v(o, o.length) } function f(e) { var t = this._events; if (void 0 !== t) { var n = t[e]; if ("function" == typeof n) return 1; if (void 0 !== n) return n.length } return 0 } function v(e, t) { for (var n = new Array(t), r = 0; r < t; ++r)n[r] = e[r]; return n } function p(e, t) { for (; t + 1 < e.length; t++)e[t] = e[t + 1]; e.pop() } function h(e) { for (var t = new Array(e.length), n = 0; n < t.length; ++n)t[n] = e[n].listener || e[n]; return t } var d, y = "object" == typeof Reflect ? Reflect : null, g = y && "function" == typeof y.apply ? y.apply : function (e, t, n) { return Function.prototype.apply.call(e, t, n) }; d = y && "function" == typeof y.ownKeys ? y.ownKeys : Object.getOwnPropertySymbols ? function (e) { return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)) } : function (e) { return Object.getOwnPropertyNames(e) }; var m = Number.isNaN || function (e) { return e !== e }; e.exports = o, o.EventEmitter = o, o.prototype._events = void 0, o.prototype._eventsCount = 0, o.prototype._maxListeners = void 0; var _ = 10; Object.defineProperty(o, "defaultMaxListeners", { enumerable: !0, get: function () { return _ }, set: function (e) { if ("number" != typeof e || e < 0 || m(e)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + "."); _ = e } }), o.init = function () { void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0 }, o.prototype.setMaxListeners = function (e) { if ("number" != typeof e || e < 0 || m(e)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + "."); return this._maxListeners = e, this }, o.prototype.getMaxListeners = function () { return s(this) }, o.prototype.emit = function (e) { for (var t = [], n = 1; n < arguments.length; n++)t.push(arguments[n]); var r = "error" === e, o = this._events; if (void 0 !== o) r = r && void 0 === o.error; else if (!r) return !1; if (r) { var i; if (t.length > 0 && (i = t[0]), i instanceof Error) throw i; var s = new Error("Unhandled error." + (i ? " (" + i.message + ")" : "")); throw s.context = i, s } var u = o[e]; if (void 0 === u) return !1; if ("function" == typeof u) g(u, this, t); else for (var l = u.length, a = v(u, l), n = 0; n < l; ++n)g(a[n], this, t); return !0 }, o.prototype.addListener = function (e, t) { return u(this, e, t, !1) }, o.prototype.on = o.prototype.addListener, o.prototype.prependListener = function (e, t) { return u(this, e, t, !0) }, o.prototype.once = function (e, t) { return i(t), this.on(e, a(this, e, t)), this }, o.prototype.prependOnceListener = function (e, t) { return i(t), this.prependListener(e, a(this, e, t)), this }, o.prototype.removeListener = function (e, t) { var n, r, o, s, u; if (i(t), void 0 === (r = this._events)) return this; if (void 0 === (n = r[e])) return this; if (n === t || n.listener === t) 0 == --this._eventsCount ? this._events = Object.create(null) : (delete r[e], r.removeListener && this.emit("removeListener", e, n.listener || t)); else if ("function" != typeof n) { for (o = -1, s = n.length - 1; s >= 0; s--)if (n[s] === t || n[s].listener === t) { u = n[s].listener, o = s; break } if (o < 0) return this; 0 === o ? n.shift() : p(n, o), 1 === n.length && (r[e] = n[0]), void 0 !== r.removeListener && this.emit("removeListener", e, u || t) } return this }, o.prototype.off = o.prototype.removeListener, o.prototype.removeAllListeners = function (e) { var t, n, r; if (void 0 === (n = this._events)) return this; if (void 0 === n.removeListener) return 0 === arguments.length ? (this._events = Object.create(null), this._eventsCount = 0) : void 0 !== n[e] && (0 == --this._eventsCount ? this._events = Object.create(null) : delete n[e]), this; if (0 === arguments.length) { var o, i = Object.keys(n); for (r = 0; r < i.length; ++r)"removeListener" !== (o = i[r]) && this.removeAllListeners(o); return this.removeAllListeners("removeListener"), this._events = Object.create(null), this._eventsCount = 0, this } if ("function" == typeof (t = n[e])) this.removeListener(e, t); else if (void 0 !== t) for (r = t.length - 1; r >= 0; r--)this.removeListener(e, t[r]); return this }, o.prototype.listeners = function (e) { return c(this, e, !0) }, o.prototype.rawListeners = function (e) { return c(this, e, !1) }, o.listenerCount = function (e, t) { return "function" == typeof e.listenerCount ? e.listenerCount(t) : f.call(e, t) }, o.prototype.listenerCount = f, o.prototype.eventNames = function () { return this._eventsCount > 0 ? d(this._events) : [] } } });
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall