Jump to content
Sign in to follow this  
iiinetworks

[CONTRIBUTION] File uploads as an Option Feature

Recommended Posts

Is this an error or an feature, i don`t know !(?)
It is a feature. The original contribution did not maintain all the links. At some point in the future, I might hide the text values, but it does not affect store operation at all.

 

Hth,

Matt


Always back up before making changes.

Share this post


Link to post
Share on other sites

Thanks Matt


Captain: I thought you were going to upgrade this.

Trip: That is the upgrade.

Well, if you want, I can change the color.

Share this post


Link to post
Share on other sites

Hello,

 

anyone an idea to add an additional Product_Attribute,

thereby the customer an article (e.g. a metal plate) in the desired size order can?

 

In the Product_info should 4 fields be.

2 input fields for length and width and

2 output fields for square meters and "calculated price".

Square meters must then by the Productprice (Price for 1 square meter) be multiplied to get the "calculated price".

 

Sorry for my not so good English

 

Patrick


Captain: I thought you were going to upgrade this.

Trip: That is the upgrade.

Well, if you want, I can change the color.

Share this post


Link to post
Share on other sites

It appears that the upload mode is working on my site. When I add an Upload to the cart it acts as if its uploading the image. The image name is displayed in the shopping cart. User can then checkout ok. HOWEVER there is no image in the upload folder. I am not getting any errors during upload. I have been stuck at this point for three days and I just cannot figure it out.

 

this is my config settings... Upload directory is in the images folder and is cmod 777 and named uploads.

 

// CLR 020605 defines needed for Product Option Type feature.

define('PRODUCTS_OPTIONS_TYPE_SELECT', 0);

define('PRODUCTS_OPTIONS_TYPE_TEXT', 1);

define('PRODUCTS_OPTIONS_TYPE_RADIO', 2);

define('PRODUCTS_OPTIONS_TYPE_CHECKBOX', 3);

// iii 030813 added: File Uploading: FILE type and UPLOAD_PREFIX

define('PRODUCTS_OPTIONS_TYPE_FILE', 4);

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

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

define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);

 

Got any ideas where my problem might be??


:)

Share this post


Link to post
Share on other sites

Hey guys, This works fine when I give products additional attributes,

 

However, I get an error message when adding a product to the basket that does not have any additional attributes.

 

The error given on shopping_cart.php is:

 

Warning: Variable passed to each() is not an array or object in /catalog/shopping_cart.php on line 65

Warning: reset(): Passed variable is not an array or object in /catalog/includes/modules/order_details.php on line 83

Warning: Variable passed to each() is not an array or object in /catalog/includes/modules/order_details.php on line 84

 

Anyone able to help? :unsure:

Share this post


Link to post
Share on other sites

Just a quik follow up to my previous post. I now have everything functioning properly. In my config file my images directory was pointing to the wrong path so the images were uploading the whole time but into a different directory.

 

IE...

newstore/images/uplaods

instead of ...

Images/uploads :huh:


:)

Share this post


Link to post
Share on other sites

Hi all,

 

I seem to have everything installed properly, both catalog and admin, but I am getting this error when trying to add an item to the cart:

 

Fatal error: Call to a member function on a non-object in C:\Apache\htdocs\xxx\catalog\includes\classes\upload.php on line 118

 

I followed the instructions in a past post to move the Message Stack lines in application_top.php to before the cart actions, but then I get this error on every page:

 

Fatal error: Class messagestack: Cannot inherit from undefined class tableboxmessagestack in C:\Apache\htdocs\xxx\catalog\includes\classes\message_stack.php on line 20

 

I am using the CRE Loaded 6 version of OSC, and it has a template system built in which might be causing the problem because I noticed it modified the message_stack.php file.

 

I also have the Price Breaks mod installed, although it still works but could be a culprit?

 

If anyone has any suggestions I would really appreciate it... I'm behind schedule on this project and could use the help.

 

Thanks,

 

Dan

Share this post


Link to post
Share on other sites

I finally got over the destination does not exist error by way of reading the posts. Thanks to everyones contribution especially Matt's.

I need help with the following:

When I hit add to shopping cart get this error -

 

1146 - Table 'graphix_osc1.TABLE_FILES_UPLOADED' doesn't exist

 

insert into TABLE_FILES_UPLOADED (sesskey, files_uploaded_name) values('d0ce3359894b1cff2aaca9c821c674e8', 'clock8.jpg')

 

[TEP STOP]

 

 

Any one now what the problem is? That table does exist, however it is called files_uploaded by default. Is that correct? What should I look for?

 

Thanks in advance,

Dave

Share this post


Link to post
Share on other sites

If anyone can solve this then I'll treat them :)

 

When I add a product to the basket that does not have any additional fields (colour, size, text, etc). I get the following error:

 

Warning: reset(): Passed variable is not an array or object in /catalog/includes/modules/order_details.php on line 83

 

Warning: Variable passed to each() is not an array or object in /catalog/includes/modules/order_details.php on line 84

 

However it works when a product is given extra fields.

 

From /catalog/includes/modules/order_details.php

 

// Product options names
   $attributes_exist = ((isset($products[$i]['attributes'])) ? 1 : 0);

   if ($attributes_exist == 1) {
     reset($products[$i]['attributes']);
     while (list($option, $value) = each($products[$i]['attributes'])) {
       echo '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
     }
   }

   echo '</td>' . "\n";

Share this post


Link to post
Share on other sites
// Product options names
   $attributes_exist = ((isset($products[$i]['attributes'])) ? 1 : 0);

I would try changing the second line to
    $attributes_exist = ((isset($products[$i]['attributes']) && (count($products[$i]['attributes']) > 0) ? 1 : 0);

Hth,

Matt


Always back up before making changes.

Share this post


Link to post
Share on other sites
1146 - Table 'graphix_osc1.TABLE_FILES_UPLOADED' doesn't exist
You are missing
define('TABLE_FILES_UPLOADED', 'files_uploaded');

from includes/database_tables.php.

 

Hint: in osC, whenever you see ALL_CAPS_AND_UNDERSCORES, it means that you are missing a define somewhere. Language files are more typical but includes/database_tables.php and includes/filenames.php are also possible (missing entries in the configuration table could also cause this).

 

Hth,

Matt


Always back up before making changes.

Share this post


Link to post
Share on other sites
Fatal error: Class messagestack: Cannot inherit from undefined class tableboxmessagestack in C:\Apache\htdocs\xxx\catalog\includes\classes\message_stack.php on line 20

You have to move the code relating to class TableBoxMessageStack above that declaring MessageStack. Note: this may generate a new error which you can fix the same way (by moving the code defining that code above the code that you just moved). Repeat until it stops giving errors.

 

Hth,

Matt

 

P.S. Backup first! I haven't actually tried to install this on a BTS store.


Always back up before making changes.

Share this post


Link to post
Share on other sites

Has anyone been able to apply this to provide multiple uploads? And secondly, is there a way to have by each upload a dropdown select box as outlined in the tools?

Share this post


Link to post
Share on other sites

ok not only the above

 

 

but now this is happening..

 

- Upload: TEXT (+$1.00) is says TEXT and not the file name? any ideas?

 

oh and in my email....this is how it looks:

 

Products

------------------------------------------------------

1 x A Bug's Life (DVD-ABUG) = $36.99

Upload 5. uploading.gif

Upload TEXT

 

 

 

:-/ would appericate help. Thanks

Edited by memorylaneplates

Share this post


Link to post
Share on other sites
Has anyone been able to apply this to provide multiple uploads?  And secondly, is there a way to have by each upload a dropdown select box as outlined in the tools?

Multiple uploads should work as is. Just make multiple FILE attributes.

 

Hth,

Matt


Always back up before making changes.

Share this post


Link to post
Share on other sites
- Upload: TEXT (+$1.00)    is says TEXT and not the file name?  any ideas?

This kind of issue is generally caused by not having the TEXT attribute set up properly or missing some of the file changes.

 

Hth,

Matt


Always back up before making changes.

Share this post


Link to post
Share on other sites

Just double checked my checkout_process....had an extra attribute line, thanks that worked for my emails :-D

 

Still having problems with my admin area, and I can't get the link to show (click here to view) thanks for the help

Share this post


Link to post
Share on other sites
Hey guys got this to work!!! YEAH!!!

 

ok on the enhancement part...for the admin to click a view here linnk...its not working at all....can anyone help?

 

Thanks

 

I have had the same problem. Set it up as provided and the "click to view" link does not appear. Any help on this one would be much appreciated.

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  

×