Angle3D Configurator Documentation
  • 👋Welcome
  • Get Started
    • Install Angle 3D
    • Choose Plan
    • Upload 3D Model
      • Get a 3D Model
      • Upload your 3D Model
  • Set Up Configurator
    • Create Configurator
    • Customization Options
      • Colors and Textures
        • 3D Model Textures
      • Components Visibility
      • Compound
      • Blank
      • Text Engraving
      • Image Upload
      • Conditional Logic
    • Settings
      • App Settings
        • Language
      • Configurator Settings
        • Scene
          • Scene Set Up
          • Interaction
        • 3D Model
        • Binding
        • Translations
        • Image Export
        • PDF Export
    • Edit Configurator
    • Delete Configurator
  • Binding
    • Variant Binding
    • Bundle Binding
    • Merged Bundles
  • Shopify Integration
    • Storefront Integration
  • JAVASCRIPT EVENT LISTENERS
    • JavaScript Event Listeners (Advanced)
  • Custom Add to Cart
  • App Ready
  • App Loaded
  • Price Change
Powered by GitBook
On this page

Custom Add to Cart


🛒 Custom Add to Cart Event Listener

By default, Angle3D Configurator navigates users to the cart page after they click the Add to Cart button.

If your theme uses a cart drawer, you can override this behaviour using our custom event listener. This allows you to stay on the current page and handle the Add to Cart logic manually.

(Please note that the "Add to Cart" action is performed anyway, only the navigation to the cart page is deactivated, so you can implement your own custom logic)

Follow the below steps:

  1. In the app, go to Customizer Settings > Storefront > Snippet UI Settings, then active "Custom Add to Cart Behaviour"

  2. Add this snippet to your theme and add your own javascript code inside.

window.addEventListener("Angle3DAddToCart", function(event) {
  console.log('Angle3DAddToCart', JSON.stringify(event.detail));
  // Your custom behavior here (e.g. open cart drawer)
});

⚠️ Please use these event listeners responsibly. Custom scripts should not interfere with the core functionality of the Angle3D Configurator. Improper use may lead to unexpected behavior, and we cannot provide support for issues caused by external scripts.

PreviousJavaScript Event Listeners (Advanced)NextApp Ready

Last updated 9 days ago