Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Fedor  
#1 Posted : Friday, September 3, 2004 10:19:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Here is one of multiple ways how to make ordering photo prints using Image Uploader 3.x:

UserPostedImage

========================================================
02/14/2008, Fedor
This code sample is outdated. Please see Photo Order Sample for recent one.

========================================================

Edited by user Monday, December 21, 2009 2:36:46 AM(UTC)  | Reason: Not specified

File Attachment(s):
ImageUploader3_OrderingPhotoPrints.zip (7kb) downloaded 172 time(s).
Fedor attached the following image(s):
ImageUploader3_OrderingPhotoPrints.png
Best regards,
Fedor Skvortsov
praxisinc  
#2 Posted : Wednesday, April 27, 2005 9:38:00 PM(UTC)
praxisinc

Rank: Member

Groups: Member
Joined: 5/12/2004(UTC)
Posts: 49

Two important questions:

1- Do you have the same sample but in Java version?

2- Is it possible to modify this sample to accept more than 1 print size from the same image? Usually customers order 3 or 4 different sizes from the same image. With the current sample is not possible.


Thanks.
Fedor  
#3 Posted : Friday, April 29, 2005 12:13:00 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Hello,

1- Do you have the same sample but in Java version?

Unfortunately Image Uploader 1.0 for Java doesn't support UploadItems property, which is used in this sample. This feature will not be available in upcoming
Image Uploader 1.1 for Java release, and I think, it will be available only later in the middle of Summer. If you need it urgently, please contact us at sales@aurigma.com.

2- Is it possible to modify this sample to accept more than 1 print size from the same image? Usually customers order 3 or 4 different sizes from the same image. With the current sample is not possible.

Yes, it is possible. As is easy to see, we store ordering info for each photo in its description, and sure, we can store any info in its description. For example to support more then 2 photos, you should process in itemChange function data from couple of paper format drop down lists. The same way you should modify description parsing in SelectionChange event handler.

If you need detailed sample, please let me know and, I will post it here :)

Edited by user Friday, May 23, 2008 3:22:53 PM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
praxisinc  
#4 Posted : Friday, April 29, 2005 12:46:00 AM(UTC)
praxisinc

Rank: Member

Groups: Member
Joined: 5/12/2004(UTC)
Posts: 49

Fedor,

Thank you for your response.

Would you mind posting a detailed sample please?

Thanks!
Fedor  
#5 Posted : Monday, May 2, 2005 1:30:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Would you mind posting a detailed sample please?

Sure, here is new screenshot:

UserPostedImage

And here is code of default.htm:

Code:
<html>
  <head>
    <title>Aurigma Image Uploader 3.x</title>
    <meta http-equiv="MSThemeCompatible" content="yes" >
    <link href="Style.css" type="text/css" rel="stylesheet">   
    <script>
var separator = "...\n\r";    
    
var maxFormatCount = 3;    
    
//Format class
function Format(name, paper, count){
	this.name = name;
	this.paper = paper;
	this.count = count;
}

//Parse description and return array of formats
function parseDescription(description){
	var formats=new Array();
	if (description!=""){		
		var arrDescription = description.split(separator);

		for (z = 0; z < arrDescription.length; z++){
			arrFormat = arrDescription[z].split(" ");
			formats.push(new Format(arrFormat[0], arrFormat[1], arrFormat[3]));					
		} 
	}	
	return formats;
}
    </script>
    <script for="ImageUploader" event="SelectionChange()">
var selectedItem = null;

var formats = new Array();

for (i = 0; i < maxFormatCount; i++){
	formats.push(new Format("", "", ""));
}

//run over items
for (i = 1; i <= ImageUploader.UploadItems.Count; i++){
	var uploadItem = ImageUploader.UploadItems.Item(i)
	if (uploadItem.Selected){				
		var currentFormats = parseDescription(uploadItem.Description);
		
		//check whether format, paper and count is the same for all selected items
		if (selectedItem == null){
			selectedItem = uploadItem;
			for (j=0; j < currentFormats.length; j++){
				formats[j] = currentFormats[j];
			}
		}
		else{
			selectedItem = "multiple"
			for (j = 0; j < currentFormats.length; j++){
				if (currentFormats[j].name != formats[j].name){
					formats[j].name = "";
				}
				if (currentFormats[j].paper != formats[j].paper){
					formats[j].paper = "";
				}
				if (currentFormats[j].count != formats[j].count){
					formats[j].count = "";
				}								
			}		

			for (j = currentFormats.length; j < maxFormatCount; j++){
				formats[j].name = "";
				formats[j].paper = "";
				formats[j].count = "";
			}			
		}
	}	
}

