We have Cart Integration, but clicking on the products minimizes the player or opens the product in a new tab
How Cart Integration Works
When you add products to a show, basic product information is initially scraped from your website. With Cart Integration enabled, you can enhance this scraped data by providing additional details in the Bambuser dashboard. These details override and expand the original product information.
However, if issues arise during this process, the product click will behave as if Cart Integration is not enabled. For example, clicking on the product could minimize the player or open the product in a new tab.
Possible Reasons & Potential Solutions
1. Invalid Product References in the Bamhub
Cause:
Products in the Bambuser workspace may have incorrect or mismatched "Product Reference" fields. If some products behave correctly while others do not, this is likely the root cause.
Solution:
Navigate to Bamhub > Show > Product List and compare the "Product Reference" fields of working and non-working products. Verify with your development team that the "Product Reference" structure in the Bambuser dashboard matches the format expected by your Cart Integration code.
2. Events Are Not Wrapped Inside the onBambuserLiveShoppingReady() Method
Cause:
The Cart Integration requires all event listeners and custom logic to be initialized within the onBambuserLiveShoppingReady() callback.
Solution:
Ensure your code is structured like this:
onBambuserLiveShoppingReady(() => {
// Your event listeners and logic here
});
3. Product Data Is Not Successfully Hydrated
Cause:
Hydration issues occur when the additional product details provided through the dashboard are incomplete, incorrect, or fail to load. Errors in this process prevent the product from behaving as expected.
Solution:
Check the Developer console for error messages related to product hydration. Confirm that all required fields, such as price, stock, and name, are included and correctly formatted in the additional product data. Refer to the documentation on Providing Product Data for the required structure and format of these fields.
4. Cart Integration Not Implemented on the Page
Cause:
In some cases, Cart Integration may only be implemented on certain pages of your website. If the integration is missing on a particular page, product interactions may not work correctly.
Solution:
Verify with your development team that the page experiencing the issue has Cart Integration fully implemented. If not, ensure that the necessary setup is added to the page.