Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] File uploads as an Option Feature


Guest

Recommended Posts

  • Replies 482
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
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.

Link to comment
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??

Link to comment
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:

Link to comment
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:

Link to comment
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

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 3 weeks later...

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";

Link to comment
Share on other sites

  • 2 weeks later...
// 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.

Link to comment
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.

Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...