var disabled = selectedItem == null;

var aSelectFormat = new Array();
var aSelectPaper = new Array();
var aInputCount = new Array();

for (i = 1; i <= maxFormatCount; i++){
	aSelectFormat[i] = document.getElementById("SelectFormat" + i);
	aSelectFormat[i].disabled = disabled;
	aSelectPaper[i] = document.getElementById("SelectPaper" + i);
	aSelectPaper[i].disabled = disabled;
	aInputCount[i] = document.getElementById("InputCount" + i);
	aInputCount[i].disabled = disabled;
}

var ImgPreview = document.getElementById("ImgPreview");

if (selectedItem){
	for (i = 1; i <= maxFormatCount; i++){
		if (formats[i - 1].name == ""){
			aSelectFormat[i].selectedIndex = -1;
		}
		else{
			for (j = 0; j < aSelectFormat[i].options.length; j++){
				if (aSelectFormat[i].options[j].value == formats[i- 1].name){
					aSelectFormat[i].selectedIndex = j;
				}
			}				
		}

		if (formats[i - 1].paper == ""){
			aSelectPaper[i].selectedIndex = -1;
		}
		else{
			for (j = 0; j < aSelectPaper[i].options.length; j++){
				if (aSelectPaper[i].options[j].value == formats[i - 1].paper){
					aSelectPaper[i].selectedIndex = j;
				}
			}				
		}		

		aInputCount[i].value = formats[i - 1].count;
	}

	//show image preview
	if (typeof selectedItem == "object"){
		ImgPreview.style.display = "block";
		
		var thumbnailSize = 240;
		var thumbnailWidth = thumbnailSize; 
		var thumbnailHeight = selectedItem.Height * thumbnailWidth / selectedItem.Width;
		if (thumbnailHeight > thumbnailWidth){
			thumbnailHeight = thumbnailWidth;
			thumbnailWidth = selectedItem.Width * thumbnailHeight / selectedItem.Height;
		}

		ImgPreview.src = selectedItem.FileName;
		ImgPreview.width = thumbnailWidth;
		ImgPreview.height = thumbnailHeight;	
	}
	else{
		ImgPreview.style.display = "none";
	}
}
else{
	ImgPreview.style.display = "none";
}

	</script>    
	<script>
