Interesting Project – File Uploads

By | March 31, 2011

Finished up another interesting osCommerce project this week, which involved allowing the shop owner to put a “flag” on a product. This flag determines whether the product requires interaction from the customer in terms of an upload (think in terms of an image for a printed t-shirt).

Step 1 was to add in the flag capability. Easy, I simply added an extra column in the category structure, along with the relevant DB changes.

Step 2 was to add in the upload facility in the account_history_info.php page. There is a contribution that allows file uploads from the product_info.php but this was unsuitable as the site already has too much complications in contributions – QTPro, different attributes and so on.

When the files are chosen, they are uploaded and show in the page;

Step 3 was to allow the Shop Owner to grab the files, make the product and use the order.php page as so;

to uploads images of the product;

At this point, Shop Owner emails the client asking him/her to log in to the account_history_info page.

Step 4 the account_history_info page shows the two client uploaded images and the two admin uploaded images.

along with “Fancy Box” popup to show the two admin images larger;

At this point, the client can “approve” the product, or “reject” the product – and tell the Shop Owner why.

If the product is rejected, the Admin/order shows this;

The Shop Owner makes the corrections, and uploads the images of the new product using the orders page. The customer can now see the new product and can again “approve” or “reject”;

This time, the product is perfect, so the customer “approves”.

The Shop Owner can now send the product to the customer.

As you can see, quite a big task, and fiddly to get right. This involved changes across multiple files, though the two main files changed are admin/orders.php and account_history_info.php

A very nice project to work on, and I am very pleased with the end result. As is my client;

….you did a great job….

18 thoughts on “Interesting Project – File Uploads

  1. Alex

    Gary, I need the exact same project for a printing company.
    I’m very new to php programming, let me know if you can help me with this contribution

    Cheers

  2. Isa

    Hi Gary,
    I think this looks terrific, you’ve done some amazing work there. I was wondering, what does it look like frontend side? When ordering his T-Shirt, does the customer see a sort of menu with available graphics to choose from or is it all done through account_history?

    great job 🙂

  3. Gary Post author

    Hi Isa – it’s not actually for tshirts, I only made it look like a tshirt thing for the blog post lol. To answer the question a bit more fully;

    In the front end, the shop owner adds his “blank” product. This could be anything that needs printing or making, with customer provided image. tshirt, mug, mousemat and so on. The blank product added could have options as so;

    T-Shirt
    option: large image on back
    option: large image on front
    option: small image on front
    and so on.

    This would give the shop owner more guidance. I guess also, it would be a good idea to have a comments box at the same time as the initial upload – but the client written for did not require this. Would not be utra hard to add in though.

    On the client side, everything is handled in the account_history_info page as it is all tied to the ordered_product.

  4. Isa

    Hi again Gary
    …very interesting. I understand why your client is thrilled with this.
    On a side note, this is a slightly different concept, but look at this site’s bracelet designer, I think it’s clever and looks stunning: http://www.linksoflondon.com/charm-maker

  5. Gary Post author

    That is clever and does look good. It’s looks like it’s powered by XML file to store the chosen inputs. Something like that is what sets a site apart from others — probably has a full time webmastering team to look after the site.

  6. Isa

    **probably has a full time webmastering team to look after the site**
    That company surely can afford a full time team 😉
    Could something like that be feasible on an oscommerce shop?

  7. Gary Post author

    Hi Isa

    Doable – yes.
    Feasible? Not really, I think the cost would be very, very high to get something slick like that.

  8. Isa

    Hi Gary
    I think the investment would be worth it. When I discovered that site I started playing with their cool bracelet designer then ended up buying from them lol.

  9. Gary Post author

    Hi Alex – none of the things I do for clients get uploaded as contributions (unless the client uploads it). Happy to quote you for something similar which you can make into a contribution.

  10. Steve

    Hi this looks AWESOME!!! I sell poker chips, and we make custom poker chips for clients, we custom hot stamp them and I have been looking for something like this that would allow for a client to upload their graphic and see how it would look on their poker chips, it would require 2 sides which the client may have both the same or different. So much like a t-shirt I would like them to have the option to have the same thing or different on each side. Gary would love to know if you could quote on a project like this.

    Thanks

  11. Gary Post author

    Hi Bruce – none of the things I do for clients get uploaded as contributions (unless the client uploads it). Happy to quote you for something similar which you can make into a contribution.

  12. Jean carlos

    Necesito comunicarme con uno de los programdores de oscomerce quiero hacer una modificacion a un oscomerce y quisera hablar con unos de los programadores.

  13. Juan

    Hi I need this contribution is possible send me?
    Thanks

  14. Gary Post author

    Hi Juan – none of the things I do for clients get uploaded as contributions (unless the client uploads it). Happy to quote you for something similar which you can make into a contribution.

  15. Denis

    Hi Gary i need this function too. How can I get it from you? for OSC v.2.3? Thanks

  16. Gary

    Denis – this was written for older version, but there is no reason why you cannot have similar in 2.3. Get in touch by email to discuss: oscshops@gmail.com Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *