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

Notification

Icon
Error

4 Pages123>»
Options
Go to last post Go to first unread
andreym  
#1 Posted : Wednesday, November 4, 2009 5:46:41 PM(UTC)
andreym

Rank: Advanced Member

Groups: Member
Joined: 6/16/2009(UTC)
Posts: 134

Was thanked: 8 time(s) in 8 post(s)
Hello all!

In this post I want to describe how you can integrate Image Uploader into Virtuemart (a free, open source e-commerce solution based on joomla CMS). This post was inspired by this question: how to integrate aurigma with virtuemart.

Introduced sample application provides basic functionality:
  • a customer can easily upload photos and specify params like quantity & paper size;
  • uploaded photos are placed into customer's shopping cart, where he/she can finish order processing.
If you are looking for similar stand-alone sample - take a look at Aurigma Image Uploader Demos - Photo Order Demo.

Short description of how it works

After installation, application creates a new product named photo in the Virtuemart database. Each ordered photo will be presented as an instance of the photo product. All additional information, like image, size, paper type, number or prints, etc. will be stored as attibutes. Here is the list of used attributes:
  • *imagepath - path to the image to print
  • *Quantity - number of ordered prints
  • Size
  • Paper type
Marked with (*) are the attributes that are obligatory and used inside the application code. The rest were added for illustration and can be edited/removed without any consequences.


Here is a screenshot of customer's front-end page of the PhotoOrder application.

UserPostedImage

It contains an embedded Image Uploader control and additional fields which automatically reflect all attributes from the photo product.

After user uploads images, the uploaded images appear in his shopping cart.

UserPostedImage


How to install PhotoOrder sample

I assume you have installed joomla and virtuemart already and have administrative access to it. If so, you need to take only a few steps to complete:

  1. Download the photoorder component attached to this post. Go to the Extension Manager and install this component. It should appear in the components list.
    UserPostedImage
  2. Go to Product List in Virtuemart Administration and find photo product (SKU == photo). Click on it to edit and specify product's price.
  3. Next step is to add a link to the page which will be seen by customers. Go to the Menu Manager and add a new menu item into the main menu. Set the menu item type to photoorder, title to Upload Photos, parent item is Top.
    UserPostedImage
Thats all! Now we are ready to receive photo orders. Open the virtuemart front-end and click on the 'Upload Photos' link in the main menu. Add some images to upload and specify order details. For every image that you select for upload, you can see the order details under the filename. Then click Send button and wait until all images have been uploaded. Now you can go to the cart and make sure the uploaded images are now in the cart.

That's all, hope this was helpful. If you have any thoughts about it - feel free to post them there.

P.S.
We made a small customization of previous photoorder version. The difference is that one creates three products (photo, poster and shildersdoek) in the photo category. Also there are two views has been added. One for ordering particular product and another - photo products list. Download photoorder2.zip to get it.


Best regards,
Andrew Mironov

Edited by user Monday, May 31, 2010 11:02:40 PM(UTC)  | Reason: Not specified

File Attachment(s):
photoorder.zip (2,047kb) downloaded 448 time(s).
photoorder2.zip (2,049kb) downloaded 650 time(s).
andreym attached the following image(s):
cart.png
components_list.png
menu_item.png
upload_photos.png
thanks 1 user thanked andreym for this useful post.
diegocharles on 11/2/2011(UTC)
dsart  
#2 Posted : Thursday, November 19, 2009 1:15:07 AM(UTC)
dsart

Rank: Newbie

Groups: Member
Joined: 11/13/2009(UTC)
Posts: 9

Great work,
i have just a question, i like to sell three different products with the photoupload:
1. photo order (that i now have and worked ok)
2. canvas order
3. poster order

Is there a way to do this, customizing a script?

thanks

Davy
Dmitry  
#3 Posted : Friday, November 20, 2009 12:40:44 AM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello Davy,

You can customize this script, it is available in source code and attached to this thread.

Could you describe in detail what functionality you need in canvas order and poster order? What are differences between current implementation of photo order and these new orders?

Edited by user Friday, November 20, 2009 12:43:44 AM(UTC)  | Reason: Not specified

Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
dsart  
#4 Posted : Friday, November 20, 2009 1:12:45 AM(UTC)
dsart

Rank: Newbie

