Attribute File Upload

Results 1 to 20 of 31
05 Jun 2006, 21:42
#1
timestands avatar

timestands

New Zenner

Join Date:
Jun 2006
Posts:
7
Plugin Contributions:
0

Attribute File Upload

Ok once again if there is a thread elsewhere for this please let me know. I am new at this.

I sell items that can be customized by the customer. I would like them to be able to upload their pics at the end of checkout instead of having to email me them. I know this can be done but have not figuered it out.

please help and in simple terms.

thanks
jessica
06 Jun 2006, 10:32
#2
mrs1 avatar

mrs1

New Zenner

Join Date:
Mar 2006
Posts:
13
Plugin Contributions:
0

Re: Attribute File Upload

Im interested in this one to....if there is a thread somewhere else that covers this could someone let me know.

cheers
08 Jun 2006, 17:32
#3
littletags avatar

littletags

New Zenner

Join Date:
Apr 2006
Posts:
29
Plugin Contributions:
0

Re: Attribute File Upload

Go to Catalog - > Option Name Controller.

Then in there Option name...put whatever you want to like "Upload your own image" and in the option type, but file.

Easy stuff, just have to know where to look for it.
24 Jun 2006, 15:52
#4
lords_diakonos avatar

lords_diakonos

New Zenner

Join Date:
Jun 2006
Posts:
3
Plugin Contributions:
0

Re: Attribute File Upload

Ok I set up a file attribute and added it to a product. I goto the cart and add the item select a file to upload but all it puts is the name of teh file. It is treating it as text. why?
24 Jun 2006, 16:28
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Attribute File Upload

The file is managed internally ... whether it reads text or billybob ... it works find ... :smile:
24 Jun 2006, 17:19
#6
lords_diakonos avatar

lords_diakonos

New Zenner

Join Date:
Jun 2006
Posts:
3
Plugin Contributions:
0

Re: Attribute File Upload

But I donot see the uploaded file. It is not in /pub or /downloads. Both are set to 777.
24 Jun 2006, 17:24
#7
monkeymadness avatar

monkeymadness

Zen Follower

Join Date:
Feb 2006
Posts:
270
Plugin Contributions:
0

Re: Attribute File Upload

hello

uploaded files get put in

images/uploads

hth :smile:
24 Jun 2006, 17:28
#8
lords_diakonos avatar

lords_diakonos

New Zenner

Join Date:
Jun 2006
Posts:
3
Plugin Contributions:
0

Re: Attribute File Upload

I am new to Zen. Thank you. I see them now. :-)
26 Jun 2006, 12:57
#9
seaney avatar

seaney

New Zenner

Join Date:
May 2006
Posts:
4
Plugin Contributions:
0

Re: Attribute File Upload

Hi there,
sorry if this is covered somewhere else but what do i do with the file onces its in images/upload? I would like to have it easily accesable as my staff need to be able to access it? :thumbsup:
Cheers
30 Jul 2006, 19:53
#10
zincxxx avatar

zincxxx

New Zenner

Join Date:
Oct 2005
Posts:
2
Plugin Contributions:
0

Re: Attribute File Upload

Im interested in having the file accessed in the admin area as well. The info for doing this on oscommerce isn't applicable here and I haven't been able to find a solution on my own.

When viewing the orders, the attributes including the uploaded file/image are listed. It would be nice to be able to click on the file name to see the file, in my case its just an image. Otherwise, there is no way to view the image from the zen cart admin.

Also noticed that the filename is changed during this current process. If image.jpg is uploaded, its name is displayed as 1. image.jpg (yes, there is a space there). However, the file in the uploads directory is just named 1.jpg.

Can anyone help in making the image name in the orders area a clickable link?
30 Jul 2006, 19:55
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Attribute File Upload

The real filename is stored in the database ... to avoid overlaps ... it is saved to the server as a numeric filename ...
30 Jul 2006, 21:44
#12
zincxxx avatar

zincxxx

New Zenner

Join Date:
Oct 2005
Posts:
2
Plugin Contributions:
0

Re: Attribute File Upload

Thanks for the info Linda. I decided to use a copy of Innova's Asset Manager for viewing & managing the uploads form the admin area. Works like a charm and the client is happy!
19 Aug 2006, 06:08
#13
allprowebmaster avatar

allprowebmaster

New Zenner

Join Date:
Aug 2006
Posts:
2
Plugin Contributions:
0

Re: Attribute File Upload

Where can I get Innova's Asset Manager for viewing & managing the uploads form the admin area. I really need this for my client as well.

I also wanted to find out how or where I would set the upload attribute so the browse button is under the text field instead of being to the right of it. Help would be much appreciated.
28 Sep 2006, 12:14
#14
dmservices avatar

dmservices

New Zenner

Join Date:
Feb 2006
Posts:
21
Plugin Contributions:
0

Re: Attribute File Upload

I dont understand why the file uploaded by the customer cannot be opened by the shop sales team in the Admin/orders area?

In our case, when a trophy is ordered the shop staff log onto admin/customers/orders and can view the item, engraving & size requirements (attributes) and also need to see the uploaded image of the logo required - I shouldnt have to give them FTP access in order to do this.

thanks to zincxxx for recommending Innova's Asset Manager, i'll have to go searching for it ASAP!
29 Sep 2006, 08:47
#15
dmservices avatar

dmservices

New Zenner

Join Date:
Feb 2006
Posts:
21
Plugin Contributions:
0

Re: Attribute File Upload

DOH! just my luck I havent been able to find this asset manager thingy! Could anybody tell us where to find it or something similar??

Or are there any code mods anyone here has done to allow customer uploaded files to be opened in admin panel?

There must be lots of people who require this function...

