ordercloud-api / headstart Goto Github PK
View Code? Open in Web Editor NEWA complete and opinionated eCommerce solution using OrderCloud as the backbone - built with .NET Core and Angular
License: MIT License
A complete and opinionated eCommerce solution using OrderCloud as the backbone - built with .NET Core and Angular
License: MIT License
Currently a poor UX when a session expires, multiple notifications will spawn as client-side functionality is not prevented after the first indication of session expiry. Would be good to implement this as a global error handler, however with a brief look into this it appears the javascript SDK may be preventing the buyer/seller apps from regaining control over thrown exceptions. Will need to evaluate further.
End of life support for .NET core 3.1 will end on December 2022
https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core#lifecycle
Steps to Reproduce
When in the buyer app, I click on a product and this is the network error I receive:
Data: "Object reference not set to an instance of an object."
ErrorCode: "InternalServerError"
Message: "Unknown error has occured."
Digging in a bit, it looks like like _oc.Me.GetProductAsync(id, user.AccessToken); is is not getting the product even though it shows up with the https://[middleware]/me/products query.
This is a bare bones, single product catalog with no additional properties - could that be it? Please let me know if you need more details.
Hi,
Currently I have set up the headstart on my local and I have been stuck with the estimate shipping step when calling to the order cloud instance (at URL: https://sandboxapi.ordercloud.io/v1/orders/Outgoing/mehRROcgQEeiVI08U-iaIA/estimateshipping). The attached images described my problem.
Thank.
Steps to reproduce:
When creating a new product in Headstart, the form defaults to a blank page and a user must click the appropriate tab to fill in product details.
When creating a new item or editing an existing item, it's easy to accidently navigate away from the form page and lose unsaved data.
Having a notification to confirm the user wishes to discard unsaved changes will improve the UX of the seller app.
The introduction of Sitecore.Foundation.SitecoreExtensions was intended to leverage the global logging mechanism, however this has introduced additional bloat and dependencies on Sitecore, which can be maintained outside of Headstart.
The proposal is to extract any agnostic logging helpers into a respective project and move the remaining Sitecore-specific helpers into a separate repo.
Hi, seller solution not build, getting error in HeaderSdk.Assets.CreateImage Method
The current RMA solution in Headstart was implemented prior to the platform RMA feature being available.
The Headstart solution should align with platform features as close as possible to demostrate/highlight platform functionality where possible.
Currently it is not possible to seed the marketplace for the region "Europe-West". The reason is a hard coded apiUrl in the headstart project:
Stylecop will enforce coding standards, keeping the overall solution cleaner and more consistent.
Due to the Order Search enhancements enabled in mid-March for Headstart, Buyers are not able to see their Quote Orders that are pending (Elastic Search does not allow the GET Orders call to retrieve both Submitted & Unsubmitted orders).
Steps to Reproduce
To resolve this, I believe all we need to do is add an Order.IsSubmitted=false
or Order.Status=Unsubmitted
filter on the Get MeOrders api call that is done when clicking on the Quote Order tab.
All tsconfigs appear to be inconsistent. Aligning these configs may also assist with migrating functionality from the buyer and seller apps down to the sdk foundation.
When submitting an order in Headstart, the Order Confirmation page is mis-formatted and contains translation text.
Steps to Reproduce
When I attempt to add a product to my cart, there is a PUT something like:
/order/TieV_bI5yk-_XbAjBDUO7g/lineitems
but the reponse is:
{
"ErrorCode": "NotFound",
"Message": "Object not found.",
"Data": {
"ObjectType": "Order",
"ObjectID": "TieV_bI5yk-_XbAjBDUO7g"
}
}
There is actually an order with that ID in the system when looking into the API, but the method that is causing the error seems to be:
LineItemCommand.cs:
var existingLineItemsRequest = _oc.LineItems.ListAllAsync<HSLineItem>(OrderDirection.Outgoing, orderID, filters: $"Product.ID={liReq.ProductID}", accessToken: user.AccessToken);
Where the liReq.ProductID is a valid product Id.
Please let me know if you need more information.
Look into generating models and endpoints from the middleware into the UI SDK
As Marketplace Manager, I want the ability to sort and/or filter my promos so I can easily find the promos I need,
Requirements
When products should not have tax codes (Vercel integration?) the product-tax-code-select-component does not render when creating products. However, the product form is still validating against these fields and will not allow for creation of products.
A new feature to support Sale Pricing was released to OrderCloud on March 9th. Let's add this feature to Headstart so other can try it out.
Admin Requirements - Products
Exhibit 1:
I'm envisioning just adding columns to the existing Price Table, like this:
Admin Requirements - Orders
Buyer Requirements - Product Pages
Buyer Requirements - Checkout
Other Considerations
PriceSchedule.IsOnSale
boolean to determine whether or not to show the strikethrough pricing)when select address and save and continue, it returns "the server responded with a status of 500 (Internal Server Error)". the url hitting "https://sandboxapi.ordercloud.io/v1/orders/Outgoing/UuObUE6KoEqNOyYSDNZzIQ/estimateshipping". can you please suggest me how slove it
When running Headstart using Docker, build is failing with the below error,
Steps to Reproduce:
docker-compose up -d
commanddocker-compose up -d
command after removing existing images (or rebuild images using docker-compose build --no-cache
command) to reproduce the errorAs a Buyer, I would like to submit a quote and receive the quote back from the Seller/Marketplace manager so that I can continue my order online and submit an order for the item at the quoted price.
Workflow:
Considerations:
Using latest 'develop' and standard seed template. Calling /seed endpoint fails when creating a new Marketplace:
"Data": "Call failed with status code 400 (Bad Request): PUT https://portal.ordercloud.io/api/v1/organizations/200422f7-8adf-4fdc-bccc-08d3cfffd158"
However, if I add the code below to the "new Marketplace()" initializer:
Region = new Region()
{
AzureRegion = "westus",
Name = "Azure Us-West",
Id = "usw"
}
All works as expected. Is Region a required property now?
Steps to Reproduce
Expected Result - As a supplier, only show the RMA link that contains my supplier items to me on the original order
Note: As a Supplier, when I view RMAs from the RMA list page, I do correctly only see the RMAs that contain my products
This view likely has something to do with showing all RMAs on an order for the MPO, so keep that in mind that the MPO should continue to see all RMAs tied to an order.
I got the above error while setting up seller with the latest angular Js and I was able to fix it by following the instructions in this answer.
Custom classes that extend a resource with a specified strongly-typed xp require the xp to be assigned in the constructor to enforce the strongly-typed xp. Currently no extended resource class adheres to this, allowing any xp to be used in code.
Prior to making the change to each class, we will need to validate that we don't introduce any data corruption to existing usages of the extended resource class or any instance of the base resource class.
The example provided in ordercloud-dotnet-sdk: Strongly Typed xp:
public class MyUser : User<MyUserXp> (
public MyUser() {
xp = new MyUserXp();
}
)
public class MyUserXp
{
public string Gender { get; set; }
}
var user = new MyUser();
user.xp.Gender = "male"; // strongly typed!
Product collections may be a better fit for storing favourite products. We should look at moving to the product collections resource to show this resource in action.
As a Marketplace Manager, I want the ability to duplicate or clone a promotion so that I can quickly make multiple promotions that are very similar.
Requirements
Hi,
I am using headstart with docker and the below endpoint throws an error:
http://api.headstart.localhost/exchangerates/USD
{
"ErrorCode": "InternalServerError",
"Message": "Unknown error has occured.",
"Data": "Connection refused"
}
This endpoint is only throwing error with Docker. When I run middleware in local using visual studio debug mode (Test profile) then there is no error. The issue is with {currency} endpoint. http://api.headstart.localhost/exchangerates/supportedrates gives the correct result. Any inputs?
To minimise null value bloat stored in xp of OrderCloud resources, we can update the strongly-typed xp classes to inherit from the OrderCloudModel and IPartial, which will remove unassigned properties during serialisation.
See the following example
// Before refactor
public class MyProductXp
{
public string Note { get; set; }
public string ProductType { get; set; }
public bool IsNew { get; set; }
public decimal Rating { get; set; }
}
// After refactor
public class MyProductXp : OrderCloudModel, IPartial
{
public string Note { get => GetProp<string>("Note"); set => SetProp<string>("Note", value); }
public string ProductType { get => GetProp<string>("ProductType"); set => SetProp<string>("ProductType", value); }
public bool IsNew { get => GetProp<bool>("IsNew"); set => SetProp<bool>("IsNew", value); }
public decimal Rating { get => GetProp<decimal>("Rating"); set => SetProp<decimal>("Rating", value); }
}
Update the release pipeline so that it updates the hosted translation file based on the english translations file in the project
Storefronts are currently being driven by individual API clients, which we could leverage the API Client xp to drive storefront configurations, such as supported languages.
@crhistianramirez has also considered something more dynamic like mapping a domain to an API client. That requires a bit more set up the first time around but has some powerful implications. For example, if someone has a wildcard domain they could theoretically pop up new buyers pretty much at will without any kind of deployment process.
The current architecture of the middleware solution is difficult to work with
Challenges with current architecture
Enhancements with proposed architecture
Challenges with proposed architecture
Other notable proposed changes
I'm having trouble importing the "headstart/src/Middleware/src/Headstart.Common/AppSettingConfigTemplate.json" into my Azure App Configuration. I get the error "Keine gültige Json-Datei oder keine Elemente." (translated: "no valid json-file").
It seems to be an encoding issue, once I change this from UTF-8 BOM to UTF-8 it works.
For Seller and buyer app, I want to add language switcher function.
Requirements
I made Japanese resource file and create pull request #345 to headstart/development.
Over time a lot of data pollution has been introduced into the headstart OrderCloud environment, which may also be impacted by breaking changes to the code base.
To remove invalid and incomplete data, not intended for demo purposes, from the solution this could either be achieved via a deployment process or a scheduled job.
This may also utilise the test data provided from #412 to be reimported after the environment data clean up process to provide a stable set of test data for demoing and learning purposes.
This feature would allow admins to promote certain products and encourage customers to buy more.
To implement this we'll need to maintain product.xp.RelatedProductIDs
for example:
{
"ID": "my-awesome-product-id",
"RelatedProductIDs": ["product1", "product2", "product3"]
}
On the admin side
this could be a simple multi-select dropdown that allows the user to search for products via the /products endpoint and upon selection patches the product to include the related product.
On the buyer side
When the user gets to the product detail page we can make a product list call via me/products with the product IDs. This would retrieve only the products the user can see and at the price they should see them at.
For example the following list call would retrieve the products (product1, product2, product3) based on visibility/pricing rules specific to that user.
/me/products?ID=product1|product2|product3
When a user tries to set a Pricing Override for a specific buyer, the option to select a buyer to override is missing.
It would be ideal to either display a dedicated error page or have a toaster notification when the apps are in a critical state, e.g. no defaultLanguage configuration has been provided, which throws and error and currently renders a blank screen to the user without any notification of an error occuring.
Hi @crhistianramirez, please suggest how to place test order in development environment. we tried with dummy credit card and got "Order.CannotSubmitWithUnaccceptedPayments: Cannot submit an order with payments that have not been Accepted." error in await _oc.Orders.ValidateAsync(OrderDirection.Incoming, worksheet.Order.ID);
The OrderCloudEnvironments class contains production and sandbox environments, however the ApiUrls are hard-coded to the US-West region, e.g. "https://sandboxapi.ordercloud.io".
The urls need to be resolved correctly otherwise when seeding environments we will see "invalid or expired token" errors for other regions.
For demoing and quick start purposes, providing test data will allow onboarding devs to have more context towards expected entity relationships created as part of headstart, as well as a complete interactive set of data for end-to-end testing from completion of the seeding processes.
The Habitat test data is a recommended starting point for creating headstart test data as it contains quite an extensive test data that developers may also be familiar with from XC.
As a Marketplace Owner, I would like to create a promo and make it eligible only for a certain Buyer in my organization.
Currently, Headstart only allows that the promo is available to ALL Buyers. I'd like to also make the "specific buyers" eligibility selection available. We can skip the "Specific buyer group" eligibility at this time.
If possible, please allow multi-select so a promo can be assigned to multiple selected Buyers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.