Skip to content
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

New API Field - Tour Galleries #170

Open
ashleyshaw opened this issue Oct 9, 2024 · 0 comments
Open

New API Field - Tour Galleries #170

ashleyshaw opened this issue Oct 9, 2024 · 0 comments
Assignees
Labels
[Feature] Synchronisation Issues & PRs related with data synchronisation [Status] Needs Design Needs design efforts [Status] Needs More Info Follow-up required in order to be actionable.
Milestone

Comments

@ashleyshaw
Copy link
Member

ashleyshaw commented Oct 9, 2024

New API Field - Tour Galleries Support in Wetu Importer #170

Overview

The Wetu Importer needs to be extended to support a new field within the Wetu API for Tour Galleries. This field will allow tours to include media assets, specifically from the "Landing Page Media" section in Wetu, which is provided via the cover_images field in the API.

Task

Extend the current Wetu Importer functionality to process and import the "Landing Page Media" data into a newly created Tour Gallery field within WordPress. This will allow tours to showcase galleries with media assets synced directly from Wetu.

Development Requirements

  1. API Integration:

    • Update the Wetu API integration to retrieve the cover_images field associated with a tour’s "Landing Page Media."
    • Ensure that the API data for the cover_images is correctly mapped to the corresponding gallery field in WordPress.
  2. Backend Design:

    • @ZaredRogers to provide an updated backend design for how the Tour Gallery field will be structured and displayed within the Tour Operator section of WordPress.
    • Ensure that the Tour Gallery field can accommodate multiple images, as provided by the cover_images data.
  3. Data Handling:

    • Create or extend a function that processes the cover_images from the Wetu API.
    • The function should save the cover_images data into the Tour Gallery field within the WordPress database for each tour.
    • Handle any validation or data integrity checks to ensure only valid images are stored.
  4. Gallery Display:

    • Ensure that the imported gallery images are displayed correctly within the WordPress admin interface and on the front end.
    • Use the WordPress media gallery or custom gallery implementation to display the images in a user-friendly manner.

Steps to Implement

  1. API Update:

    • Add a call to the Wetu API to fetch the cover_images field.
    • Extend the data mapping logic in the importer to map cover_images to the new Tour Gallery field in WordPress.
  2. Backend Design:

    • @ZaredRogers will provide the updated backend design for how the gallery field should be structured and how the images should be saved and displayed.
    • Implement the design and ensure it's integrated into the Tour Operator section in WordPress.
  3. Tour Gallery Field:

    • Create a new custom field in WordPress for the Tour Gallery under each tour.
    • Ensure that the field is dynamic and can hold multiple images as needed.
  4. Sync Functionality:

    • Modify the sync functionality to process and import images from the cover_images API field into the new gallery field during the sync process.
  5. Testing:

    • Test the functionality by performing a data sync for tours and verifying that the gallery images from Wetu are imported and displayed correctly in WordPress.

Additional Context

  • API Reference: The cover_images field from the Wetu API provides the images used on the tour's landing page and should be saved in the corresponding Tour Gallery field.
  • This functionality will allow tours to display rich media galleries directly from Wetu, enhancing the user experience by automating media content imports.

Completion Criteria

  • The Wetu Importer can now retrieve and store cover_images from the Wetu API into a custom Tour Gallery field.
  • The imported media is displayed properly in the WordPress admin interface and on the front end.
  • Syncs with Wetu are tested to ensure data consistency and proper gallery rendering.
@ashleyshaw ashleyshaw added [Status] Needs Design Needs design efforts [Status] Needs More Info Follow-up required in order to be actionable. [Feature] Synchronisation Issues & PRs related with data synchronisation labels Oct 9, 2024
@ashleyshaw ashleyshaw added this to the 2.0.0 milestone Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synchronisation Issues & PRs related with data synchronisation [Status] Needs Design Needs design efforts [Status] Needs More Info Follow-up required in order to be actionable.
Projects
Status: 📥 Needs Dev
Development

No branches or pull requests

2 participants