function itemChange(){
	var description = "";
	for (i = 1; i <= maxFormatCount; i++){
		var SelectFormatN = document.getElementById("SelectFormat" + i);
		var SelectPaperN = document.getElementById("SelectPaper" + i);
		var InputCountN = document.getElementById("InputCount" + i);
	
		if (SelectFormatN.selectedIndex != -1 && SelectPaperN.selectedIndex != -1 && InputCountN.value != "" && InputCountN.value != 0){
			var format = SelectFormatN.options[SelectFormatN.selectedIndex].value;
			var paper = SelectPaperN.options[SelectPaperN.selectedIndex].value;
			var count = InputCountN.value;				
		
			if (description != ""){
				description = description + separator;
			}
		
			description = description + format + " " + paper + " x " + count;
		}
	}
		
	if (description != ""){
		for (i=1;i<=ImageUploader.UploadItems.Count;i++){
			var uploadItem = ImageUploader.UploadItems.Item(i)
			if (uploadItem.Selected){
				uploadItem.Description = description;
			}
		}
	}	
}
	</script>
  </head>
  <body bgcolor="#C3DAF9">
    <table cellpadding="0" cellspacing="0" border="0" width="760">
      <tr>
        <td width="760" colspan="2">
          <table cellpadding="0" cellspacing="0" border="0">
            <tr>
              <td height="26" width="9"><img src="Images/ToolbarLeft.gif" height="26" width="9"></td>
              <td background="Images/ToolbarBackground.gif" height="26">
                <table cellspacing="0" border="0">
                  <tr>
                    <td id="SelectAll" class="btn" noselect
                      onmouseover="this.className='btnOver';" 
                      onmouseout="this.className='btn';"
                      onclick="ImageUploader.SelectAll();">
                      <img src="Images/SelectAllSmall.gif" width="16" height="16" class='icon'>SelectAll
                    </td>
                    <td id="DeslectAll" class="btn" 
                      onmouseover="this.className='btnOver';" 
                      onmouseout="this.className='btn';"
                      onclick="ImageUploader.DeselectAll();">
                      <img src="Images/DeselectAllSmall.gif" width="16" height="16" class='icon'>DeselectAll
                    </td>
                    <td id="Stop" class="btn" 
                      onmouseover="this.className='btnOver';" 
                      onmouseout="this.className='btn';"
                      onclick="ImageUploader.Stop();">
                      <img src="Images/StopSmall.gif" width="16" height="16" class='icon'>Stop
                    </td>
                    <td id="Send" class="btn" 
                      onmouseover="this.className='btnOver';" 
                      onmouseout="this.className='btn';"
		               onclick="ImageUploader.Send();">
                      <img src="Images/SendSmall.gif" width="16" height="16" class='icon'>Send
                    </td>
                    <td>
                      <img src="Images/ToolbarRight.gif" height="15" width="2" class='separator'>
                    </td>
                    <td id="Refresh" class="btn" 
                      onmouseover="this.className='btnOver';" 
                      onmouseout="this.className='btn';"
                      onclick="ImageUploader.Refresh();">
                      <img src="Images/RefreshSmall.gif" width="16" height="16" class='icon'>Refresh
                    </td>
                  </tr>
                </table>        
              </td>
              <td height="26" width="7"><img src="Images/ToolbarRight.gif" height="26" width="9"></td>
            </tr>
          </table>
        </td>
      </tr>      
      <tr>
        <td width="510">			
          <object type="application/x-oleobject" 
            classid="clsid:A18962F6-E6ED-40B1-97C9-1FB36F38BFA8" width="505" height="500" 
            CodeBase="../ImageUploader3.cab" id="ImageUploader" name="ImageUploader">
            <param name="Layout" value="ThreePanes">
            <param name="FolderView" value="Thumbnails">            
            <param name="UploadThumbnail1FitMode" value="fit">
            <param name="UploadThumbnail1Width" value="120">
            <param name="UploadThumbnail1Height" value="120">
            <param name="UploadThumbnail1JpegQuality" value="60">
            <param name="ShowButtons" value="False">            
            <param name="ShowDebugWindow" value="True">
            <param name="Action" value="Upload.aspx">
            <param name="RedirectUrl" value="PictureGallery.aspx">            
            <param name="MaxFileCount" value="10">
            <param name="MaxTotalFileSize" value="5242880">  
            <param name="Padding" value="0">
            <param name="TreePaneWidth" value="220">
            <param name="DescriptionsReadOnly" value="True">            
          </object>          
        </td>
        <td width="250" bgcolor="#DDECFE" valign="top">
          <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
              <td height="26" width="9"><img src="Images/ToolbarLeft.gif" height="26" width="9"></td>
              <td background="Images/ToolbarBackground.gif" height="26" width="100%" valign="middle">
                <span class="toolbarHeader">OrderDetails</span>                
              </td>
              <td height="26" width="7"><img src="Images/ToolbarRight.gif" height="26" width="9"></td>
            </tr>
          </table>          
          <div class="panel">     
            <table align="center" cellpadding="0" cellspacing="0" style="border-style:inset;border-width:1px">
				<tr>				
					<td align="center" valign="middle" bgcolor="#FFFFFF" width="240" height="240">
						<img id="ImgPreview" style="display:none" src="">		
					</td>
				</tr>
			</table>
			

            <table align="center">
				<tr>				
					<td>
						Format:
					</td>
					<td>						
					</td>
					<td>
						Paper:
					</td>
					<td>

					</td>										
					<td>
						Amount:
					</td>
				</tr>
				<tr>				
					<td>
						<select id="SelectFormat1" onchange="itemChange()" disabled>
							<option value="4x6&quot;">4x6&quot;</option>
							<option value="5x7&quot;">5x7&quot;</option>
							<option value="8x10&quot;">8x10&quot;</option>
							<option value="16x20&quot;">16x20&quot;</option>
							<option value="20x30&quot;">20x30&quot;</option>							
						</select>
					</td>
					<td>
						
					</td>
					<td>
						<select id="SelectPaper1" onchange="itemChange()" disabled>
							<option value="G">Glossy</option>
							<option value="M">Matt</option>
						</select>
					</td>
					<td>
						x
					</td>										
					<td>
						<input id="InputCount1" type="text" size="3" value="1" 
							onchange="itemChange()" onkeyup="itemChange()" onkeypress="return (event.keyCode>=48 && event.keyCode<=57);" disabled>
					</td>
				</tr>
				<tr>				
					<td>
						<select id="SelectFormat2" onchange="itemChange()" disabled NAME="Select1">
							<option value="4x6&quot;">4x6&quot;</option>
							<option value="5x7&quot;">5x7&quot;</option>
							<option value="8x10&quot;">8x10&quot;</option>
							<option value="16x20&quot;">16x20&quot;</option>
							<option value="20x30&quot;">20x30&quot;</option>							
						</select>
					</td>
					<td>
						
					</td>
					<td>
						<select id="SelectPaper2" onchange="itemChange()" disabled NAME="Select2">
							<option value="G">Glossy</option>
							<option value="M">Matt</option>
						</select>
					</td>
					<td>
						x
					</td>										
					<td>
						<input id="InputCount2" type="text" size="3" value="1" 
							onchange="itemChange()" onkeyup="itemChange()" onkeypress="return (event.keyCode>=48 && event.keyCode<=57);" disabled NAME="Text1">
					</td>
				</tr>
				<tr>				
					<td>
						<select id="SelectFormat3" onchange="itemChange()" disabled NAME="Select3">
							<option value="4x6&quot;">4x6&quot;</option>
							<option value="5x7&quot;">5x7&quot;</option>
							<option value="8x10&quot;">8x10&quot;</option>
							<option value="16x20&quot;">16x20&quot;</option>
							<option value="20x30&quot;">20x30&quot;</option>							
						</select>
					</td>
					<td>
						
					</td>
					<td>
						<select id="SelectPaper3" onchange="itemChange()" disabled NAME="Select4">
							<option value="G">Glossy</option>
							<option value="M">Matt</option>
						</select>
					</td>
					<td>
						x
					</td>										
					<td>
						<input id="InputCount3" type="text" size="3" value="1" 
							onchange="itemChange()" onkeyup="itemChange()" onkeypress="return (event.keyCode>=48 && event.keyCode<=57);" disabled NAME="Text2">
					</td>
				</tr>				
			</table>            
          </div>
        </td>
      </tr>
    </table>
  </body>
