gerpaick
gerpaick

Reputation: 799

prestashop - create an order via api

i just wanted to know if this scenario is possible: we have a small estimator app written in php/jscript that gives a list of products that you need to buid a fence. now, we are working on our online shop. we have decided to use prestashop. now, we would like to give a possibility to create an order directly from our estimator app. we would like to 1)create an order, 2)put products into it, 3)redirect to checkout page (i.e. http://store.oursite.com/en/quick-order). is it possible to do that? if yes, can you give me any tips? thanks

Upvotes: 1

Views: 3647

Answers (1)

djfm
djfm

Reputation: 2458

You can just call directly the function ajaxCart.add = function(idProduct, idCombination, addedFromProductPage, callerElement, quantity, whishlist)

From the file ajax-cart.js (in /modules/blockcart)

Or you could do it through the webservice, check out the doc at http://doc.prestashop.com/display/PS14/Using+the+REST+webservice. This will abstract away the complexity of the order process for you !

Upvotes: 5

Related Questions