Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Delphiµ÷ÓÃMagento's Webservice

×î½üÐèÒª½«Magento(¹úÍâ±È½Ï³öÃûµÄ¿ªÔ´PHP+MySQLµç×ÓÉÌÎñÍøÕ¾)ÓëÒ»¸öERP½øÐÐÕûºÏ£¬¾ÍÐèÒªµ÷ÓÃMagentoµÄWebservice¡£
MagentoÌṩ2Ì×api¡£
×¢£ºÈç¹ûÐèҪͬ¹¹µ÷ÓÃÐèҪʹÓõÚ1¸öwsdl£¬ÈçÒì¹¹³ÌÐòµ÷ÓÃÐèʹÓõÚ2¸öwsdl¡£
1.http://xxx.xxxxxxx.xxx/magento/api/soap/?wsdl
2.http://xxx.xxxxxxx.xxx/magento/api/v2_soap/?wsdl
µ÷Óò½Öè
Ò»¡¢ÔÚMagentoÖд´½¨µ÷ÓÃWebserviceµÄÓû§ÃûÓëÃÜÂë(½øÈëMagentoºǫ́¹ÜÀí->System->Web Services->Users)£¬ÔÚ´´½¨Óû§Ç°ÏÈÉè¼ÆÒ»¸ö½ÇÉ«(½øÈëMagentoºǫ́¹ÜÀí->System->Web Services->Roles)£¬ÓÃÀ´¶Ôµ÷ÓÃWebserviceµÄȨÏÞ½øÐÐÏÞÖÆ
¶þ¡¢ÔÚDelphi¶ËÓÃWSDL Import¹¤¾ß½øÐе¼È룬µ¼Èëºó»á×Ô¶¯Éú³ÉÏà¹Ø¶ÔÏóµÄÀàÐÅÏ¢
Èý¡¢Ê¹ÓÃMagentoµÄ½Ó¿Ú£¬µ÷ÓÃlogin¡¢salesOrderInfoµÈº¯Êý
Àý1£ºËÑË÷Ïà¹Ø×´Ì¬µÄ¶©µ¥
procedure TFrmSiteManagement.getOrderList;
var
P:Mage_Api_Model_Server_V2_HandlerPortType;
sessionID:WideString;
filterOn:filters;
aE:associativeEntity ;
aA:associativeArray;
orderList:salesOrderEntityArray;
order:salesOrderEntity;
i:Integer;
begin
P:= HTTPRIO1 as Mage_Api_Model_Server_V2_HandlerPortType;
//filter
filterOn:=filters.Create;
SetLength(aA,1);
aE:=associativeEntity.Create;
aE.key:='status';
aE.value:='Pending';
aA[0]:=aE;
filterOn.filter:=aA;
try
try
sessionID:= P.login('apiuser','apiuser');
orderList:=P.salesOrderList(sessionID,filterOn);
for i:=low(orderList) to high(orderList) do
begin
sessionID:= P.login('apiuser','apiuser');
order:=P.salesOrderInfo(sessionID,orderList[i].increment_id);
addContent(i,order) ;
end;
except
on E:Exception do
begin
ShowMessage(E.Message);
end;
end;
finally
P:=nil;
aE.Free;
SetLength(aA,0);
end;
end;

Àý2£ºLoad¶©µ¥Ã÷ϸ
var
P:Mage_Api_Model_Server_V2_HandlerPortType;
sessionID:WideString;
order: salesOrderEntity;
begin
P:= HTTPRIO1 as Mage_Api_Model_Server_V2_HandlerPortType;
try
try
sessionID:= P.login('apiuser


Ïà¹ØÎĵµ£º

DelphiʰÒÅ£¨7£© ²ÎÊýÓë·µ»ØÖµ

unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
......

Delphi abc

1. ×Ö·û´®Á¬½ÓÖ±½ÓÓÃ+£¬ÓëJavaºÍPythonÖеÄÏàͬ
2. Ö´ÐÐÍⲿÃüÁîʹÓÃwinexec£¬ShellExecute
    eg. ShellExecute(0, 'open', 'jre/bin/java', '-lang zh-CN', 'E:\myfolder', SW_SHOW);
3. ÅжÏÎļþ¡¢Îļþ¼ÐÊÇ·ñ´æÔÚ
    FileExists('C:\Users\bill\somefile.txt')
    ......

DELPHIÏß³ÌÀý×Ó

ÓÅÐãµÄÊý¾Ý¿âÓ¦ÓÃÓ¦µ±³ä·Ö¿¼ÂÇÊý¾Ý¿â·ÃÎʵÄËÙ¶ÈÎÊÌ⡣ͨ³£¿ÉÒÔͨ¹ýÓÅ»¯Êý¾Ý¿â¡¢ÓÅ»¯ ²éѯÓï¾ä¡¢·ÖÒ³²éѯµÈ;¾¶ÊÕµ½Ã÷ÏÔµÄЧ¹û¡£¼´Ê¹ÊÇÕâÑù£¬Ò²²»¿É±ÜÃâµØ»áÔÚ²éѯʱÉÁÏÖÒ»¸ö´øÓÐ SQL·ûºÅµÄɳ©£¬¼´Êó±ê±ä³ÉÁ˲éѯµÈ´ý¡£×î¿ÉÁ¯µÄÊÇÓû§£¬Ëû£¨Ëý£©ÔÚ´ËʱֻÄÜÎÞÄεصȴý¡£Óöµ½¼±ÐÔ×ӵ쬏ɴàÔÚ´Ëʱ³¢ÊÔ WindowsÖÐµÄÆäËüÓ¦ÓóÌÐ ......

ÔÚDelphiÖÐÈçºÎʹÓÃRCÎļþÖеÄ×Ö·û´®±í

Ê×ÏÈÓÃNotepad»òResource workshop 4.5½¨Á¢RCÎļþ¡£ ½á¹¹ÈçÏ /****************************************************************************
rcdemo.rc
produced by Borland Resource Workshop
*****************************************************************************/
# ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