Mathew
12/09/2024, 11:45 AMCart.addLine
method works as expected on MyAccount pages and Landing pages, but it’s not working on PLP pages. Interestingly, it does work on PLP when the Quick View modal is opened.
it is showing an error 'Error occurred adding item to cart. Please try again.' and when to try log the error it is showing undefinedCeligo AI
12/09/2024, 11:45 AMAI generated answer (using internal Slack threads):Based on the conversations, it seems like the issue you're experiencing with the
Cart.addLine
method not working on PLP pages might be related to the event handling process. The error message you're seeing is a default one that SuiteCommerce throws when it encounters an issue during the 'addLine' operation. It's not necessarily indicative of an issue with the item itself, but more likely an issue with the event handling process.
If you're attempting to cancel the 'addLine' event and are returning an error or jQuery Deferred Reject object as per the documentation, but still seeing the default error, it might be worth looking into the specifics of your implementation.
Here are some things to consider:
- Are you subscribing to the event in the correct context?
- Is the error or Reject object correctly structured and returned?
- Are there any other scripts or modules that could be interfering with this process?
Review your code and ensure everything is implemented as per the NetSuite guides. If you're still facing issues, it may be beneficial to reach out to a NetSuite technical expert.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
12/09/2024, 11:45 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.801652789
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.800153673
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.79591459
Celigo AI
12/09/2024, 11:45 AM