Wij hebben een groothandel en gebruiken de Exact Globe software als ERP oplossing. Binnen de ERP hebben we een productstructuur die we willen gebruiken in een online catalogus / webshop.
Wij willen een publieke web-catalogus maken en een afgeschermde webshop voor de detailhandel. Om deze catalogus / webshop omgeving up to date te houden, is onze wens een koppeling te maken met onze ‘ERP database gebaseerd op Ms SQL database’ d,m,v, een synchronisatie.
Ons idee daarbij is dat wanneer zich bijvoorbeeld een prijswijziging van een product voordoet binnen de ‘Exact database’ dit te synchroniseren is met de webshop.
Deze synchronisatie willen we beperken tot een periodieke import van een SQL query van alleen de product structuur (product-, omschrijving, afbeelding, consumentenprijs, winkelprijs).
Is dit te realiseren binnen Magento en heeft iemand van jullie ervaringen met een dergelijke implementatie?
Kunnen we daarbij volstaan met de ‘community versie’ of is de ‘enterprise versie’ een echte vereiste?
Alvast dank voor jullie reactie.
Ik was zo opgewonden om iemand anders gebruik van MS SQL, dat ik zojuist besloten om mijn oplossing na te vinden, kunt u genieten van een verantwoorde!
USE [DATABASE_NAME] GO /****** Object: StoredProcedure [dbo].[usp_httppost] Script Date: 03/11/2010 11:18:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /* This is a procedure, not an udf because of the exec insert at the end The exec insert is needed because the response can exceed 8000 characters
Normally, one should call methods like this : exec @rc = master.dbo.sp_OAMethod @http, 'Open', NULL, 'POST' ,'www.d-trix.com/default.asp', 0
But this does not work with WinHttp.WinHttpRequest.5.1 and gives different errors So we call methods like this exec @rc = master.dbo.sp_OAMethod @http, 'Open("POST","www.d-trix.com/default.asp",0)'
if a (temp) table with the name #usp_httppost exists, the procedure will insert the result into that table. if not, the procedure will return a resultset with the results */ ALTER procedure [dbo].[usp_httppost] ( @URL varchar(512), @post varchar(4000) --@WebLogin varchar(128) = null, --@WebPassword varchar(128) = null, --@ProxyLogin varchar(128) = null, --@ProxyPassword varchar(128) = null ) /* returns @usp_httppost table ( return_status bit null, -- 0 is OK, 1 is error error_msg varchar(4096) null, HTTP_Status varchar(30) null, HTTP_AllResponseHeaders text null, HTTP_ResponseText text null ) */ as begin /******************************************************************* Name : usp_httppost Server : SQLserver 2000 Description : Post data as coming from an HTML FORM with METHOD=POST to an URL and retrieve the result. Parameters : @URL : the url to use ( like https://www.domain.com ) @post : the parameters to post @WebLogin : (optional) The Username for the webserver @WebPassword : (optional) The password for the webserver @ProxyLogin : (optional) The Username for the proxyserver @ProxyPassword : (optional) The password for the proxyserver Notes : . The data to be posted should be like ?param1=val1&par2;=val2 . if a table called #usp_httppost exists, the result is stored into that table. If not, the procedure returns a resultset. *******************************************************************/
set nocount on
declare @http int, -- the objecttoken for WinHttp.WinHttpRequest.5.1 @rc int, -- the return code from sp_OA procedures @src varchar(255), -- the source of an error @desc varchar(512), -- the desciption of an error @Doing varchar(512), -- What are we doing when calling a sp_OA proc @TableExisted bit, -- Did the temp table exists yes(1) or no(0) @WebLogin varchar(128) = null, @WebPassword varchar(128) = null, @ProxyLogin varchar(128) = null, @ProxyPassword varchar(128) = null
-- init
set @rc = 0
if object_id('tempdb..#usp_httppost') is null begin -- The temp table #usp_httppost does not exists set @TableExisted = 0 create table #usp_httppost ( return_status bit null, -- 0 is OK, 1 is error error_msg varchar(4096) null, HTTP_Status varchar(30) null, HTTP_AllResponseHeaders text null, HTTP_ResponseText text null ) end else begin set @TableExisted = 1 truncate table #usp_httppost end
update #usp_httppost set HTTP_AllResponseHeaders = #tempresult.HTTP_AllResponseHeaders from #tempresult where #tempresult.HTTP_AllResponseHeaders is not null