iAdvize
Back

Product cards show "View product" when the agent can't add to the cart

Fixed

Some stores can't take an add to cart from the agent, for example when stock isn't managed in the platform. Switching off the connector's cart tools stopped the agent from adding, but the product cards still showed Add to cart, and pressing it sent a request the agent could not carry out. The only way to hide the button was to switch off the product carousel, comparison and detail tools, and lose the cards with them.

The cards now follow the connector's tools. When a known catalog tool is on (such as search_catalog on Shopify or product_search on Adobe Commerce) and no known cart-writing tool is (create_cart, update_cart, add_to_cart and the like), every card the agent shows has View product in place of Add to cart. It opens the product page in a new tab. A tool that only reads the cart, such as get_cart, doesn't count.

The check runs on every turn, so a product shown again later follows the tools of that turn. A connector whose tool names iAdvize doesn't know (commercetools, Custom) keeps Add to cart. With a cart-writing tool on, nothing changes.

Resources