View Full Version : Custom E-commerce Software?
Not sure I will get much luck here but worth a try.
My company has an online shop, (PM me for a link) and we currently run EKM Powershop.
Now this is being a PITA as NO software that integrates with Sage line 50 (my accounting program) will work with EKM, They just don’t have that kind of system in place.
I’m thinking of ditching EKM and using a custom software, Something like Actinic.
https://www.actinic.co.uk/index.php?option=com_wrapper&view=wrapper&Itemid=208
The only trouble with this is you create a catalogue online so all my product pages would change URL for it to work properly. This CANNOT happen due to our SEO work. We are the best in the market under any Google search.
So what I’m after is a piece of software that can build a shopping cart only for us but also integrate with Sage line 50.
I won’t be doing the building so I don’t mind how complicated it is:rofl:
I have found someone who can make an off the shelf piece of software work by writing a script to work with EKM, But this will cost me over £1000 in development so it’s worth looking at a different cart software.
http://www.getconnect.co.uk/
Any ideas?
Cheers
Mat
hmm, the more I hear of this, the more tempted I am to write a module that takes EKM invoices and puts them into Sage.
The downer is that the sage developer licence is very prohibitive due to the cost :( Can you run imports of simple CSV's ?
DT.
Well the new version has the ability to import CSV's itself but im yet to try that part.
I "upgraded" the server yesterday over the top of 2007 but 2007 still appears in the installed programs list, I woud have thought it would have taken it out.
Might just uninstall it all and reinstall 2010, I have a backup of it.
Smally update for you DT just so you know what you can do with Sage.
I have a company who will write me a script that will be able to get orders from EKM in a CSV file and put them into the program that sends it to sage.
To write this script it will cost me £1000 plus £25 a month for the software.
Now, Would it be possible to write somthing like that myself? There is another piece of software called Tradebox. Its very simular to the other one but alot cheaper without the script.
This works by getting the CSV files from a folder a processing them.
What i need to script/build is a little program that will login to a website using a username and password, Go to a URL within that website and put a from and to date in, Then wait for the CSV to build and download it into my folder.
What program should i be looking at to build somthing like this?
It looks like the pages are in .aspx and a couple of the links are javascript.
Any help appreciated!
you could do the login, goto url and wait for response in many languages, that's pretty much what a load of testing software I write does and has done. I tend to like using perl, but could be done as a windows app in c# express easily enough.
£1000 sounds a bit steep to me, you don't want anything pretty just a time saver as from the sounds of things you can do it manually as it stands anyway, so £1000 would take doing it manually a lot of times to get ROI.
I'm over subscribed at the moment, but I'll peek through the c# code in my little library of useful things and see how much I can help.
DT.
Well ive made a start using Visual Basic 2010
Done a few tutorials today so got a grasp on it so far.
Trying to create the login at the moment, This is the page it needs to login.
https://www.ekmsecure.co.uk/ekmps/youraccount.asp
Seems to be having problems with finding the username and password fields, I see them in the HTML as "forum_username" & "form_password" but it just doesnt see it and put in what i want.
Have a quick read of this.
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/23dfc3f9-3274-4929-8dc5-9ba543f4911d
Edit, I dont really want to put my username and password in the script, I would much rather have text boxes on the form i have to manually put them in, More secure that way.
Cheers
Mat:thumb:
Hey mate
If you get stuck and need something writing for you, I'm pretty sure a guy I do a lot of work with could knock something up for you, and I expect he'd be way cheaper than £1k! If you can do it yourself then thats definitely the best way, but let me know if you need some contact details if that'd be helpful :)
I'm happy to help out gratis remotely - much prefer teaching people how to do things themselves, more job satisfaction :)
I'll have a play this afternoon, if I get the car brakes sorted in good time :)
DT.
Thanks DT your a star, It seems pretty easy what im after (He says)
If you were closer i could have done your brakes in return:lol:
if you could switch to using VS2010 express c#, that'll make my life a little easier. Although I can code in any of them, that's what I'll be using in work next week - saves me switching code modes :lol:
DT.
Im using VB Studio Express 2010 so i think thats the same.
Problem im having at the moment is the EKM website seems to be written really badly so there are no table ID's.
Need to use somthing called regex but its all way over my head at the moment.
Made a post on MSDN and see what they say...:lol:
you shouldn't need regex, that's using a hammer to crack a nut imo.
feel free to email me what you've done so far though
DT.
Well ok, Maybe not got too far...:lol:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Part 1: Use WebBrowser control to load web page
WebBrowser1.Navigate("http://www.website.com/login.aspx")
System.Threading.Thread.Sleep(2000) ' Delay 2 seconds to render login page
' Part 2: Automatically input username and password
Dim theElementCollection As HtmlElementCollection
theElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
For Each curElement As HtmlElement In theElementCollection
Dim controlName As String = curElement.GetAttribute("name").ToString
If controlName = "UserNameTextBox" Then
curElement.SetAttribute("Value", "Username text here")
ElseIf controlName = "PasswordTextBox" Then
curElement.SetAttribute("Value", "Password text here")
'In addition,you can get element value like this:
'MessageBox.Show(curElement.GetAttribute("Value"))
End If
Next
' Part 3: Automatically clck that Login button
theElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
For Each curElement As HtmlElement In theElementCollection
If curElement.GetAttribute("value").Equals("Login") Then
curElement.InvokeMember("click")
' javascript has a click method for you need to invoke on button and hyperlink elements.
End If
Next
End Sub
End Class
Thats the code im using, But with that code it will not find the username and password box and put what i want into it.
Just start a blank project and paste that into form 1 with a webbrowser control object.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Part 1: Use WebBrowser control to load web page
WebBrowser1.Navigate("https://www.ekmsecure.co.uk/ekmps/youraccount.asp")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim theElementCollection As HtmlElementCollection
theElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
For Each curElement As HtmlElement In theElementCollection
Dim controlName As String = curElement.GetAttribute("name").ToString
If controlName = "form_username" Then
curElement.SetAttribute("Value", TextBox1.Text.ToString())
ElseIf controlName = "form_password" Then
curElement.SetAttribute("Value", TextBox2.Text.ToString())
End If
Next
' Part 3: Automatically clck that Login button
theElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
For Each curElement As HtmlElement In theElementCollection
If curElement.GetAttribute("value").Equals("Log In") Then
curElement.InvokeMember("click")
' javascript has a click method for you need to invoke on button and hyperlink elements.
End If
Next
End Sub
End Class
Add a couple of text boxes onto the form, use textbox1 as username and textbox2 as password. Then add a button, button1.
By splitting the code into more little sections with a number of buttons, you'll find it easier to debug.
DT.
Man, Thats amazing. Nothing like i have been trying!:lol:
Thanks for that, I will work out what to do next with it.
Ok, Next parts.
Once this is logged in, I need it to go to the following page on its own.
http://youraccount.ekmpowershop6.com/ekmps/shops/import_export/Export.aspx
You wont be able to see this page but it has 1 checkbox on it and a from - to date selection. You need to choose what orders you want to download from which dates and click the go button.
So what i need is it to click the box and enter the from date field to match up with the date field on the website. The date field on the website is in a simple 12/34/56 format so that helps.
First off im trying to get the webbrowser1 to go to the url after it has logged in, But how do i get the program to know its logged in other then just a time delay before going to the next command?
1. drop a timer control onto your form, then double click to get to the event handler for the timer
make it something like this
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If WebBrowser1.DocumentText.Contains("You have entered your password incorrectly") Then
WebBrowser1.Navigate("http://youraccount.ekmpowershop6.com/ekmps/shops/import_export/Export.aspx")
MessageBox.Show("Reached next page")
Timer1.Stop()
End If
End Sub
You'll need to change this bit to whatever does appear consistently on the page once you have logged in
("You have entered your password incorrectly")
Now as the last part in your Button1 event, start the timer with
Timer1.Start()
As for the dates, look at the Button1 code and see that what it is doing is looping through the elements on the page looking for a specific one, follow the same logic to place in date values and invoke the click of button to request the data.
DT.
sweet, Its coming together now!
Ive got it to go to the http://youraccount.ekmpowershop6.com/ekmps/shops/import_export/Export.aspx once its logged in and see a certian part of text on that page. (Magic command that is!)
But the next link i need to click is a javascript link.
The command is:
javascript:__doPostBack('ctl00$ContentPlaceHolder1 $LinkButtonDownloadOrders','')
Been looking around now to launch this within webbrowser1 but im going for a break now.
Cheers for your help DT.
Will be back in an hour
Mat:D
the javscript link will most likely still be part of a href element or an image element.
So search for the element that contains the javascript and invoke the click, it should work the same.
I'm looking forward to the satisfaction you'll get from having done it yourself, thanks to the express version of Visual Studio true rapid-application development is possible by anyone :D
DT.
Hmm, Tricky.
I cant see an URL link for it anywhere, I think its javascript within the website.
Edit, Cant put the code in as it seems to **** the forum up.
Tried using a timer with a
If WebBrowser1.DocumentText.Contains("Download orders from your shop") Then
WebBrowser1.Document.InvokeScript("javascript:__doPostBack('ctl00$ContentPlaceHolder1 $LinkButtonDownloadOrders','')")
Timer2.Stop()
But that didnt seem to work..
taken to email now as it's getting to the point of perhaps showing a little too much information :)
DT.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.