Jump to content

Need an interface to add/delete/modify products...


Omzy

Recommended Posts

I'm creating a website for my friend's car business using PHP 5.2 with MySQL. I would like to provide him with an easy to use interface where he can log in and add/delete/modify stock. There also needs to be a facility to add multiple images. There is no e-commerce facility required.

 

Now I've looked at two options so far:

 

1) phpmyadmin - this would be too complex for my friend and does not provide facility to add images

2) Joomla using virtuemart extension - this is more geared towards an e-commerce site and although you can disable the e-commerce functions it's still not ideal for showcasing cars.

 

I also came across a script here: http://real-estate-management-software.org/ - the only problem with this it seems to be written in PHP4 and I could not get to to work on PHP5 at all. Otherwise that would have been a perfect solution - it's nice and simple and although it's designed for properties I could easily modify it for cars.

 

So I'm looking for a free solution to this - anyone have any suggestions?

Link to comment
Share on other sites

I can easily code a form for the basic product management - but the tricky bit would be implementing a good login system and image uploader with auto-thumbnailing...

 

If its only your friend updating the website then why use a login system. Just put the admin files in a folder called admin/ and protect using htpasswd - easy.

 

Image uploading and resizing isn't that hard. I use imagemagick but you could use GD functions. There are loads of examples.

Link to comment
Share on other sites

cleary1981 - thanks for that suggestion. I had a look at it but again it's more of a shopping cart tool...

 

neil - that's true about the login system. so the main issue is the images i suppose. i would need to create a system that allows me to add/remove images for a car - how would I go about linking the images to it's correspending car? There can be any number of images.

Link to comment
Share on other sites

neil - i need thumbnail images to appear on the car details page, then each thumbnail opens up it's full image

 

OK when a user clicks on a car you will have the id of the car in the url

car.php?carId=123

 

Get all images from the database from carId 123 and display them on the page. You can use a bit of javascript to do a popup link. You could pass the filename within the link so on the popup page all you need is

print "<img src='images/".$_GET['filename']."'>";

Link to comment
Share on other sites

I have 3 questions to ask:

 

1) Let's say I'm in the admin area - and I have an "upload image" button on a car details page. How do I link the image file with it's corresponding car entry in the database?

 

2) Let's say I have 10 fields in the database to store filenames for 10 images - some cars might not have 10 images so won't it error if it tries to fetch 10 images for each car?

 

3) Do the filenames for the thumbnail images need to be entered in the database?

Link to comment
Share on other sites

I explained briefly in previous posts to your questions

 

1) Let's say I'm in the admin area - and I have an "upload image" button on a car details page. How do I link the image file with it's corresponding car entry in the database?

 

As I said you use the cars primary key ID

 

Lets do a database:

 

cars

=====

carId

make

model

name

 

images

=====

imageId

carId

filename

 

 

Put the carId in a hidden field in the upload form

 

2) Let's say I have 10 fields in the database to store filenames for 10 images - some cars might not have 10 images so won't it error if it tries to fetch 10 images for each car?

 

You dont have 10 fields in the cars table. You store images in the images table and use the carId as the join. I can store any number of images I want.

 

3) Do the filenames for the thumbnail images need to be entered in the database?

No, when the image is uploaded and resized store the image in a thumbs/ directory with the same filename as the biggest image.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.