</html>


========================================================
02/14/2008, Fedor
This code sample is outdated. Please see Photo Order Sample for recent one.

========================================================

Edited by user Monday, December 21, 2009 2:37:15 AM(UTC)  | Reason: Not specified

Fedor attached the following image(s):
ImageUploader3_OrderingPhotoPrints2.png
Best regards,
Fedor Skvortsov
AndieR  
#6 Posted : Tuesday, July 19, 2005 8:46:00 PM(UTC)
AndieR

Rank: Member

Groups: Member
Joined: 7/19/2005(UTC)
Posts: 5

Hello,

Does the current version of the Java plugin support this feature now? It would really be great for one of our clients. If yes could you post a sample source file so that we could test it. If no, then please let us know if you plan implementing it soon?

Regards,
Andrea
AndieR  
#7 Posted : Tuesday, July 19, 2005 8:52:00 PM(UTC)
AndieR

Rank: Member

Groups: Member
Joined: 7/19/2005(UTC)
Posts: 5

Sorry for posting twice, I thought the first one hadn't worked!
Fedor  
#8 Posted : Wednesday, July 20, 2005 1:55:00 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Hello Andrea,

Java plugin support it neither in version 1.0 nor in upcoming version 1.1. I think it will be supported in version after 1.1, which will be available in the middle of Autumn.

If you need it urgently, please submit case.

Edited by user Friday, May 23, 2008 2:49:54 PM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
AndieR  
#9 Posted : Wednesday, July 20, 2005 6:11:00 AM(UTC)
AndieR

Rank: Member

Groups: Member
Joined: 7/19/2005(UTC)
Posts: 5

Hello,

Thanks for the reply. We can wait till Autumn I think, it's not a very urgent matter for our client. However as we'll be buying the current Java version, will we qualify for the upgrade comming in Autumn then, or will it require an extra fee perhaps?

Regards,
Andrea
Users browsing this topic
Guest
Similar Topics
Ordering photo prints sample (Image Uploader)
by marco 4/10/2006 2:37:25 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.