PDA

View Full Version : e-commerce, with a difference


Desmo
10-10-2007, 22:59
OK, need a little more help with my site.

I've got a few "products" that are essentially electronic. Nothing physical is changing hands.

As you may know, I'm making artworks for customers, but what I'd like is for them to:


be able to register and keep an account
order their product
pay via paypal
upload their files to their area
use their area to download finished files


That's it for now.

Most e-commerce things I see are really for shops selling items. I can't find anything that integrates the file aspect in the customer area.

Any ideas?

Flibster
11-10-2007, 00:41
HTML interface to a FTP site maybe?
Java even if desperate?

We do somethign like that - but just give them limited access to a FTP server so they can see only what we allow them to see.

Can't think of anything other than that sadly.

leowyatt
11-10-2007, 09:30
PHP & MySQL interface for the these;

* be able to register and keep an account
* order their product
* pay via paypal

And as flibster says HTML/FTP interface for the others, though you might be able to do that in php too.

Just my 2p worth :)

Desmo
11-10-2007, 09:36
But the problem is....I can't make any of this ;D

I was hoping there might be some kind of off the shelf (opensource) software I could use :/

leowyatt
11-10-2007, 09:49
well nay worry lad, it's all do able and easy enough :)

I don't think there would be something off the shelf :(

Desmo
11-10-2007, 10:29
I'd prefer to do it like this so I can work on things from work and home. IF could keep it simpler and just have a form that is emailed to me and then all order correspondence is done via email. But this would take up more time overall.

Using the system I'd like, I could get the order information from the customer and it's kept in their area. I could then check on their details, files uploaded and also upload their final artwork for them to download. Payment integration would be nice but not essential. Maybe auto emailing them when there are updates. I'd have thought it was quite complex but then I don't know what I'm talking about.

leowyatt
11-10-2007, 10:34
What are your time scales for this? There are a couple of php people on here including me which could assist you in getting you on your way.

Desmo
11-10-2007, 10:42
I'm not in a major rush, but I'd like to be up and running in around a month or so.

leowyatt
11-10-2007, 10:50
ok well I'm sure we can cobble something together for you :)

Desmo
11-10-2007, 12:19
That would be great. Do you need me to do anything for you? Or is it something I can fine tune myself once the basics are there?

leowyatt
11-10-2007, 12:24
We can rope Jasper in as he's a PHP guru now ;D

Apart from those parts you detailed what else do you want the site to do? I firstly we'll need to get the processes for your site i.e. customer accounts, etc.

I think if we involve you along the way you'll get to the stage where you can change stuff yourself :) Off the shelf packages I'd probably suggest having a look at the Zend Framework, that is good for scalable systems. (Actually I'm not sure if it's being released yet)

I wouldn't be able to help with the ftp stuff but could assist with the customer side of things.

What stuff does your hosting plan offer? PHP (which version), does it have MySQL?

Desmo
11-10-2007, 12:35
OK, here's the process I'd like to follow for an order.

Part 1
Customer visits site and places order.
A form takes all the usual details of Name, Address, Tel No, Email, Job size, etc.
Customer can upload their file (txt, doc, jpg, etc) for me to see.
I'm emailed notification of order.

Part 2
I approve job and set price level.
Customer is emailed notification of price and then pays via paypal.
I'd get email from paypal as confirmation and then start work.

Part 3
Work is complete and I upload the pdf of the work to the customers area.
Button is clicked to email customer informing them that their sample is ready.

Part 4
Customer either passes proof and downloads pdf or makes notes on changes to artwork.
Email is sent to me to inform me of above.

Part 5
Once order is complete I can upload a pdf invoice to their area for them to use if they wish.
Email is sent notifying the customer.

Order complete.

This is all off the top of my head right now but thats how I see the overall process.

Mark
11-10-2007, 12:42
I've done more than a little PHP/MySQL in my time (actually, bloody loads of the stuff).

If I can fit time in around work, I'll gladly help out. :)

leowyatt
11-10-2007, 13:40
OK, here's the process I'd like to follow for an order.

Part 1
Customer visits site and places order.
Would you want the customer to create an account here or just have a form and create an account when they are happy with you to do the work?
A form takes all the usual details of Name, Address, Tel No, Email, Job size, etc.
Dead simple to do, just have a HTML form save the data to the DB and then have something on yourside to show the details.
Customer can upload their file (txt, doc, jpg, etc) for me to see.
Can be done in HTML & with the php, I've actually done this in our new staff platform recently so no worries there
I'm emailed notification of order.
simple email script when all the stuff has been written to the db, etc it emails you the link to the details page as mentioned above

