-
Notifications
You must be signed in to change notification settings - Fork 5
Feat: improve checkout robustness and error recovery #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2914058
feat(opc): improve checkout robustness and error recovery
ThbPS 8782545
Merge branch 'SPE-72/opc-migration' into SPE-108/feat/ui-errors-manag…
ThbPS 94e38d6
fix: js assets merge conflict
ThbPS b44dfa2
fix: linter & unit test
ThbPS 67f4365
Merge branch 'SPE-72/opc-migration' into SPE-108/feat/ui-errors-manag…
ThbPS f0d92ad
fix: linter
ThbPS 52ca523
Merge branch 'SPE-72/opc-migration' into SPE-108/feat/ui-errors-manag…
kevin-carangeot 7ec4b73
fix: trackEvent params
kevin-carangeot fedb052
fix: refresh carrier prices on gift wrapping toggle
kevin-carangeot 18cd18b
fix: correct shipping price when toggling gift wrapping without a sav…
kevin-carangeot 0520d6e
fix: refresh carrier prices on gift wrapping toggle
kevin-carangeot 498e2be
Merge branch 'SPE-72/opc-migration' into SPE-108/feat/ui-errors-manag…
kevin-carangeot b33e2f6
fix: cs fixer
kevin-carangeot ac51422
fix(opc): centralize ajax error handling and submit persistence
ThbPS 661f860
fix: UTs & linter
ThbPS 7006d2c
test: add unit stub for checkout provider interface
ThbPS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <?php | ||
|
|
||
| use PrestaShop\Module\PsOnePageCheckout\Checkout\Ajax\OrderOptions\OnePageCheckoutGiftWrappingHandler; | ||
|
|
||
| require_once __DIR__ . '/AbstractOpcJsonFrontController.php'; | ||
|
|
||
| class Ps_OnepagecheckoutGiftwrappingModuleFrontController extends Ps_OnepagecheckoutAbstractOpcJsonFrontController | ||
| { | ||
| /** | ||
| * @return array<string,mixed> | ||
| */ | ||
| protected function handleOpcRequest(): array | ||
| { | ||
| if (!$this->isOpcAvailable()) { | ||
| return $this->buildTechnicalErrorResponse(); | ||
| } | ||
|
|
||
| $handler = new OnePageCheckoutGiftWrappingHandler($this->context, $this->module->getTranslator()); | ||
| $result = $handler->handle(Tools::getAllValues()); | ||
|
|
||
| if (empty($result['success']) || !isset($result['cart'])) { | ||
| return $result; | ||
| } | ||
|
|
||
| return [ | ||
| 'success' => true, | ||
| 'preview' => $this->render( | ||
| 'checkout/_partials/cart-summary', | ||
| [ | ||
| 'cart' => $result['cart'], | ||
| 'static_token' => Tools::getToken(false), | ||
| ] | ||
| ), | ||
| 'totals' => $result['totals'], | ||
| ]; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.