Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@prestashopcorp/builtfor-generator-vanilla
Advanced tools
Built for PS generator with customization option
This CLI allow you to generate a Built For PS with different parameters: PrestaShop version, Billing i sandbox or not, Billing environment, Product ID (which allow to use different pricing model)
First of all you need to install composer, please refer to the Linux / Unix / MacOS instruction or Windows instructions.
npm i -g @prestashopcorp/builtfor-generator-vanilla
or
yarn global add @prestashopcorp/builtfor-generator-vanilla
Launch in a terminal this command
builtforGen -id <productId> [...other options]
Generate Built for PS for PrestaShop
Options:
-id, --productId <productId> Technical id of the Built for PS. This id will be used to generate the Built for PS with the proper value. Ths value should match the product family item configured
in Chargebee, otherwise you must create it.
--psVersion <version> Description of the Built for PS (choices: "1.7", "8", default: "8")
-s --sandbox Use this flag to generate a Built for PS in sandbox mode
-e, --environment <environment> Specify an environment when you don't want to use the production (choices: "prestabulle1", "prestabulle2", "prestabulle3", "prestabulle4", "prestabulle5",
"prestabulle6", "preprod")
-t, --template <template> Specify a template when you want to handling display of yours plans (choices: "standard", "handle",
default: "standard")
-wd, --workingDir <path> Directory where the Built for PS will be created. You can specify a relative or an absolute path. (default: "tmp")
-d, --description <description> Description of the Built for PS (default: "Built for PS in Vanilla JS for PrestaShop")
-name, --displayName <name> Display name of the Built for PS
-c, --context <context> This option allow you to inject some information within the context. Please give a stringified json: '{"foo": "bar"}' (default: {})
--customCancellation Use this flag to activate custom cancellation modal
-h, --help display help for command
You need to use this when the Built For PS documentation about billing, mention to add info within the context from your Javascript (in configure.tpl).
In this case please refer to the documentation to known which JSON structure should be used.
Example:
// JSON which allow you to specify the unit when using a stairstep pricing model, in order to display
// the proper information in the plan page into the funnel
{
"product": {
"components": [
{
"id": "rbm_example_stairstep", // this is the pricing id in chargebee
"unitDescription": "Users"
}
]
}
}
This script provide some registered configuration to save time. In this case the module generated is compatible with PS version 1.7, and all config are in sandbox.
builtforRegistered -c <config>
Generate Built for PS for PrestaShop with registered whole configuration
Options:
-c, --config <config> Select your registered configuration (choices: "flat_bulle1", "flat_bulle2", "flat_bulle3", "flat_bulle4", "flat_bulle5", "flat_bulle6", "flat_preprod", "flat", "flat_handle_bulle1",
"flat_handle_bulle2", "flat_handle_bulle3", "flat_handle_bulle4", "flat_handle_bulle5", "flat_handle_bulle6", "flat_handle_preprod", "flat_handle", "stairstep_bulle1", "stairstep_bulle2",
"stairstep_bulle3", "stairstep_bulle4", "stairstep_bulle5", "stairstep_bulle6", "stairstep_preprod", "stairstep")
-h, --help display help for command
Generate a flat fee module
The product id is the key that makes this module flat fee
builtforGen -id rbm_example -s -e prestabulle2 -d "PS 1.7 | Built for PS with a flat fee pricing in sandbox for prestabulle2" --psVersion "1.7"
Generate a flat fee module with predefined configuration
This command is the equivalent of the one above
builtforRegistered -c "flat_bulle2"
Generate a flat fee with handle plan module
The product id is the key that makes this module flat fee
builtforGen -id rbm_example -s -e prestabulle2 -d "PS 1.7 | Built for PS with a flat fee pricing in sandbox for prestabulle2" --psVersion "1.7" -t "handle"
Generate a flat fee with handle plan and predefined configuration
This command is the equivalent of the one above
builtforRegistered -c "flat_handle_bulle2"
Generate a flat fee module with the offer already selected
The product id is the key that makes this module flat fee
builtforGen \
-id rbm_example \
-s \
-e prestabulle2 \
-d "PS 1.7 | Built for PS with a flat fee pricing in sandbox for prestabulle2. Selection automatic of the plan." \
--psVersion "1.7" \
-c '{"offerSelection": {"offerPricingId": "builtfor_example-ultimate-EUR-Monthly"}}'
Generate a stairstep module
The product id is the key that makes this module stairstep with one plan
builtforGen \
-id rbm_example_stairstep \
-s \
-e prestabulle2 \
-d "PS 1.7 | Built for PS with a stairstep pricing in sandbox for prestabulle2" \
--psVersion "1.7" \
-c '{"product": {"components": [{"id": "rbm_example_stairstep", "unitDescription": "Users" }]}}'
Generate a stairstep module with preselected step
The product id is the key that makes this module stairstep with one plan
builtforGen \
-id rbm_example_stairstep \
-s \
-e prestabulle2 \
-d "PS 1.7 | Built for PS with a stairstep pricing in sandbox for prestabulle2" \
--psVersion "1.7" \
-c '{"product": {"components": [{"id": "rbm_example_stairstep", "unitDescription": "Users" }]}, "offerSelection": {"offerPricingId": "rbm_example_stairstep", "offerQuantity": 255}}'
** Generate a stairstep module with a frequency switcher
builtforGen \
-id builtfor_example_stairstep \
-name 'Builtfor Stairstep Example' \
-e prestabulle2 \
--psVersion 1.7 \
--template frequency \
-c '{"offerSelection": {"offerPricingId": "builtfor_stairstep-EUR-Monthly","offerQuantity": 1 }}'
Generate a flat fee module
The product id is the key that makes this module flat fee
builtforGen -id rbm_example -d "PS 8 | Built for PS with a flat fee pricing in sandbox for prestabulle2"
Generate a stairstep module
The product id is the key that makes this module stairstep with one plan
builtforGen \
-id rbm_example_stairstep \
-d "PS 8 | Built for PS with a stairstep pricing" \
-c "{\"product\": {\"components\": [{\"id\": \"rbm_example_stairstep\", \"unitDescription\": \"Users\" }]}}"
yarn install
# Built for classic generator
yarn start
# Built for classic generator in watch mode
yarn start:dev
# Built for registered configuration
yarn start_reg
# Built for registered configuration in watch mode
yarn start_reg:dev
yarn build
FAQs
Built for PS generator with customization option
The npm package @prestashopcorp/builtfor-generator-vanilla receives a total of 0 weekly downloads. As such, @prestashopcorp/builtfor-generator-vanilla popularity was classified as not popular.
We found that @prestashopcorp/builtfor-generator-vanilla demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.