|
FOROS PROFESIONALES WINDEV, WEBDEV y WINDEV Mobile |
| | | | | |
| Iniciado por guest, 09,jun. 2011 12:12 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 09,junio 2011 - 12:12 |
Anyone using the soap protocol from Magento with Windev ?
n is int nconnmagento is int = MagentoService.startSession() Trace(nconnmagento) sIdSession est une chaîne sIdSession = MagentoService.login("philip","123456") Trace(sIdSession) sproduct_SKU is string = "bb8100" sproduct = MagentoService.call(sIdSession,"catalog_product.info",sproduct_SKU) Trace(sproduct) Trace("3",MagentoService.call(sIdSession,"catalog_product.info",nproduct_id)) Trace("4",call(sIdSession,"catalog_product.info","bb8100")) These last 3 traces gives me nothing as result. Why ???
MagentoService.endSession(sIdSession) //The Product API allows us to specify a product through its database ID or its SKU. The database ID is always numeric, the SKU is a string which can be anything. // //$product = $soap->call( $session_id, 'catalog_product.info', 166 ); //$product = $soap->call( $session_id, 'catalog_product.info', 'HTC Touch Diamond' ); |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,junio 2011 - 16:38 |
Hi Philip,
I am trying to use Magento webservices with Windev as well and run into problems too.
I see you try to use the SOAP 1 version of the Magento webservice. I tried to use the 1.2 version which gives nicer direct method calls like 'catalogProductInfo'and catalogProductCreate'.
But i have simular problems there. If you inspect the result in the debugger (open the return variable) there seems to be only one product returned although there is no way to retrieve it.
I use f.e. the following code: storeView is string = "default" products is catalogProductEntityArray aProduct is catalogProductEntity filterSet is filters filterEntries is array of associativeEntity filterEntry is associativeEntity filterAssArray is associativeArray
filterEntry.key = "status" filterEntry.value = "1" ArrayAdd(filterEntries,filterEntry) filterSet.filter = filterAssArray
products = MagentoService.catalogProductList(SessionId, filterSet,storeView)
You can only see that this actually returns something by opening the products variable in the debugger and see that it contains one 'item' variable. But when you do 'nrProducts is int = products.Item..Occurrence' you do get the actual nr of products in the catalog. But again there is no way to retrieve them.
I reported the issue April 14th. PC Soft confirmed it is an issue which was forwarded to the developers. But no solution yet. I asked again somehat later but no response on when to expect a solution. The case nr is #71 357/334766. Please report to PC Soft your issues referring to this case nr so they know there are more people facing this problem. Maybe this will help.
Btw, I did try to generate the webservice the Windev 14 way which seems to work because now you get at least valid XML returned. You would then have to process this XML yourself which is a lot more work then doing it the Windev 15 way which generates variables. I did experiment a bit with importing a sample XML document of the SOAP response into Windev so at least I get help with processing the xml. I am planning to develop my own Magento api which wraps the webservice calls. I guess this is the way to go if PC Soft does not solve the problem.
You can contact me if you want to know more about this issue and my attempts. Or maybe work together on creating a magento api which is some work.
Regards,
Sjoerd |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,abril 2016 - 09:05 |
SessionId is UNICODE string SessionId=MagentoService.login("xxxxxx","xxxxxxxxxxxxxx")
Trace(SessionId) storeView is string = "default" products is catalogProductEntityArray //aProduct is catalogProductEntity filterSet is filters filterEntries is array of associativeEntity filterEntry is associativeEntity filterAssArray is associativeArray
filterEntry.key = "status" filterEntry.value = "1" ArrayAdd(filterEntries,filterEntry) filterSet.filter = filterAssArray
products = MagentoService.catalogProductList(SessionId, filterSet,storeView)
nrProducts is int nrProducts= products.Item..Occurrence Trace(nrProducts)
Trace(aProduct)
FOR i= 1 TO nrProducts Trace(products.item[i].name[1].text ) END
Info("finish") |
| |
| |
| | | |
|
| | |
| |
| Publicado el 12,mayo 2016 - 19:33 |
Hello iam trying to get list of products filtered sku like 888 but allways i get all the products list. That is my code where is the error; Anyone that have solve the promblem ?
storeView is string = "" products is catalogProductEntityArray aProduct is catalogProductEntity filterSet is filters
filterSet.complex_filter.complexFilter[1].key="sku" //filterSet.complex_filter.complexFilter[1].key="'sku'" filterSet.complex_filter.complexFilter[1].value.key="like" //filterSet.complex_filter.complexFilter[1].value.key="'like'" filterSet.complex_filter.complexFilter[1].value.value ="888" //filterSet.complex_filter.complexFilter[1].value.value ="'888'" //filterSet.complex_filter.complexFilter[1].value.value ="888%" //filterSet.complex_filter.complexFilter[1].value.value ="888*"
//-----login --------- SessionId is int username is string ="*******" password is string ="*******" SessionId=MagentoService.login(username,password) Trace("Session Id " + SessionId) //-----login ok---------
products = MagentoService.catalogProductList(SessionId, filterSet,storeView)
nrProducts is int nrProducts= products.Item..Occurrence
Trace(nrProducts)
FOR i= 1 TO nrProducts Trace(products.item[i].product_id[1].text + tab + products.item[i].sku[1].text + tab +products.item[i].name[1].text) END
Info("finish") |
| |
| |
| | | |
|
| | |
| |
| Publicado el 19,octubre 2016 - 18:26 |
Preciso integrar meu ERP windev com o site magento, alguem tem alguma sugestao? pode me adicionar no skype igorburc
Obrigado
trian a écrit :
Hello iam trying to get list of products filtered sku like 888 but allways i get all the products list. That is my code where is the error; Anyone that have solve the promblem ?
storeView is string = "" products is catalogProductEntityArray aProduct is catalogProductEntity filterSet is filters
filterSet.complex_filter.complexFilter[1].key="sku" //filterSet.complex_filter.complexFilter[1].key="'sku'" filterSet.complex_filter.complexFilter[1].value.key="like" //filterSet.complex_filter.complexFilter[1].value.key="'like'" filterSet.complex_filter.complexFilter[1].value.value ="888" //filterSet.complex_filter.complexFilter[1].value.value ="'888'" //filterSet.complex_filter.complexFilter[1].value.value ="888%" //filterSet.complex_filter.complexFilter[1].value.value ="888*"
//-----login --------- SessionId is int username is string ="*******" password is string ="*******" SessionId=MagentoService.login(username,password) Trace("Session Id " + SessionId) //-----login ok---------
products = MagentoService.catalogProductList(SessionId, filterSet,storeView)
nrProducts is int nrProducts= products.Item..Occurrence
Trace(nrProducts)
FOR i= 1 TO nrProducts Trace(products.item[i].product_id[1].text + tab + products.item[i].sku[1].text + tab +products.item[i].name[1].text) END
Info("finish") |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,agosto 2018 - 17:01 |
| A coupon code is the most effective and simple way to boost your business on your Magento ecommerce store. This code also helps you to set up the promotions on your store, and to give the customers free shipping for a short time for their loyalty towards your store and giving them discount offers based on your own terms and conditions, to create Magento coupon code you can check this best guide (https://www.cloudways.com/blog/create-coupon-code-magento), so that your customers will reap as many advantages from these promotions as they can! |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|