Jump to content
Sign in to follow this  
iiinetworks

[CONTRIBUTION] File uploads as an Option Feature

Recommended Posts

Just to clarify ( and I apologize for so many posts ) OSCMax forums say there is no Qtpro in ver 2.2

 

I have 2.2 so I'm back to start.

 

All I can figure now is there is a conflict with BTS?

 

Anyone have a clue for me?

 

I'm about ready to delete my store and go with vanilla package.

Share this post


Link to post
Share on other sites

Conflicts like this are a major part of why oscmax and other forks aren't supported in these forums. As you just found out, the differences can make things incompatible.

 

There certainly is a QTPro 2.2 as can be seen on the contribution page. But this isn't really the thread to find answers to questions relating to QTPro. This thread is for File Uploads as an Option Feature. The thread for QTPro is here.

 

I don't know that much about QTPro, but removing most contributions basicly requires reversing the changes made during installation. So you would take the step by step installation instructions and use them in reverse. (mileage will vary doing this with forks and heavily modded stores)

 

hth


Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Share this post


Link to post
Share on other sites

Would anyone be willing to help with the "click to view" link?

 

I've got the upload working fine, and the file name shows up nicely in the order, both on the customer and the admin side. Not a link to the file, just the filename as 3.flowers.jpg.

 

Unfortunately, I'm unable to get the "click to view" link to the filename either in the admin or the customer order, despite carefully applying the two contributions by Sudheer and Claus Christensen, as well as the subsequent 3-4 additional modifications mentioned in this thread.

 

If someone who has the "click to view" working would please post the relevant files, it would be greatly appreciated.

 

catalog/includes/application_top.php

catalog/includes/classes/order.php

shopping_cart.php

 

.. any others?

 

Thanks very much.

Share this post


Link to post
Share on other sites

I have a courious lil error after installing the file upload mod. This occures every time one clks the Products Attributes in the admin console.

 

PHP Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/httpd/vhosts/oliverai.com/subdomains/oscommerce2/httpdocs/catalog/admin/includes/functions/database.php:13)

 

Line 13 is as follows:

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {

global $$link;

 

I have made a search of the mods files and have yet to see any duplicate code, Has anyone else ran into a simular problem or have a clue where it may have all gone wrong?

 

Thx

 

hedge

Edited by hedge

Share this post


Link to post
Share on other sites

I am a total nitwit when it comes to php and mysql so....

 

When I try to run the insert_text_option_value query, I get the following error.

 

SQL execution error #1062. Response from database:

Duplicate entry "0-1" for key 1

 

Any help would be appreciated, I have no clue what I'm doing.

 

Thanks

Share this post


Link to post
Share on other sites

Further to my post above. I"m going to go on the assumption that I am getting that error msg because the first record in product_options_values_id is 0 1 TEXT.

 

BUT when I add a checkbox option to my store, it does not show a check box, it shows up as a drop down menu instead.

 

Any suggestions?

 

Thanks

Share this post


Link to post
Share on other sites

Hi guys,

 

Im completely new to all of this but OSC and this Contrib is the perfect solution for what i am looking for - i spent all day yesterday adding the extra files and changes etc, and so far have the following:

 

The Click to View working - took ages to get it to work! :)

The file upload process - had issues with a undefined thingy needed to delete the _ ???

The preview after upload works - but with problems, hence why im writing :)

 

Following my instructions apparently...
$products_name .= '<br>' . tep_image(DIR_WS_UPLOADS . $products[$i][$option]['products_options_values_name'], $products[$i][$option]['products_options_values_name'], 5, 5)  . '<br>';

I remember thinking that it would need DIR_WS_UPLOADS there, but apparently I forgot to actually write it that way.

 

Sorry,

Matt

 

I saw this post and got it to work however it doesnt appear to work if i want to use a percentage? As we have different sized images uploaded it would be better for us to say make the image display at 25% as opposed to a pixel size... if i enter a percentage i get a error? i think its something simple and just my inexperience that i dont know what it is????

 

 

 

The other thing is that with this preview it also shows the other attributes as broken images??? not sure where to even start on that one.

 

The other thing is ive tried putting the same code into the admin orders page so as you can preview a smaller version on there - but am doing something wrong again... anyone else managed this?

 

Thanks for your efforts despite a few minor issues this rocks! :)

Share this post


Link to post
Share on other sites

Hello,

 