Groups: Member
Joined: 11/13/2009(UTC)
Posts: 9

Thanks, Do you know wich file a have to customize?

the different is just a another product, with other prices and formats,

i thought something like this:

in the virtuemart shop create a category "ordering photos" with three products
when the customer clicks on the product (photo, canvas, poster) they get the image uploader with the
order details of that product with the attributes.

Or a second solution: in the imageuploader creating the three different products.
now you just see one line of order details.

If you had another idea, please let me know.
Dmitry  
#5 Posted : Tuesday, November 24, 2009 3:23:30 AM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

If products attributes will be the same you can try the following.

PhotoOrder adds a product to VirtueMart in the installation script: /photoorder/install.photoorder.php. If you would like to add addtional product you can do it there. Order items (photo prints) are added to the cart in the addToCart method (/photoorder/site/models/photoorder.php). This way you can modify this method to add currently selected product to a cart.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
dsart  
#6 Posted : Sunday, November 29, 2009 2:29:53 AM(UTC)
dsart

Rank: Newbie

Groups: Member
Joined: 11/13/2009(UTC)
Posts: 9

Hi, I have change the scripts, in the install.photoorder.php i have added three new prducts in the same category, seems to work, after install i had a category photo with the three products,.
But i think i have doing something wrong in the models/photoorder.php. because when i use the upload button i get a error 500,
this is what i have changed:

function getAttributes() {
$query = 'SELECT product_id, attribute, custom_attribute FROM #__{vm}_product WHERE product_id='.PHOTOORDER_PHOTO_ID,.PHOTOORDER_POSTER_ID, .PHOTOORDER_SCHILDERSDOEK_ID; $db = new ps_DB();
$db->query($query);
.......

// add photos into the cart
$k = $_SESSION['cart']["idx"];
$_SESSION['cart'][$k]["quantity"] = $quantity;
$_SESSION['cart'][$k]["product_id"] = PHOTOORDER_PHOTO_ID;
$_SESSION['cart'][$k]["product_id"] = PHOTOORDER_POSTER_ID;
$_SESSION['cart'][$k]["product_id"] = PHOTOORDER_SCHILDERSDOEK_ID;
$_SESSION['cart'][$k]["parent_id"] = PHOTOORDER_PHOTO_ID;
$_SESSION['cart'][$k]["category_id"] = 0;
// added for the advanced attribute modification
$_SESSION['cart'][$k]["description"] = $description;
$_SESSION['cart']["idx"]++;
}


Some idea, What i have done wrong?

Dmitry  
#7 Posted : Sunday, November 29, 2009 12:50:26 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

Unfortunately it is hard to say something not seeing full script. Could you give me modified plugin? You can attach it here to this forum thread or send it via support case.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
dsart  
#8 Posted : Sunday, November 29, 2009 3:41:53 PM(UTC)
dsart

Rank: Newbie

Groups: Member
Joined: 11/13/2009(UTC)
Posts: 9

files are uploaded in support case,

thanks for viewing
Dmitry  
#9 Posted : Monday, November 30, 2009 3:01:49 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
dsart wrote:
files are uploaded in support case,

thanks for viewing

Thanks, got it. I passed your version to our developer. He is working on it. As soon as it is ready, I will give you the updated version.

Edited by user Monday, November 30, 2009 5:47:23 PM(UTC)  | Reason: Not specified

Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Dmitry  
#10 Posted : Monday, November 30, 2009 5:46:34 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
dsart wrote:
files are uploaded in support case,

thanks for viewing

Find updated script in your case. Please, let me know if you have some questions.

Edited by user Monday, November 30, 2009 5:49:17 PM(UTC)  | Reason: Not specified

Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
dsart  
#11 Posted : Monday, November 30, 2009 9:17:52 PM(UTC)
dsart

Rank: Newbie

Groups: Member
Joined: 11/13/2009(UTC)
Posts: 9

thanks,
but i get a error by installing it:
There was an error uploading this file to the server.

any idea?
dsart  
#12 Posted : Monday, November 30, 2009 9:33:42 PM(UTC)
dsart

Rank: Newbie

Groups: Member
Joined: 11/13/2009(UTC)
Posts: 9

it's ok,

i have unzip the package and install it from the directory

great, that's what we needed.

thanks,

