DavidAJohn / PhotoPortfolio

Personal photo portfolio .NET web application which implements a Blazor and Tailwind CSS user interface with a MongoDb database, and includes integration with Stripe Checkout and Prodigi Print API
0 stars 0 forks source link

Add Product page complexity #35

Closed DavidAJohn closed 1 year ago

DavidAJohn commented 1 year ago

The Add Product page is going to have to take into account which options are being made available to the customer.

Take the canvases as an example. The item attributes property must specify to the Prodigi Print API which type if edge wrap is required. We need to allow the admin the ability to offer customers canvases with different wraps.

This means the Add Product page will need to offer a choice of those different attributes when creating the product (the PhotoProduct within the application) - fetching them from Prodigi's Product Details endpoint. For canvases, this currently returns:

"attributes": {
        "wrap": [
            "Black",
            "ImageWrap",
            "MirrorWrap",
            "White"
        ]
    }

This potentially creates a lot of combinations when sizes are added - because each size also has its own Sku. This would either create a lot of repetitive work for the admin, or... we offer the customer the ability to select certain attributes on the Photo Details page.

A product's available attributes come from Prodigi as hashtables, so they're straightforward to retrieve, display and save. But, they may require explanations or perhaps even illustrative photographs. That level of complexity may necessitate a rethink of how the PhotoProduct object is utilised throughout the application,

DavidAJohn commented 1 year ago

The AddProduct page now also gets product details before creating a quote: 6aa10504d415714c9d00329c81ae7975fbce25ec