Author Topic: VirtueUpload 1.0.0 - upload component for VM  (Read 217808 times)

julian

  • Beginner
  • *
  • Posts: 33
Re: VirtueUpload 1.0.0 - template modifications
« Reply #60 on: March 22, 2006, 21:35:46 pm »
Hi

Do you know where I can modify the template so I can change the field descriptions?

Thank you

Julian

eaxs

  • Guest
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #61 on: March 22, 2006, 21:47:32 pm »
Hi Julian,
The templates are in:
my_site/components/com_virtueupload/templates/

If you want to change a text, you should take a look at the language-file in:
my_site/administrator/components/com_virtueupload/language/

Just open your active language file and change the desired text.


Greets,
eaxs

julian

  • Beginner
  • *
  • Posts: 33
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #62 on: March 22, 2006, 22:00:07 pm »
ACE! ;D ;D

white_rajah

  • Beginner
  • *
  • Posts: 18
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #63 on: March 28, 2006, 00:38:13 am »
This is a great component.  Cheers to Tobias and to everyone else who was involved in its development.

I wonder if there's any way to have the upload form displayed as part of the "Thank you for your order" page?  I've tried pasting the hacks from the component into the checkout.thankyou.php file with little success so far.  I'm a relative novice in PHP so I may be missing something obvious relating to the syntax or position of the hacks.  Any pointers would be greatly appreciated!

PS I notice that in the e-mail notifications, the upload directory is given as CFG_VMUPL_UPLOADROOT rather than the filepath.  I presume that it's ok to password-protect this directory using .htaccess, by the way?

eaxs

  • Guest
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #64 on: March 28, 2006, 01:20:34 am »
Hiho!
Thanks for your compliment  :)
Ok course there´s a way to display the form in "checkout.thankyou.php"

Just open this file and insert the snippet under :
Quote
/** END printing out HTML Form code (Payment Extra Info) **/
Snippet:
Code: [Select]
if (file_exists ($mosConfig_absolute_path. "/components/com_virtueupload/virtueupload.php")) {
  require_once ($mosConfig_absolute_path. "/components/com_virtueupload/virtueupload.php"); 
  $vu = new html_virtueupload; echo $vu->show_form();
}

Now, we included virtueupload..but it will show give you errors etc. So we have to change more things.

Open
Quote
components/com_virtueupload/virtueupload.php
and search for the function "getPath()". There, you should add this:

Code: [Select]
if ( $page == 'checkout.thankyou' ) {
    $curr_path = "index.php";
  }

Now we told virtueupload where to redirect. The last step is it, to tell virtueupload, which layout it shoud use.

Search in the same file for the function "getTemplate". Then add:

Code: [Select]
if ($page == 'checkout.thankyou') {
    $template = "account.vu";
  }

I know, it´s not the best way to handle it..but at least it works...

About that "CFG_VMUPL_UPLOADROOT":
Thats just a simple constant. The value is, as you said, the file-path.  :)

Greets, Tobias


white_rajah

  • Beginner
  • *
  • Posts: 18
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #65 on: March 28, 2006, 02:14:18 am »
Hey Tobias - wow, fast response!  I just tried out your instructions, and I think I followed them correctly, but it didn't seem to work.  I know it's difficult without looking at my installation, but do you have any suggestions as to what I might look at to get it working?  So far I have the component working well in a stand-alone manner, but that's it.  I'm getting nothing diffent on the thank you page, not even errors.

By the way, what I meant about that variable in the e-mail notifications is that it looks as though you intended the program to substitute the real filepath for the variable name (as you can't click on the link to get to the file as things stand now).

eaxs

  • Guest
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #66 on: March 28, 2006, 09:36:51 am »
hmm so the path in the email looks like this:
mysite.com/CFG_VMUPL_UPLOADROOT/x/y/file.name?

To fix it, you can manually insert the real path in "virtueupload.php" in the function "log_upload()"
I´ve noticed a few bugs in the current version...I´ll fix them when I have the time  :)

Maybe you can place the snippet for the thankyou-page somewhere else...it might depend on your VirtueMart Version. - I tested it with 1.0.4 and it worked well.
Also make sure it´s
Quote
echo $vu->show_form();
and not
Quote
$vu->show_form();