dsart  
#13 Posted : Thursday, December 17, 2009 9:40:15 PM(UTC)
dsart

Rank: Newbie

Groups: Member
Joined: 11/13/2009(UTC)
Posts: 9

I run in another problem,

The upload of the total file size is maximum about 8MB (sometimes i got a error on 7MB somes on 12MB), the error is image uploader encountered ..... (on small size everything works fine also from localhost i got no problem)

Now i setup the basic demo out Joomla and they upload much faster and without any limitation of file size.
So i conclude that the server settings are ok and there is something wrong with the script, joomla or virtuemart, Any idea what's block the upload?
Also the estimate time in the pop_up is'nt correct by joomla on the demo is it ok

looking forward
andreym  
#14 Posted : Monday, December 21, 2009 1:48:02 PM(UTC)
andreym

Rank: Advanced Member

Groups: Member
Joined: 6/16/2009(UTC)
Posts: 134

Was thanked: 8 time(s) in 8 post(s)
The most common cause with the upload of large files is the constraints in the php.ini settings. Can you, plese, provide the output of the phpinfo function?
Code:

<?php
   phpinfo();
?>


Also you may echo time() function in some places in the script (the save files functionality is in the addCart function) and check where most time spend.
dsart  
#15 Posted : Thursday, January 7, 2010 6:14:05 PM(UTC)
dsart

Rank: Newbie

Groups: Member
Joined: 11/13/2009(UTC)
Posts: 9

i'm sorry for the late reaction thanks for the response,
we have resolved the problem, it was the time settings in PHP.ini.

Our shop is online now, and we are "fine tuning" something. but one thing i can't get resolved : after the files are uploaded i must first renew the page or go to somewhere else on the site before the shopping cart(on the main page) shows the ordered products.
some idea? maybe with a redirect after upload? (on wich file i must put it in)

thanks

andreym  
#16 Posted : Sunday, January 10, 2010 11:10:42 PM(UTC)
andreym

Rank: Advanced Member

Groups: Member
Joined: 6/16/2009(UTC)
Posts: 134

Was thanked: 8 time(s) in 8 post(s)
Hello!

You can redirect user to the cart or other page or refresh current page.

If you want to redirect to the shopping cart page after upload, open components/com_photoorder/views/order/tmpl/default.php file and insert iu.addParam("RedirectUrl", "<?php print JURI::base().'index.php?page=shop.cart&option=com_virtuemart'; ?>"); line after the line 118 ( iu.addParam("Action", "<?php print $options['action']; ?>"); ).

If you want to refresh page after upload, open components/com_photoorder/views/order/tmpl/default.php file and insert iu.addParam("RedirectUrl", "<?php print $_SERVER['REQUEST_URI']; ?>"); line after the line 118 ( iu.addParam("Action", "<?php print $options['action']; ?>"); ).

The redirect to the other page can be done the same way, just set the appropriate url for the RedirectUrl parameter.

The documentation for RedirectUrl parameter can be found here.

Edited by user Sunday, January 10, 2010 11:13:33 PM(UTC)  | Reason: Not specified

smartuk  
#17 Posted : Thursday, January 14, 2010 6:54:37 AM(UTC)
smartuk

Rank: Newbie

Groups: Member
Joined: 1/14/2010(UTC)
Posts: 3

How much and how to I purchase a single l license for this component?
Dmitry  
#18 Posted : Thursday, January 14, 2010 10:28:13 AM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
smartuk wrote:
How much and how to I purchase a single l license for this component?


Hello,

Please, contact our sales team at sales@aurigma.com, they will assist you.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
smartuk  
#19 Posted : Thursday, January 14, 2010 6:37:22 PM(UTC)
smartuk

Rank: Newbie

Groups: Member
Joined: 1/14/2010(UTC)
Posts: 3

I did email them and got this back...

This is the mail system at host mailstore35.mailforbusiness.com.

I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

The mail system

<incoming-forward@aurigma.com>: mail forwarding loop for
incoming-forward@aurigma.com
Dmitry  
#20 Posted : Sunday, January 17, 2010 8:56:06 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

Sorry about this.

I got email from our provider that they did some maintainance of hardware. Maybe it caused the issue. Please, try again. If no luck, post a case with your question.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
4 Pages123>»
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.