简体   繁体   English

prestashop-通过api创建订单

[英]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. 我只是想知道这种情况是否可行:我们有一个用php / jscript编写的小型估算器应用程序,其中提供了需要围栏的产品列表。 now, we are working on our online shop. 现在,我们正在网上商店中工作。 we have decided to use prestashop. 我们决定使用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 (ie http://store.oursite.com/en/quick-order ). 我们想1)创建订单,2)将产品放入其中,3)重定向到结帐页面(即http://store.oursite.com/en/quick-order )。 is it possible to do that? 有可能这样做吗? if yes, can you give me any tips? 如果是,您能给我一些提示吗? thanks 谢谢

You can just call directly the function ajaxCart.add = function(idProduct, idCombination, addedFromProductPage, callerElement, quantity, whishlist) 您可以直接调用函数ajaxCart.add = function(idProduct,idCombination,addedFromProductPage,callerElement,数量,收藏夹)

From the file ajax-cart.js (in /modules/blockcart) 从文件ajax-cart.js(在/ 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 . 或者,您也可以通过Web服务进行操作,请访问http://doc.prestashop.com/display/PS14/Using+the+REST+webservice上的文档。 This will abstract away the complexity of the order process for you ! 这将为您消除订购过程的复杂性!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM