cancel
Showing results for 
Search instead for 
Did you mean: 

Webapi on Product Pages

Webapi on Product Pages

I am creating a custom webapi for magento 2.3.2 that will take in the values of each product option as seen below in the example photo. These values will be passed into a function that will send them to an external api and change the price respectively. So the question is, how can I load a custom php script on all product pages?

 

Thanks for any help

 

options.JPG

1 REPLY 1

Re: Webapi on Product Pages

I believe you can create an Ajax call on change of product option.

 

Drop down options are managed from js file so you can override js and call ajax while change method calls.

 

then you can call your api from ajax call php function.

 

If it helps then please click "Kudos" and "accept solution".