Jump to content

Add products to the cart via API from an external script


D972

Recommended Posts

Hello everyone,

I am a 2nd year BTS SIO student and I am currently doing an internship.

My task is to migrate an online WooCommerce store to PrestaShop 8.0.2.

I am working with Visual Studio Code and on a local WampServer.

To accomplish this task, I need to be able to add products to the cart via a simulator using an API generated directly in PrestaShop with all rights.

For your information, the simulator is external to the PrestaShop installation.

Here is the link to the actual simulator (I have it on the local WampServer): https://easy-dalles.fr/simulateur

However, my problem is that when I add a product to the cart, it creates an order in PrestaShop but without the products selected in the simulator.

And according to my browser console, the error would occur during the creation of the cart.

Do you have a solution to this problem?

Thank you in advance for your help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...