Part 2
I approve job and set price level.
This can be contained in the details screen for you which you enter your blurb and click save.
Customer is emailed notification of price and then pays via paypal.
Do we get them to create an account here???
We can re-use the email script and provide them a link to pay you via paypal. I think this can be found on the paypal site.
I'd get email from paypal as confirmation and then start work.
You'd just need to check your email to see your paypal confirmation ;)

Part 3
Work is complete and I upload the pdf of the work to the customers area.
the ftp stuff would need to be done here (don't know much about it :(
Button is clicked to email customer informing them that their sample is ready.
re-use email class

Part 4
Customer either passes proof and downloads pdf or makes notes on changes to artwork.
customer will need to log into account, simple html & php code
Email is sent to me to inform me of above.
re-use email class :D

Part 5
Once order is complete I can upload a pdf invoice to their area for them to use if they wish.
ftp again, dunno ;D
Email is sent notifying the customer.
simple html form and php code + email class again

Order complete.

This is all off the top of my head right now but thats how I see the overall process.

Desmo
11-10-2007, 13:52
Okely dokely.


Part 1
Customer visits site and places order.
Would you want the customer to create an account here or just have a form and create an account when they are happy with you to do the work?
I'd prefer an account at the start. My prices are going to be at set levels so the customer should 99% know i they're happy to order or not. I just want to confirm the customer has selected the correct level and cost for the work involved before they pay anything.
A form takes all the usual details of Name, Address, Tel No, Email, Job size, etc.
Dead simple to do, just have a HTML form save the data to the DB and then have something on yourside to show the details.
Customer can upload their file (txt, doc, jpg, etc) for me to see.
Can be done in HTML & with the php, I've actually done this in our new staff platform recently so no worries there
I'm emailed notification of order.
simple email script when all the stuff has been written to the db, etc it emails you the link to the details page as mentioned above

Part 2
I approve job and set price level.
This can be contained in the details screen for you which you enter your blurb and click save.
Customer is emailed notification of price and then pays via paypal.
Do we get them to create an account here???
As above, I think I'd prefer account creation earlier on.
We can re-use the email script and provide them a link to pay you via paypal. I think this can be found on the paypal site.
I'd get email from paypal as confirmation and then start work.
You'd just need to check your email to see your paypal confirmation ;)
That's what I meant :p

Part 3
Work is complete and I upload the pdf of the work to the customers area.
the ftp stuff would need to be done here (don't know much about it :(
Button is clicked to email customer informing them that their sample is ready.
re-use email class

Part 4
Customer either passes proof and downloads pdf or makes notes on changes to artwork.
customer will need to log into account, simple html & php code
Email is sent to me to inform me of above.
re-use email class :D

Part 5
Once order is complete I can upload a pdf invoice to their area for them to use if they wish.
ftp again, dunno ;D
Email is sent notifying the customer.
simple html form and php code + email class again

Order complete.

Desmo
16-10-2007, 11:14
Looking at this, I think I'm going to change direction and go for a simpler form to be sent by email. It's got to be easier and quicker to sort out.

Are there any decent (and free) online form generators? I've had a play in DW3 and stolen some code from the net but I think it could all be done better and still need to add a couple of things.

I basically need to collect their details, email address, etc. Allow them to add some notes and then attach up to maybe 5 files. This should all then be emailed to me.

Desmo
16-10-2007, 15:45
Get in...I'm getting somewhere :D

Got a form made up that takes details and then emails them on to me. It also uploads the customers files to my webspace for me to grab from wherever I need to and adds a link to the files in the email.

I basically use a proggy to generate the main form and ow I'm manually fighting my way through it trying to modify it to exactly what I need. Only problem I've hit so far is that I want to upload the customer files into their own directory, mainly for neatness for myself. I can get it to generate the new directory using the customer name filed but I can't quite seem to get the files in there for some reason. Something is going amiss but I'll have another play later on :)

leowyatt
16-10-2007, 16:25
Hey mate, just looked at this properly, could it be file permissions to upload the file?

Desmo
16-10-2007, 16:46
Nah, they're uploading fine, just can't get them into the newly created directory for some reason. They stay one level up.

Desmo
16-10-2007, 17:21
Here's the php code I'm struggling with...

if(is_dir("/home/jmartw00/files/$Name"))
{
}
else { mkdir("/home/jmartw00/files/$Name", 0777);
}
$image_part = " - ".$HTTP_POST_FILES['Attachment1']['name'];
$image_list[7] = $image_part;
copy($HTTP_POST_FILES['Attachment1']['tmp_name'], "/home/jmartw00/files/$Name".$image_part);
$image_part = " - ".$HTTP_POST_FILES['Attachment2']['name'];
$image_list[8] = $image_part;
copy($HTTP_POST_FILES['Attachment2']['tmp_name'], "/home/jmartw00/files/$Name".$image_part);
$image_part = " - ".$HTTP_POST_FILES['Attachment3']['name'];
$image_list[9] = $image_part;
copy($HTTP_POST_FILES['Attachment3']['tmp_name'], "/home/jmartw00/files/$Name".$image_part);

I just can't get it to put the actual file into the new directory.

leowyatt
16-10-2007, 17:51
just got in from work but will have a look in a bit

Desmo
16-10-2007, 19:14
OK, cheers matey. I've tried all sorts of stuff but just can't get it nailed :/

leowyatt
17-10-2007, 09:08
Here's the php code I'm struggling with...

if(is_dir("/home/jmartw00/files/".$Name))
{
}
else { mkdir("/home/jmartw00/files/".$Name, 0777);
}
$image_part = " - ".$_FILES['Attachment1']['name'];
$image_list[7] = $image_part;
copy($_FILES['Attachment1']['tmp_name'], "/home/jmartw00/files/$Name".$image_part);
$image_part = " - ".$_FILES['Attachment2']['name'];
$image_list[8] = $image_part;
copy($_FILES['Attachment2']['tmp_name'], "/home/jmartw00/files/".$Name.$image_part);
$image_part = " - ".$HTTP_POST_FILES['Attachment3']['name'];
$image_list[9] = $image_part;
copy($_FILES['Attachment3']['tmp_name'], "/home/jmartw00/files/".$Name.$image_part);

I just can't get it to put the actual file into the new directory.

try that :)

