1

We are working on integrating the MOC into our website and are stuck at one point.

I could not find any instructions/code examples in the docs on how we can process the click on the button. The previous method doesn't seem to work anymore. As soon as we enable the MOC with "true" using our previous integration, the "Send Request" button becomes the "Add to Cart" button. See here

We would like to use the MOC to direct our customers to a form page where they can request their configurations. Exactly like we do it with the Rubens so far here

I just tried the previous method for Rubens without MOC activated. But this didn't seem to work, because it just shows the "Add to cart" button.

1 Answers1

1

You can find the MOC documentation here: Documentation

Basically in the MOC/planner you want to listen to onRequestPlan:

onRequestPlan = (planId: string, image: Base64Image, items: any[]): void

This is triggered when the user clicks the Add to cart button or it is triggered manually.

teh.fonsi
  • 3,040
  • 2
  • 27
  • 22
  • Thank you, that helped. But it's not possible to hide the "Add to cart" and only show the "Request Plan" Button. How can the "Add to cart" Button be hidden. This configuration doesn't work: buttons: add_to_basket: false requestplan: true – Benedikt Kaiser Apr 05 '23 at 06:19
  • This is an issue as I mentioned here: https://stackoverflow.com/questions/75936441/roomle-rubens-moc-sdk-integration-hiding-the-add-to-basket-button/75939774#75939774 – teh.fonsi Apr 06 '23 at 07:25