I've a probleme with $number_of_uploads value. In product_info.php the value is > 0 but in application_top.php the value of $HTTP_POST_VARS['number_of_uploads'] is 0. I don't know where this value becomes 0. The same problem with $HTTP_GET_VARS['action'], it must has 'add_product' but in application_top, it's equal null. :(

 

If somebody can help me I will be very happy.

 

Thanks

 

Infoctet

Share this post


Link to post
Share on other sites

Please help

I read thru the entire thread and tried all the diffrent fixes listed for this problem but nothing works ....its got to be an easy fix

This is the only thing i added to my configure.php I added it at the last line right before ?>

 

define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/'); // upload directory

define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);

 

I have a folder /catalog/images/uploads I have chmod to 777 and it still gives me

 

Error: destination does not exist.

 

At

http://nfocusstudios.com/catalog/product_info.php cPath=25&products_id=54&action=add_product&osCsid=9d6d52052bcde77fe454e896fc41523c

Share this post


Link to post
Share on other sites
I have a folder /catalog/images/uploads I have chmod to 777 and it still gives me

 

Also this is a windows 2000 server not a unix server

Share this post


Link to post
Share on other sites

Has anyone gotten this file upload contribution to work with STS ?

 

I installed STS over a working store with products loaded, attributes etc.. and this file download for people to be able to upload their logo img file.

 

But now with STS - I don't get the browser window to pick a file:

 

http://3cgraphics.com/store/product_info.p...2&products_id=2

 

scroll all the way down - the layout obviosly isn't working either - but I'm not going to mess with that - if I can't get the download thing to work and have to revert to nonSTS anyway.

 

Thanks

 

DOnna :blink:

Share this post


Link to post
Share on other sites

Hello To All,

 

I noticed that this contribution is using Product Attributes - Option Type Feature v1.5 contribution. However, that contribution is now upto verion 1.71 with new features such as radio buttons, checkboxes and textareas.

 

Is there a way to integrate this upload feature with the 1.71 version of PA -Option Type Feature?

 

BTW, this is a terrific contribution in its' own right! :-)

 

Thanks,

Jess

Share this post


Link to post
Share on other sites
Please help

I read thru the entire thread and tried all the diffrent fixes listed for this problem but nothing works ....its got to be an easy fix

This is the only thing i added to my configure.php I added it at the last line right before ?>

 

define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/'); // upload directory

define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);

 

I have a folder /catalog/images/uploads I have chmod to 777 and it still gives me

 

Error: destination does not exist.

 

At

http://nfocusstudios.com/catalog/product_info.php cPath=25&products_id=54&action=add_product&osCsid=9d6d52052bcde77fe454e896fc41523c

 

 

I still have not got this contribution working ....any help would be greatly appreciated

Share this post


Link to post
Share on other sites
I still have not got this contribution working ....any help would be greatly appreciated

 

Hi w0lf00,

 

check out this post

http://forums.oscommerce.com/index.php?sho...47entry235047

 

There was an issue with a missing "s" at the end of "upload" in application_top.php

>>

In application_top.php I see $products_options_file->set_destination(DIR_FS_UPLOAD); ; but in configure.php I see define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);

>>

 

good luck,

uli

Share this post


Link to post
Share on other sites
Hi w0lf00,

 

check out this post

http://forums.oscommerce.com/index.php?sho...47entry235047

 

There was an issue with a missing "s" at the end of "upload" in application_top.php

>>

In application_top.php I see $products_options_file->set_destination(DIR_FS_UPLOAD); ; but in configure.php I see define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);

>>

 

good luck,

uli

 

Thanks Uli

I had read that, I reverified that mine does have the "s" and i re-uploaded that file to the server to be 100% sure. I still get the same error .....and i read in the release notes that the application_top.php was corrected in the last release.

 

Anyone else have any idea's I would really like this to work

Edited by w0lf00

Share this post


Link to post
Share on other sites

I hope someone can offer some insight to me.

 

I have the latest OS build. The only contribution I have loaded is the register globals fix v1.3a.

 

I'm on day 4 of reinstalling re-configuring and pulling my hair out. The File Upload contribution works great across the board... UNTIL I check out. I get as far as order conformation. When I click confirm, I go to checkout_process.php and get a blank screen.

 

This is pretty tricky to troubleshoot since there are no error messages and no source code getting to the browser. Has anyone run into a similar problem either directly with this contrib or in general with blank pages?

 

Thanks!

Share this post


Link to post
Share on other sites

the page wasn't displaying errors because of the php.ini setting display_errors was off.

