Skip to content

C2 subscritions selling plans frontend#1

Open
hhuang2-godaddy wants to merge 31 commits into
mainfrom
c2Subscritions_selling_plans_frontend
Open

C2 subscritions selling plans frontend#1
hhuang2-godaddy wants to merge 31 commits into
mainfrom
c2Subscritions_selling_plans_frontend

Conversation

@hhuang2-godaddy

Copy link
Copy Markdown
Owner

Summary

Changeset

  • Changeset added (docs)

Test Plan

hhuang2-godaddy and others added 30 commits March 3, 2026 23:28
- 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.
* use store tz for pickup times

* add changeset
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…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.
…addy#1323)

* fix(react): convert MercadoPago amount from minor to major units

* chore: add changeset
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 4 to 5.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](pnpm/action-setup@v4...v5)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ddy#1330)

* chore(workflows): update actions to latest and setup OIDC perms

* ci: remove unneeded secret since we are going with trusted publishing

* ci: modify contents perm to write to allow pushing up of tags
godaddy#1329)

* Add pickupSlotInterval and uncouple leadTime from time slot generation

* use store tz for timeslot validation

* use leadTime in asap display

* extract asap and leadtime display into helpers

* update readme

* adjust express click handler ref to avoid stale closure

* single use effect on gd express payments
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Start upgrade to eslint 10

* eslint 10 in package.json

* Upgrade eslint-config-godaddy-typescript to eslint 10

* Convert eslint-config-godaddy-react-typescript to eslint 10

* Upgrade @babel/eslint-parser

* @eslint/js v10

* Upgrade @eslint/eslintrc

* Changeset

* Try to fix tests

* Changes brought up in code review

* Forgotten one update to eslint
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* update next and stripe versions

* update vitest
…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.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…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.
* add commerce api skill

* add skills readme
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update commerce-api skill to utilize godaddy cli

* update readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants