C2 subscritions selling plans frontend#1336
Open
hhuang2-godaddy wants to merge 11 commits intogodaddy:mainfrom
Open
C2 subscritions selling plans frontend#1336hhuang2-godaddy wants to merge 11 commits intogodaddy:mainfrom
hhuang2-godaddy wants to merge 11 commits intogodaddy:mainfrom
Conversation
- Added support for fetching and displaying selling plans from an external or local API. - Introduced `SellingPlanDropdown` component for selecting subscription plans in the product details. - Updated `ProductDetails` to include selected selling plan information. - Enhanced cart functionality to handle selling plan details in line items. - Updated environment configuration to include `SELLING_PLANS_API_URL`. This implementation allows users to select subscription plans for products, improving the checkout experience.
…integration - Updated `getSellingPlans` function to handle both SKU IDs and SKU Group IDs for fetching selling plans. - Modified `SellingPlanDropdown` component to accept `skuGroupId` and adjust fetching logic accordingly. - Improved error handling and response management in the selling plans API integration. - Updated product component to pass `skuGroupId` to the dropdown for better plan selection. These changes streamline the process of selecting selling plans, enhancing the user experience in the product details view.
… dropdown logic - Updated `getSellingPlans` to remove default API URL fallback. - Introduced `normalizeCheckoutPrice` function to handle checkout price resolution for selling plans. - Enhanced `SellingPlanDropdown` to utilize normalized checkout prices when a plan is selected. - Adjusted `ProductDetails` to reflect selling plan checkout prices in the displayed product pricing. These changes improve the accuracy of pricing information displayed to users and enhance the overall functionality of the selling plans feature.
…lans - Streamlined the logic for adding selling plan metafields in the cart functionality. - Removed commented-out code to enhance code clarity and maintainability. These changes improve the readability of the `useAddToCart` hook while ensuring the selling plan details are correctly processed.
…plan integration - Updated the logic for transforming cart line items to include selling plan checkout prices, ensuring consistency with product detail pages. - Improved the calculation of subtotal and total amounts to reflect the sum of displayed line item prices. - Streamlined the handling of metafields for selling plans in the `useAddToCart` hook, enhancing clarity and maintainability. These changes improve the accuracy of pricing information in the cart and align it with the selling plan details, enhancing the overall user experience.
|
…details - Added a new context provider for managing product detail targets, allowing for extensibility in rendering components at predefined locations. - Updated the ProductDetails component to utilize the new targets system, replacing the deprecated childrenAboveAddToCart prop. - Introduced ProductDetailsTarget and ProductDetailsTargetSlot for better management of rendering logic. These changes enhance the flexibility of the product details component, enabling easier customization and integration of additional features.
…ext for targets - Refactored import paths in product-details and related components to align with the new structure. - Introduced a new context provider for managing product detail targets, enhancing the extensibility of the product details component. - Updated the ProductDetails component to utilize the new targets system, replacing deprecated props. These changes improve the organization of the codebase and facilitate easier customization of product detail rendering.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Changeset
Test Plan