Once I was able to see an error, I kicked myself for missing an uploaded file.

 

 

<snip>

I'm on day 4 of reinstalling re-configuring and pulling my hair out. The File Upload contribution works great across the board... UNTIL I check out. I get as far as order conformation. When I click confirm, I go to checkout_process.php and get a blank screen.

</snip>

Share this post


Link to post
Share on other sites
is there a way to integrate this upload feature with the 1.71 version of PA -Option Type Feature?

 

I tried but boy...what a mess. :blush:

 

Matt, would you please through me the towel here?

 

The problem is that I want to keep the textarea option, and you didn't provide that option on your module. And that issue had messed everything. The tables, the config, the product_info, and I don't know if any other.

 

I managed pretty well the merging of some files, but the product info one is huge for my knowledge (I need backup there). Also input on the config file, because I'm not sure if I had to add something more than the simple "textarea" line.

  define('PRODUCTS_OPTIONS_TYPE_SELECT', 0);
 define('PRODUCTS_OPTIONS_TYPE_TEXT', 1);
 define('PRODUCTS_OPTIONS_TYPE_RADIO', 2);
 define('PRODUCTS_OPTIONS_TYPE_CHECKBOX', 3);
 define('PRODUCTS_OPTIONS_TYPE_FILE', 4);
 define('PRODUCTS_OPTIONS_TYPE_TEXTAREA', 5);
 define('UPLOAD_PREFIX', 'upload_');
 define('TEXT_PREFIX', 'txt_');
 define('PRODUCTS_OPTIONS_VALUE_TEXT_ID', 0); //Must match id for user defined "Text" value in db table TABLE_PRODUCTS_OPTIONS_VALUES

 

A problem I had (and that what's frustrating me is that....on ADMIN after adding something for a "file upload" shows up on options as "text", and to add the option to the product the same issue, it shows ok on the product info (of course I haven't inserted the textarea part ~ I don't want to get to that adventure).

 

I've been stucked for 2 days on this single issue. :blink:

 

Please be gentle with me, this is my 1st post here. :rolleyes: (No big big words for programmers) :huh:

Share this post


Link to post
Share on other sites

When I use the radio buttons all of the buttons are selected and I do not know how to unselect so the customer can choose only 1. I just installed the contribution and have not done anything else to the site. Any ideas let me know , Im still really new at this.

Share this post


Link to post
Share on other sites

I am having problems with the filenames displaying on the invoice and in the shopping cart.

 

In the shopping cart and invoice and email, they appear like this:

 

 

1 x 1" Custom Badge - Your Design

- image TEXT

 

but in the order confirmation screen they appear like this:

 

1 x 1" Custom Badge - Your Design

- image: 37. 11I love suomi.jpg

 

Otherwise the feature work perfectly.

 

I need to be able to see the filename so I can figure out which file is for what order. I must have messed something up somewhere but don't know where to start. I have tried some things mentioned here but had no luck, i'm a real php newbie.

 

Can anyone please help? It would be greatly appreciated.

Share this post


Link to post
Share on other sites

Hi, I have a clean 2.2 install and after working out some errors w/ the sql files I get everything working to where I can upload a file. However when I go to up something I get the following:

 

Fatal error: Cannot re-assign $this in /home2/lotusgfx/public_html/includes/classes/upload.php on line 33

 

and the data from that file is:

// self destruct

$this = null;

 

Any suggestions? I'd love to get this working properly. I make custom vinyl graphics and this is exactly what I need - to have customers upload their image files that I need to work with.

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Hey, disregard last post. After doing some more searching I found that other contributions had the same problem. I simply commented out the $this=null and it works fine.

 

I can upload a file and I see the following:

A Bug's Life

- Name njgfjnf

- Image File 1. e57ce529.jpg

 

and it does show up in my /uploads dir so all is well.

 

Thanks for this contribution!

Share this post


Link to post
Share on other sites

Hi ,

I am recieving a Fatal Error when trying to upload an image (Fatal error: Cannot re-assign $this in /home/makeyour/public_html/osCommerce/catalog/includes/classes/upload.php on line 33) the code at that line was : $this = null; I also tried to change that line to(unset($this); but had the same results as commenting it. If I do not comment it out neither my admin panel or uploads works and with it commented out I can get the admin panel out. I have made not other changes to this file since I uploaded the contribution a few months ago and now have no clue how to fix it and was just getting ready to get the store live. Any help would be great.

 

Thank you ,

Jeremy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×