Desmo
17-10-2007, 17:38
Still seem to be struggling :/

I guess I'll leave it as is. I at least get the name appended to the front of the file so I still know who it's from, just would have preferred it to be in a folder for neatness really.

leowyatt
17-10-2007, 18:53
i'll chat to you about it later if you like?

Mark
17-10-2007, 19:33
Here's the php code I'm struggling with...

if(is_dir("/home/jmartw00/files/$Name"))
{
}
else { mkdir("/home/jmartw00/files/$Name", 0777);
}
$image_part = $HTTP_POST_FILES['Attachment1']['name'];
$image_list[7] = $image_part;
copy($HTTP_POST_FILES['Attachment1']['tmp_name'], "/home/jmartw00/files/".$Name."/".$image_part);
$image_part = $HTTP_POST_FILES['Attachment2']['name'];
$image_list[8] = $image_part;
copy($HTTP_POST_FILES['Attachment2']['tmp_name'], "/home/jmartw00/files/".$Name."/".$image_part);
$image_part = $HTTP_POST_FILES['Attachment3']['name'];
$image_list[9] = $image_part;
copy($HTTP_POST_FILES['Attachment3']['tmp_name'], "/home/jmartw00/files/".$Name."/".$image_part);

I just can't get it to put the actual file into the new directory.
Try this version. There was something important missing. :)

PS - I'm not sure what $image_list is for. The changes above may possibly break that. If so, I can give you a fix for that too. :)

Desmo
18-10-2007, 07:39
Ahhh, I see what you've done there :)
Could well be it, will give it a whirl later.

I think the image_list bit is the part that lists any uploaded files in the email that is sent to me.

Desmo
18-10-2007, 09:25
Wohooo, with a minor bit of tweaking, my ordering is now as I wanted :D

Cheers for the help guys.

Desmo
18-10-2007, 10:26
Hmmm, next problem :p

Directories are being create with 755 permissions instead of 777 meaning I can't delete them via ftp. :/

I'm sure this was working properly the other day.

Mark
18-10-2007, 10:34
That'll be a thing called 'umask' possibly. It's a pain the the butt for things like that.

I can't remember if that server allows you to run shell commands within PHP (Beansprout will tell you), but if it does, then adding:

system("chmod -R 777 /home/jmartw00/files/$Name");

after copying in the last of the files should sort it.

Daz
18-10-2007, 11:15
774! World execute makes baby Jesus cry :p

[edit]Depends if apache is getting the group right of course.

Desmo
18-10-2007, 11:42
Seems I can't even change the folder permissions manually.

Desmo
18-10-2007, 11:47
I can't even delete the files using the website file manager. I have to delete the entire "files" folder including all of it's contents to get rid of them.

Mark
18-10-2007, 11:54
774! World execute makes baby Jesus cry :p

[edit]Depends if apache is getting the group right of course.
I concur, but I've found from past experience that Apache+PHP throws a fit on shared hosting if you don't. I'd much rather have 0400 myself. :)