thanks for any help
01 Oct 2006, 18:56
#16
cma01 avatar

cma01

New Zenner

Join Date:
Nov 2005
Posts:
6
Plugin Contributions:
0

Re: Attribute File Upload

Okay, I found a modification on the OcCommerce forums to add a link to view the file/image from the edit order function in admin

http://forums.oscommerce.com/lofiversion/index.php/t202695.html

I've gotten to the point where it doesn't throw any errors, but it still doesn't display a link either.

I added this this a file under admin/includes/extra_configures
define('DIR_WS_CATALOG_IMAGES_UPLOADS', DIR_WS_CATALOG_IMAGES .

'uploads/');
define('DIR_FS_CATALOG_IMAGES_UPLOADS', DIR_FS_CATALOG_IMAGES .

'uploads/');

I added this to a file under admin/includes/extra_datafiles/
define('TABLE_PRODUCTS_OPTIONS_TYPES', 'products_options_types');

Then in the orders.php, I tried to convert it to Zencart format from instructions I found online, but I must be missing something. This is what I have

if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {

for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {

// Customization #31101 for file_upload view begin
$option = $order->products[$i]['attributes'][$j]['option'];
## Build a query to check if this option is of 'File' Type
$file_check_sql = " select count(*) from ".TABLE_PRODUCTS_OPTIONS ." o,

".TABLE_PRODUCTS_OPTIONS_TYPES." ot WHERE o.products_options_type = ot.products_options_types_id AND products_options_types_name='File' AND o.products_options_name='".$option."'";

$file_check_sql = $db->Execute($file_check_sql);
$isFile = $file_check_sql->RecordCount();

if($isFile == 1 &&

@file_exists(DIR_FS_CATALOG_IMAGES_UPLOADS.$order->products[$i]['attributes'][$j]['value'])){
$link = "<a href=". DIR_WS_CATALOG_IMAGES_UPLOADS.$order->products[$i]['attributes'][$j]['value']." target='_blank'><i>Click to View</i></a>";
}else {
$link = "";

}

echo '<br /><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br($order->products[$i]['attributes'][$j]['value']);

if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';

if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') echo TEXT_INFO_ATTRIBUTE_FREE;

echo ' '. $link.' </i></small></nobr>';
// Customization #31101 end

Should this be in another directory, like extra_functions rather than in the orders file? Can anyone tell why the link isn't displaying?
06 Oct 2006, 09:32
#17
dmservices avatar

dmservices

New Zenner

Join Date:
Feb 2006
Posts:
21
Plugin Contributions:
0

Re: Attribute File Upload

Can any Zen superstars help on this??

I'm certain it would be very helpful
06 Oct 2006, 12:54
#18
peanut77 avatar

peanut77

Zen Follower

Join Date:
Feb 2005
Posts:
266
Plugin Contributions:
0

Re: Attribute File Upload

This is probably really bad practice (but desperate mesures were needed)- but my client required access to ftp'd up images files so I simply removed the htaccess file from the uploads folder - now they simply type the site address www.siteaddress.co.uk/images/uploads/filename.jpg

with the filename being specified on the customer order and they can then just get the image from the browser.

I would not recommned doing this with any sort of senstive/private information.
06 Nov 2006, 07:41
#19
boylan avatar

boylan

New Zenner

Join Date:
Sep 2006
Posts:
35
Plugin Contributions:
0

Re: Attribute File Upload

Continuing on the bad practice described above - I have changed the .htaccess file to allow access to the uploaded images from IP address of the store owner - and created a link on the edit order page to view the file. To do this on your site:
(using 1.3.5)
change line 401 of admin/orders.php FROM:
          echo '<br /><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br($order->products[$i]['attributes'][$j]['value']);

TO:
//          echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br($order->products[$i]['attributes'][$j]['value']);
		echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ';
		if ($order->products[$i]['attributes'][$j]['option'] == "Logo 1" || $order->products[$i]['attributes'][$j]['option'] == "Logo 2" || $order->products[$i]['attributes'][$j]['option'] == "Logo 3" || $order->products[$i]['attributes'][$j]['option'] == "Logo 4" || $order->products[$i]['attributes'][$j]['option'] == "Logo 5") {
		$full_logo_name  = $order->products[$i]['attributes'][$j]['value'];
$pieces = explode(".", $full_logo_name);
		echo nl2br($order->products[$i]['attributes'][$j]['value']) . ' <a href="/images/uploads/' . $pieces[0] . '.' . $pieces[2] . '" target="_blank">View ' . $pieces[0] . '.' . $pieces[2] . '</a>';
		} else {
		echo nl2br($order->products[$i]['attributes'][$j]['value']);
		}

Which results in something like this:
Logo 1: 4. joomla_logo_black.jpg View 4.jpg

The above only works because the Option Name for uploaded images is "Logo 1" through "Logo 5". If the Option Name for your uploaded file is different, then change those names. It will also fail if there is more than one "." in a filename - but I'm not sure Zen-Cart would allow it to be uploaded.

It currently works on my site, but no guarantees. Hope this helps some people - its not a full uploaded file editor, but it will allow unskilled store admins to at least see the uploaded files referenced without typing a bunch of stuff.
24 Aug 2008, 14:43
#20
franck avatar

franck

New Zenner

Join Date:
Jul 2008
Posts:
5
Plugin Contributions:
0

Re: Attribute File Upload

I'm desperately searching for a solution to my problem: My products require customers to upload files (customized merchandise).

But Zen Cart 1.3.8 allows customers to put items in the cart without the mandatory upload. No test for the upload seems to be run, even though the attribute is "Required". :frusty:

Can anyone help, please?

Many thanks!