Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
01cb67b
Merge pull request #2 from genecommerce/main
garymawdsley-gene Dec 11, 2024
71a08e5
Update config.yml
garymawdsley-gene Dec 11, 2024
6c425a3
Merge pull request #3 from genecommerce/feature/improve_ci_perf
garymawdsley-gene Dec 11, 2024
56ba493
Adding rollup-plugin-delete to prevent dist files from being duplicat…
garymawdsley-gene Dec 13, 2024
55d656e
Merge pull request #4 from genecommerce/feature/add-rollup-plugin-delete
garymawdsley-gene Dec 16, 2024
4392b87
Adding npm run build-watch workflow and github action
garymawdsley-gene Dec 16, 2024
09b9731
Merge pull request #5 from genecommerce/feature/automate-workflow
garymawdsley-gene Dec 17, 2024
9b41306
Remove private dependencies
convenient Jan 10, 2025
071ff49
renamed everything that related to gene better checkout
Nehaenko Jan 15, 2025
c21fab2
added small fix for renaming work
Nehaenko Jan 20, 2025
aa78932
build develop*
convenient Jan 23, 2025
1c1837f
Merge remote-tracking branch 'origin/feature/module-rename-work' into…
convenient Jan 23, 2025
7b7a682
Merge remote-tracking branch 'origin/remove-private-dependencies' int…
convenient Jan 23, 2025
d99631d
[bot] generate dist (https://github.com/genecommerce/better-checkout-…
Jan 23, 2025
9e7b1cf
Merge pull request #10 from genecommerce/develop-merge-all
convenient Jan 23, 2025
ccdb08c
Renaming the checkout layout file
garymawdsley-gene Jan 30, 2025
011be02
Merge pull request #2 from BlueFinchCommerce/feature/rename-layout-file
garymawdsley-gene Jan 30, 2025
6c2e962
Updating Circle CI config
garymawdsley-gene Jan 31, 2025
d7f966f
Merge pull request #3 from BlueFinchCommerce/feature/circle-ci-update
garymawdsley-gene Jan 31, 2025
b711b5f
Updating examples for component and callback extension to us actual e…
garymawdsley-gene Feb 17, 2025
535ad52
Updating the new component styles and the readme
garymawdsley-gene Feb 17, 2025
d14ba92
Merge pull request #4 from BlueFinchCommerce/feature/changes-for-how-…
garymawdsley-gene Feb 18, 2025
e979968
Updating the workflow and contributing documentation to the core chec…
garymawdsley-gene Feb 19, 2025
cac51a1
Merge pull request #5 from BlueFinchCommerce/feature/update-contribut…
garymawdsley-gene Feb 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ version: 2.1
jobs:
build:
docker:
- image: cimg/php:8.2.15-browsers
- image: cimg/mariadb:10.4
- image: cimg/php:8.3-browsers
- image: cimg/mariadb:10.6
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: m2build
- image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
- image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
environment:
transport.host: 127.0.0.1
network.host: 127.0.0.1
Expand All @@ -16,8 +16,12 @@ jobs:
discovery.type: single-node
xpack.security.enabled: "false"
ES_JAVA_OPTS: "-Xms256m -Xmx256m"
working_directory: ~/magento2
steps:
- checkout
- run:
name: Create magento2 working directory
command: |
mkdir -p ~/magento2
- run:
name: Waiting for MySQL startup
command: |
Expand Down Expand Up @@ -64,32 +68,25 @@ jobs:
sysvshm \
xsl
sudo composer self-update
- run:
name: Composer Configure
command: |
composer config -g http-basic.repo.magento.com $MAGENTO_REPO_KEY $MAGENTO_REPO_SECRET
composer config -g http-basic.repo.packagist.com "token" $GENE_PACKAGIST_TOKEN
composer config --global github-oauth.github.com $GITHUB_CHECKOUT_TOKEN
composer config -g allow-plugins true
- run:
name: Composer Create Project
command: |
php -d memory_limit=-1 /usr/local/bin/composer create-project --no-interaction --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.6 . --no-install --no-plugins
php -d memory_limit=-1 /usr/local/bin/composer require --no-update colinmollenhour/php-redis-session-abstract:"<v1.6.0"
- run:
name: Composer Install
environment:
COMPOSER_ALLOW_SUPERUSER: 1
command: |
composer install --prefer-source --no-interaction --dev
working_directory: ~/magento2
command: php -d memory_limit=-1 /usr/local/bin/composer create-project --no-interaction --repository-url=https://mirror.mage-os.org magento/project-community-edition=2.4.7 .
- run:
name: Install Module @ CI Build Branch/Commit
working_directory: ~/magento2
command: |
composer config repositories.gene-packages '{"type": "composer", "url": "https://repo.packagist.com/gene/", "canonical": false}'
REPODIR=$(realpath ~/project)
composer config "repositories.1" "{\"type\": \"path\", \"canonical\":true, \"url\": \"$REPODIR\", \"options\": {\"symlink\":false}}"
composer config "repositories.3" "{\"type\": \"vcs\", \"url\": \"https://github.com/BlueFinchCommerce/module-checkout\"}"
composer config minimum-stability dev
composer config prefer-stable true
composer require gene/module-better-checkout-new-module:dev-${CIRCLE_BRANCH}#${CIRCLE_SHA1} --no-interaction
composer require bluefinchcommerce/module-checkout-new-module:dev-${CIRCLE_BRANCH} --no-interaction
- run:
name: Install Magento
working_directory: ~/magento2
command: |
php -d memory_limit=-1 bin/magento setup:install \
--base-url=http://m2build.test/ \
Expand All @@ -99,7 +96,7 @@ jobs:
--db-password=root \
--admin-firstname=Admin \
--admin-lastname=User \
--admin-email=admin@gene.co.uk \
--admin-email=admin@bluefinch.co.uk \
--admin-user=admin \
--admin-password=password1 \
--language=en_GB \
Expand All @@ -117,47 +114,50 @@ jobs:
--elasticsearch-timeout=15
- run:
name: DI Compile
working_directory: ~/magento2
command: php -d memory_limit=-1 bin/magento setup:di:compile
- run:
name: Install composer modules within Better Checkout
name: Install composer modules within BlueFinch Checkout
working_directory: ~/magento2/vendor/bluefinchcommerce/module-checkout-new-module
command: |
composer install --working-dir=vendor/gene/module-better-checkout-new-module --dev
composer install --no-interaction
- run:
name: PHPCS
working_directory: ~/magento2/vendor/bluefinchcommerce/module-checkout-new-module
command: |
./vendor/bin/phpcs vendor/gene/module-better-checkout-new-module --standard=Magento2 --ignore=vendor,*.css,Test --extensions=php --colors -s -p -v --runtime-set installed_paths vendor/magento/magento-coding-standard,vendor/magento/php-compatibility-fork
./vendor/bin/phpcs . --standard=Magento2 --ignore=vendor,*.css,Test --extensions=php --colors -s -p -v --runtime-set installed_paths vendor/magento/magento-coding-standard,vendor/magento/php-compatibility-fork
- run:
name: PHPStan
working_directory: ./vendor/gene/module-better-checkout-new-module
working_directory: ~/magento2/vendor/bluefinchcommerce/module-checkout-new-module
command: ./vendor/bin/phpstan analyse . --configuration=./phpstan.neon
- run:
name: Configure PHPunit
working_directory: ./vendor/gene/module-better-checkout-new-module
working_directory: ~/magento2/vendor/bluefinchcommerce/module-checkout-new-module
command: |
mkdir -p ~/phpunit
- run:
name: PHPUnit
working_directory: ./vendor/gene/module-better-checkout-new-module
working_directory: ~/magento2/vendor/bluefinchcommerce/module-checkout-new-module
command: ./vendor/bin/phpunit -c phpunit.xml
- store_test_results:
path: ~/phpunit
- store_artifacts:
path: ~/phpunit
- run:
name: NPM install to root module
command: npm --prefix vendor/gene/module-better-checkout-new-module i
working_directory: ~/magento2
command: npm --prefix vendor/bluefinchcommerce/module-checkout-new-module i
- run:
name: NPM install to checkout app
command: npm --prefix vendor/gene/module-better-checkout-new-module/view/frontend/web/js/checkout i
working_directory: ~/magento2
command: npm --prefix vendor/bluefinchcommerce/module-checkout-new-module/view/frontend/web/js/checkout i
- run:
name: ESLint run against root module
command: npm --prefix vendor/gene/module-better-checkout-new-module run lint
working_directory: ~/magento2
command: npm --prefix vendor/bluefinchcommerce/module-checkout-new-module run lint
- run:
name: ESLint run against checkout app
command: npm --prefix vendor/gene/module-better-checkout-new-module/view/frontend/web/js/checkout run lint
working_directory: ~/magento2
command: npm --prefix vendor/bluefinchcommerce/module-checkout-new-module/view/frontend/web/js/checkout run lint

workflows:
build-test:
jobs:
- build:
context: magento2 module
context: bluefinch checkout extension
7 changes: 7 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
![BlueFinch Checkout](../assets/logo.svg)

# BlueFinch Checkout - Contributing

We welcome contributions to any of the BlueFinch Checkout modules.

Please refer to the [BlueFinch Checkout contributing guidelines](https://github.com/BlueFinchCommerce/module-checkout/blob/main/.github/CONTRIBUTING.md) that apply to both the core module and any extension modules, such as this one.
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--

Do not commit any changes to the `view/frontend/web/js/checkout/dist` directory

See .github/CONTRIBUTING.md for local workflow recommendations

-->
50 changes: 50 additions & 0 deletions .github/workflows/generate-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Generate dist

on:
push:
branches:
- main
- "develop*"
- "hotfix/*"

jobs:
generate-dist:
runs-on: ubuntu-latest

steps:

- name: Prepare git
shell: bash
run: |
git config --global user.name "github-action[bot]"
git config --global user.email "github-action[bot]@users.noreply.github.com"

- name: Check out the src branch
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}

- name: Generate dist
shell: bash
run: |
set -v

git config --global pull.rebase false
git fetch --unshallow || true

cd view/frontend/web/js/checkout/
npm ci
npm run build
git add -f ./dist

git status

if ! git diff-index --quiet HEAD; then
echo "Adding changes to git"
git commit -am "[bot] generate dist ($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)"
git push
else
echo "exiting"
exit 0;
fi

93 changes: 22 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,31 @@
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/genecommerce/better-checkout-new-module-template/tree/main.svg?style=svg&circle-token=CCIPRJ_MyaGqRZPJU9B3scfCpNUet_ba0218df02ddad960a21e0b7f421435d4e364ebe)](https://dl.circleci.com/status-badge/redirect/gh/genecommerce/better-checkout-new-module-template/tree/main)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/bluefinchcommerce/checkout-new-module-template/tree/main.svg?style=svg&circle-token=CCIPRJ_MyaGqRZPJU9B3scfCpNUet_ba0218df02ddad960a21e0b7f421435d4e364ebe)](https://dl.circleci.com/status-badge/redirect/gh/bluefinchcommerce/checkout-new-module-template/tree/main)

![Checkout Powered by BlueFinch](./assets/logo.svg)

![Better Checkout Powered by GENE](./assets/logo.svg)
# BlueFinch Checkout Module - Example Extension

# Gene Better Checkout Module - Example Extension
This module serves as an example of how to create a custom extension for the BlueFinch Checkout module.

This module serves as an example of how to create a custom extension for the Gene Better Checkout module.
## Requirements

- Magento 2.4.6 or higher
- Node 16 or higher (for development purposes only)
- Latest version of BlueFinch Checkout

## Installation

Ensure you have installed the latest version of BlueFinch Checkout, which can be found here, [BlueFinch Checkout](https://github.com/bluefinchcommerce/module-checkout).

For information about a module installation in Adobe Commerce, see [Enable or disable modules](https://experienceleague.adobe.com/en/docs/commerce-operations/installation-guide/tutorials/manage-modules).

Remember to clear any appropriate caches.

## Getting Started
To use this functionality, follow these steps:

1. PHTML Integration
In your .phtml file, include the path to your custom functionality files, which could include new components, callback functions, and styles.

2. Layout File Update
Your .phtml file should already be added to the checkout layout. You just need to modify the name of the .phtml file to match your new component.

3. Create New Components or Callbacks
After setting up your .phtml file, navigate to the view/frontend/js/checkout/src directory. Here, you can create new callbacks or components with custom names.

4. Register the Component or Callback
To use your custom component or callback, you need to register it as a functionExtension or componentExtension in the Gene Better Checkout module.

## Available Extension Points
Below is a list of existing extension points where you can plug in your custom components or callbacks.

1. additionalPaymentMethod
2. additionalPaymentMethodsPrimary
3. additionalVaultedMethod
4. ageCheckerExtension
5. footerPaymentIcon
6. belowShippingMethodsExtension
7. additionalShippingMethod
8. shippingMethodAdditionalContainer
9. paymentIcon
10. orderSummaryMessagesContainer
11. expressPaymentMethod
12. clickAndCollectComponent

Callback Extension Points:
1. onLogin
2. onSetShippingStep
3. onHandleCartData
4. onBraintreeExpressInit
5. onUserProceed
6. onSubmitShippingOptionAgeCheck
7. onEditAddress
8. onDeliveryTabEvent
9. getCrossSellsHeader
10. getAppliedCoupons
11. onShippingMethodMounted
12. getRewardPoints
13. getPrices
14. getItems
15. getPaymentMethods
16. getIsVirtual
17. getShippingAddresses
18. getGiftWrapping
19. getGiftCards
20. getFullCart
21. getBillingAddress
22. getStoreCredit
23. onStepCreated
24. belowEmailFieldExtension
25. onCreate
26. onPaymentDataChanged
27. getShippingMethods

Once you have completed the setup, follow these steps to build your code:

1. Navigate to the view/frontend/js/checkout directory:
cd view/frontend/js/checkout
2. Install necessary dependencies:
npm install
3. Build the project:
npm run build
Please refer to the [BlueFinch Checkout Modules docs](https://github.com/BlueFinchCommerce/module-checkout), specifically the [Custom extension guide](https://github.com/BlueFinchCommerce/module-checkout/blob/main/docs/Extensions.md) and the [how to create a checkout extension module](https://github.com/BlueFinchCommerce/module-checkout/blob/main/docs/how-to-create-a-checkout-extension-module.md) document.

## Local frontend development workflow

Please refer to the local frontend development workflow section of the [BlueFinch Checkout contributing guidelines](https://github.com/BlueFinchCommerce/module-checkout/blob/main/.github/CONTRIBUTING.md), that applies to all BlueFinch Checkout extension modules, such as this one.

## CircleCi

Expand Down
Loading