Troubleshooting Commerce Issues
This guide provides solutions to common issues encountered when integrating commerce features with Archibald.
Common Issues
API Connection Errors
- Symptom:
404 Not Foundor401 Unauthorizedwhen calling commerce APIs. - Solution: Check your configuration in
common.ts. Ensure theHYBRIS_HOSTenvironment variable and thehybris.oauth.client_idconfig key are correctly configured.
Product Data Not Loading
- Symptom:
useProducthook returnsundefinedorerror. - Solution: Verify the product code exists in the SAP Commerce backend. Check the network tab in your browser for specific error messages from the OCC API.
Cart Events Not Firing
- Symptom: Subscribing to
'cart'events doesn't trigger your callback. - Solution: Ensure you are using the same
CartClientinstance across your application by using theCartClientProvider.