Please let me know if it finally worked  :)


white_rajah

  • Beginner
  • *
  • Posts: 18
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #67 on: March 28, 2006, 15:21:04 pm »
Well, I did as you suggested, and tried putting the code elsewhere on the Thankyou page.  It works for me if put first on the page, which is a good solution for the time being.  I'm also using Virtuemart 1.0.4.  Many thanks!

And yes, that's how the URL is displaying in my e-mails.  No big deal.

Here's another question for you: supposing I want to turn off the .jpg image that displays with VirtueUpload (to avoid problems with mixing secure and insecure data), what's the best way to do this?

eaxs

  • Guest
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #68 on: March 28, 2006, 15:37:49 pm »
no problem!
So you use your site in SSL mode, and the uploaded files seem to be insecure?
Hmm I have absolutely no experience with SSL...cant help you on that, sorry.

Greets,
Tobias

white_rajah

  • Beginner
  • *
  • Posts: 18
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #69 on: March 28, 2006, 15:50:03 pm »
Hi Tobias - actually, I think the error is generated by the upload.png image, which is why I'd like to try turning it off.  Thanks!

eaxs

  • Guest
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #70 on: March 28, 2006, 18:47:54 pm »
Hi again!
Maybe the problem is that the path to the image is "http" and not "https" ?

You can change the file-path in
Quote
components/com_virtueupload/virtueupload.html.php
Search in the first function "show_form ()" for
Quote
$image       = "<img src=\"".$mosConfig_live_site."/components/...
change the path to:
Quote
$image       = "<img src=\"https://mysite.com/components/...
But I´m not sure that this helps...at least you can check it out. If it doesnt work, simply reduce the line to:
Quote
$image       = ""
- The image will not be loaded then.

greets, Tobias

white_rajah

  • Beginner
  • *
  • Posts: 18
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #71 on: March 28, 2006, 21:06:22 pm »
Hi Tobias - thanks, once I turned off the image the error message disappeared.

Thanks also for the fix on the mail link.  By the way, I noticed while I was testing this that the order number isn't being passed through (appears as 0).

Keep up the great work - this is a very useful component!

eaxs

  • Guest
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #72 on: March 28, 2006, 23:47:45 pm »
Hehe no problem :)
The order-id will only be set when uploading through the customer-account. (A dropdow-list with the orders appears)
Althought the order id remains 0, you can turn on "auto-retrieve" in the configuration. So you know the user at least.


insites

  • Beginner
  • *
  • Posts: 1
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #73 on: March 30, 2006, 16:21:52 pm »
Hi everybody...
I'm currently busy to add a webshop to my firm's site, and after spending many painful hours hacking oscommerce I finally found VirtueMart.. and immediately put osc into my "dead projects" folder!

Now I'm working on implementation of   VirtueUpload and wonder if it was possible to let VU react on Product attributes in future versions?



What I think of is the following situation:
We want to sell print/plot articles to our customers, and while doing this in our physical shop is REALLY easy  ;)
(just show a template, or ask for brought files) .
Now it's easy to add an attribute "design" to an article, with a select box to let customers if it should be based on a template or their own design.


Wouldn't it be a good option to let VU show an upload form in product details depending on such an attribute, and then just fill a text attribute with the path to uploaded file?
This would make it easier to control orders that MUST have an upload attached, also I wouldn't have to have the same basic product in several Categories(the solution I just tried to seperate uploaded business cards from 'normal' ones).

I will try out myself to find out how complicated this may be, but as I'm relatively new to Joomla I would love to get some feedback on this idea, maybe someone of you has tried something like that already and can give me tips?

aka007ii

  • Beginner
  • *
  • Posts: 10
Re: VirtueUpload 1.0.0 - upload component for VM
« Reply #74 on: May 25, 2006, 08:09:16 am »
This is awsome and just what I needed! Thanks,

I am now wondering how to keep shoppers that purchase products not requiring file uploads from uploading files. I have created a new shopper group and set VU to only allow uploads from that group. But how in the... do I assign shoppers to groups other than the -default- ? I know how to do it manually when editing each user.

If I could just assign a product or category to a specific group then I'd be very happy but I don't see a way to do it. I know I could set up another payment method but that would be confusing and shoppers could click the wrong one.

~ Craig