Site maintenance: Tuesday 17 Nov, from 10:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / All Other Contributions/Addons / Product Attribute Grid

Product Attribute Grid

Started by absolute on 15 Jan 2008, 5:01 PM · Views: 139,578

Results 141 to 160 of 546
5 Sep 2009, 10:10 AM
#141
urbanfoodie avatar

urbanfoodie

New Zenner

Join Date:
Aug 2009
Posts:
6
Plugin Contributions:
0

Product Attribute Grid

urbanfoodie:

Hi,

I've read through this thread but I'm afraid I still need a bit of help.

I have installed this module but can't seem to make it do what I need (my fault I'm sure as I'm still learning Zen Cart).

I have a product, ice cream which has three flavours (chocolate, vanilla, strawberry). I'd like customers to be able to select say 2 pots chocolate, 1 vanilla.

This is where I am currently (module installed)

This is where I'd like to be:

Can anyone help me with:

A aligning the flavour/quantity boxes vertically?

B getting rid of the quantity box above the add to basket?

Detailed explanations would be good, as I say I'm new.

Thanks very much

Can anyone help with this?

6 Sep 2009, 1:13 AM
#142
printchic avatar

printchic

New Zenner

Join Date:
May 2009
Posts:
66
Plugin Contributions:
0

Re: Product Attribute Grid

Absolute:

printchic - when we first created this module, it only worked with 2 fields, which had to be select boxes, or radio fields. The new release now has it's own attribute type, which is the grid, and this allows you to use the module with additional attributes, for example a text field, which is then applied to all products added to the cart from within the grid.

During this update, we did not test with the file upload feature, as it wasn't a requirement for the sponsoring client. It appears that this type of attribute is currently being uploaded as an additional text field, rather than the required file type.

Absolute

Thanks for the explanation Abosolute

Signed,
Printchic

6 Sep 2009, 2:11 AM
#143
printchic avatar

printchic

New Zenner

Join Date:
May 2009
Posts:
66
Plugin Contributions:
0

Re: Product Attribute Grid

Hi,

First i want to say thanks for this wonderful addon.

If i use the product attribute grid feature on a product can i also use a "stand-alone" text box to allow input of comments, instructions, etc.

Seems that i can't get any options marked as "text" to show up on the Attribute Controller area for me to select.

I have an option called "comments" and it set to "text" but... when i get to the attribute's controller page "it's not there to be added to a product".

Doesn't matter what i add if it is a text box it doesn't show up.

So that is why i am asking with the grid attributed can i have separate "text" options not associated with qty grid i have setup?

Hope this make sense. I've attached a screen shot to show what i am trying to accomplish

Signed,
Printchic

6 Sep 2009, 2:19 AM
#144
printchic avatar

printchic

New Zenner

Join Date:
May 2009
Posts:
66
Plugin Contributions:
0

Re: Product Attribute Grid

Forgot to mention;

Store version: 1.3.8a
Other Script Installed: Imprinted Attribute Controller

printchic:

Hi,

First i want to say thanks for this wonderful addon.

If i use the product attribute grid feature on a product can i also use a "stand-alone" text box to allow input of comments, instructions, etc.

Seems that i can't get any options marked as "text" to show up on the Attribute Controller area for me to select.

I have an option called "comments" and it set to "text" but... when i get to the attribute's controller page "it's not there to be added to a product".

Doesn't matter what i add if it is a text box it doesn't show up.

So that is why i am asking with the grid attributed can i have separate "text" options not associated with qty grid i have setup?

Hope this make sense. I've attached a screen shot to show what i am trying to accomplish

Signed,
Printchic

6 Sep 2009, 2:29 AM
#145
printchic avatar

printchic

New Zenner

Join Date:
May 2009
Posts:
66
Plugin Contributions:
0

Re: Product Attribute Grid

printchic:

Hi,

First i want to say thanks for this wonderful addon.

If i use the product attribute grid feature on a product can i also use a "stand-alone" text box to allow input of comments, instructions, etc.

Seems that i can't get any options marked as "text" to show up on the Attribute Controller area for me to select.

I have an option called "comments" and it set to "text" but... when i get to the attribute's controller page "it's not there to be added to a product".

Doesn't matter what i add if it is a text box it doesn't show up.

So that is why i am asking with the grid attributed can i have separate "text" options not associated with qty grid i have setup?

Hope this make sense. I've attached a screen shot to show what i am trying to accomplish

Signed,
Printchic

Nevermind, i fixed it. Found some code on board to add the "text" option code back into the database. It misteriously disappeared.

12 Sep 2009, 5:46 AM
#146
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Product Attribute Grid

So after a bonehead start I FINALLY got my grid to display.. (Reading really is fundamental!:laugh:)

I am sooooooo loving that this mod has been setup to work SPECIFICALLY with Stock By Attributes.. Whoo hoo!!! I think this will work perfectly for the client I want to use this with..

Only ONE tiny issue..:wacko:

When I add an available combo to the cart, it doesn't add the item to the cart, and flashes up the "Your Cart Is Empty" message.. I double checked EVERYTHING.. I did a Winmerge of the "tpl_product_info_display.php" to bring over the Tabbed Products Pro code... All LOOKS the way it should, but it's not ACTING the way it should.. HELP!!

Link to example product:
http://testsite.overthehillweb.com/zentest1/index.php?main_page=product_info&cPath=1_8&products_id=25

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

13 Sep 2009, 9:53 AM
#147
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Product Attribute Grid

DivaVocals:

So after a bonehead start I FINALLY got my grid to display.. (Reading really is fundamental!:laugh:)

I am sooooooo loving that this mod has been setup to work SPECIFICALLY with Stock By Attributes.. Whoo hoo!!! I think this will work perfectly for the client I want to use this with..

Only ONE tiny issue..:wacko:

When I add an available combo to the cart, it doesn't add the item to the cart, and flashes up the "Your Cart Is Empty" message.. I double checked EVERYTHING.. I did a Winmerge of the "tpl_product_info_display.php" to bring over the Tabbed Products Pro code... All LOOKS the way it should, but it's not ACTING the way it should.. HELP!!

Link to example product:
http://testsite.overthehillweb.com/zentest1/index.php?main_page=product_info&cPath=1_8&products_id=25

So I read back through this thread and found the answer.. It appears that this is related to the Sept 23rd Security patch. If you've implemented the Sept 23rd security patch, it will cause this mod to stop working correctly. I applied the fix outlined belwo, and all is now right with the world!!:clap:

I wanted to summarize what the issue is for the next person who has this issue... I've also attached an updated version of the security patch which includes the suggested changes to the patch posted by Wilt back in October. After unzipping the attached file, it should be uploaded to /includes/extra_configures/

Wilt's Post: http://www.zen-cart.com/forum/showpost.php?p=627320&postcount=83

wilt:

k,

I installed the attributes grid contribution on a stock 1.3.8 install with the most up to date Security patch file.

It does in fact stop this contribution from adding items to the cart.

The reason is, that the security patch uses a whitelist of characters that are allowed in the to be keys of the products_id array.

The attribute grid contribution uses extended product ids, as keys and these fail the whitelist test.

The fix is fairly simple.

In the security patch, there is a function called.

securityPatchSanitizePostVariableProductsId

and in this is the line

if (ereg_replace('[0-9a-zA-z_]', '', $key) != '')

> 
> ```php
if (ereg_replace('[0-9a-zA-z_:]', '', $key) != '')
```We will look to release an updated patch (probably this weekend)
> 
> Our apologies for the inconvenience, however we took the position that using a whitelist was more secure than relying on a simple blacklist.

Keywords: 
Your Shopping Cart is Empty
Shopping cart empty
empty shopping cart
does not add products
security patch
nothing added to shopping cart

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

14 Sep 2009, 3:34 PM
#148
mkonchalski avatar

mkonchalski

New Zenner

Join Date:
Dec 2008
Posts:
18
Plugin Contributions:
0

Re: Product Attribute Grid

I am running Stock By Attributes, and unfortunately I am developing this on a localhost system so it is difficult to post up a URL. I will try to put it on a live server so you can all view. Here is my dilemma.

This module is awesome, but I'm attempting to do something a little more complex than the module may allow. I would like to use the grid, however I would like it to display 4 different attributes, say...

Size, Length, Thickness, Height and then the Price and then Quantity Box. So in other words...

SIZE | LENGTH | Thickness | HEIGHT | Price | QTY

All in one row. The Size, Length, Thickness and Height are all produced through the attributes controller, but I want to display them across, similar to a catalog style. I am also running into the issue of getting attributes to repeat, for example...

Size has many different variants, but Length, Thickness and Height are are all the same. So for example it would be...

SIZE | LENGTH | Thickness | HEIGHT | Price | QTY
1 | 1 | 1 | 1 | 70 | QTY
2 | 1 | 1 | 1 | 80 | QTY

My thought is to write a separate SQL query that grabs my Stock By Attributes info, and displays it out, and just rewriting the Grid slightly to display the way that I want.

Does anyone have an suggestions?

14 Sep 2009, 4:22 PM
#149
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Product Attribute Grid

I guess I'm trying to understand why you need to create product variants for this quad combo of attributes.. Why create product attributes for values that NEVER change?? It sounds very much like you only need ONE attribute (size)

If the Length, Thickness and Height is the same for ALL sizes, then you would only need to create a single attribute for the size, and then VERY CLEARLY in your product description state that the Length, Thickness and Height for all sizes is the same.. > mkonchalski:

I am running Stock By Attributes, and unfortunately I am developing this on a localhost system so it is difficult to post up a URL. I will try to put it on a live server so you can all view. Here is my dilemma.

This module is awesome, but I'm attempting to do something a little more complex than the module may allow. I would like to use the grid, however I would like it to display 4 different attributes, say...

Size, Length, Thickness, Height and then the Price and then Quantity Box. So in other words...

SIZE | LENGTH | Thickness | HEIGHT | Price | QTY

All in one row. The Size, Length, Thickness and Height are all produced through the attributes controller, but I want to display them across, similar to a catalog style. I am also running into the issue of getting attributes to repeat, for example...

Size has many different variants, but Length, Thickness and Height are are all the same. So for example it would be...

SIZE | LENGTH | Thickness | HEIGHT | Price | QTY
1 | 1 | 1 | 1 | 70 | QTY
2 | 1 | 1 | 1 | 80 | QTY

My thought is to write a separate SQL query that grabs my Stock By Attributes info, and displays it out, and just rewriting the Grid slightly to display the way that I want.

Does anyone have an suggestions?

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

15 Sep 2009, 7:01 PM
#150
mkonchalski avatar

mkonchalski

New Zenner

Join Date:
Dec 2008
Posts:
18
Plugin Contributions:
0

Re: Product Attribute Grid

For most of the products I do only need on attribute.

For about 10% of my stock there are two changing attributes. The core issue is that I am asking many people who are relatively uneducated to purchase from the online catalog. This means that I need to spell things out for them, as simply as possible, so by displaying all of the attributes at once, with a price and a quantity box and an ADD TO CART button, it makes it very simple for them to just put the order through....

I've been tearing apart the STOCK BY ATTRIBUTES code and slowly getting it to work the right way...very slowly...two full days and counting. Hopefully it will be done today and I'll be able to share it with everyone.

The other aspect was the Attribute Stock Sku. So I modified Stock By Attributes to include a SKU which will print to every product as well.

15 Sep 2009, 10:33 PM
#151
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Product Attribute Grid

mkonchalski:

For most of the products I do only need on attribute.

For about 10% of my stock there are two changing attributes. The core issue is that I am asking many people who are relatively uneducated to purchase from the online catalog. **This means that I need to spell things out for them, as simply as possible, so by displaying all of the attributes at once, with a price and a quantity box and an ADD TO CART button, it makes it very simple for them to just put the order through....**I gathered that, and I understand.. However, I still think you can acheive that level of understanding without hacking this mod to achieve it.. JMHO..:smile:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

15 Sep 2009, 10:35 PM
#152
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Product Attribute Grid

mkonchalski:

I've been tearing apart the STOCK BY ATTRIBUTES code and slowly getting it to work the right way...very slowly...two full days and counting. Hopefully it will be done today and I'll be able to share it with everyoneCurious as to what changes you are making to SBA.. When you say "right way" what does that mean??

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

19 Sep 2009, 5:28 PM
#153
mkonchalski avatar

mkonchalski

New Zenner

Join Date:
Dec 2008
Posts:
18
Plugin Contributions:
0

Re: Product Attribute Grid

Well....So far here is what I have done to Stock By Attributes...

  1. Added SKU support. Printing a SKU for each and every varient, as well as printing that SKU to orders. I don't need it available to customers, but I am going to add it in, in the event that someone does need SKU support for customers.

  2. 0 Stock. In SBA, you can't just put in 0 under quantity, you have to type 00, or +0 or -0. This is a pain in the ######.

Those are the two things I have changed for SBA...

As for the GRID....

  1. Using the EXPLODE function in SBA display to display products in the grid format I need.

  2. I have the module displaying and adding the product to the cart. With the attribute hidden fields, and it also checks all stock level by SBA. This works for me since all products with attributes, are controlled by SBA, and all others have standard stock check from the Products database...

I have yet to Get the attributes and price to display correctly. in the shopping cart. At least in the attribute list. The attribute hidden fields are working wonderfully, I should have it worked out this weekend though. I gave up on it for the last few days and took a mini vacation to ease my mind from ripping apart code. I'll make sure I post everything up for the world to see soon. I can send anyone that wants to see my modifications a sample if they want to see, PM me.

24 Sep 2009, 11:34 AM
#154
thomasharding avatar

thomasharding

Zen Follower

Join Date:
Sep 2007
Location:
Manchester, England
Posts:
168
Plugin Contributions:
0

Re: Product Attribute Grid

Hey Guys,

Has anyone managed to get this working with the file upload box yet?

I'm currently working on a MASSIVE project involving attributes - basically, the customer can pick different attributes for different positions of a garment (ie, a certain logo for the left chest side of a shirt).

Anyway, it's all tied together using Attributes grid. I can't have one without the other really.

I'm going to try and work on a fix regardless and keep you updated if I get anywhere with it :D.

24 Sep 2009, 2:13 PM
#155
schweb_design avatar

schweb_design

New Zenner

Join Date:
Sep 2009
Posts:
6
Plugin Contributions:
0

Re: Product Attribute Grid

Hello Everyone, i have 2 questions:

  1. Does Attributes Grid work with more than 2 attributes? Attributes Grid seems to be exactly what i need, however because a grid is 2 dimensional i assume it only works with products with 2 attributes and once a product has more than 2 attributes it does not work. Is this true? It would be stupendous if i was mistaken here!!!

  2. Can anyone confirm whether or not Attributes Grid works with Stock by Attributes Ajax or Stock by Attributes Multiadd? I know it works with Stock by Attributes 4.7 by Kuroi

24 Sep 2009, 2:19 PM
#156
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Product Attribute Grid

Schweb Design:

Hello Everyone, i have 2 questions:

  1. Does Attributes Grid work with more than 2 attributes? Attributes Grid seems to be exactly what i need, however because a grid is 2 dimensional i assume it only works with products with 2 attributes and once a product has more than 2 attributes it does not work. Is this true? It would be stupendous if i was mistaken here!!!

  2. Can anyone confirm whether or not Attributes Grid works with Stock by Attributes Ajax or Stock by Attributes Multiadd? I know it works with Stock by Attributes 4.7 by KuroiI answered via PM.. I'll post this here too though.. It is only 2 dimensional.. (works with only two attributes..)

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

24 Sep 2009, 2:34 PM
#157
thomasharding avatar

thomasharding

Zen Follower

Join Date:
Sep 2007
Location:
Manchester, England
Posts:
168
Plugin Contributions:
0

Re: Product Attribute Grid

Update:

I took some code out of includes/classes/shopping_cart.php and modified it.

$real_ids = isset($_POST['id']) ? $_POST['id'] : "";
			if (isset($_GET['number_of_uploads']) && $_GET['number_of_uploads'] > 0) {
			 
			 include_once(DIR_WS_CLASSES . 'upload.php');
              for ($i = 1, $n = $_GET['number_of_uploads']; $i <= $n; $i++) {
			   
              if (zen_not_null($_FILES['id']['tmp_name'][TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]]) and ($_FILES['id']['tmp_name'][TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] != 'none')) {
                $products_options_file = new upload('id');
                $products_options_file->set_destination(DIR_FS_UPLOADS);
                $products_options_file->set_output_messages('session');
                if ($products_options_file->parse(TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i])) {
                  $products_image_extension = substr($products_options_file->filename, strrpos($products_options_file->filename, '.'));
                  if ($_SESSION['customer_id']) {
                    $db->Execute("insert into " . TABLE_FILES_UPLOADED . " (sesskey, customers_id, files_uploaded_name) values('" . zen_session_id() . "', '" . $_SESSION['customer_id'] . "', '" . zen_db_input($products_options_file->filename) . "')");
                
				  } else {
                    $db->Execute("insert into " . TABLE_FILES_UPLOADED . " (sesskey, files_uploaded_name) values('" . zen_session_id() . "', '" . zen_db_input($products_options_file->filename) . "')");
                  }
				 
                  $insert_id = $db->Insert_ID();
                  $real_ids[TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] = $insert_id . ". " . $products_options_file->filename;
                  $products_options_file->set_filename("$insert_id" . $products_image_extension);
                  if (!($products_options_file->save())) {
                    break;
                  }
                } else {
                  break;
                }
				
              } else { // No file uploaded -- use previous value
                $real_ids[TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] = $_POST[TEXT_PREFIX . UPLOAD_PREFIX . $i];
              }
            }
          }
		    $_POST['attribs'][$prid][$option] = $option_value;
		  }
		}

I placed this after "foreach($_POST['id'] as $option => $option_value) {" in the extra cart actions folder for this module.

Now, this works ok, but it checks every single attribute for an upload, not the upload field in itself, meaning I get a heap of messages saying 'file not uploaded' among 2 or 3 which I did actually upload.

Also, the value doesn't appear on the attributes list below any more either!

I can't work this out!

28 Sep 2009, 10:23 PM
#158
mrgtih2 avatar

mrgtih2

New Zenner

Join Date:
Jul 2009
Posts:
6
Plugin Contributions:
0

Re: Product Attribute Grid

Can anyone get the problem fixed? Upload not working with grid attribute enabled. Please post a solution if you have one.

28 Sep 2009, 11:22 PM
#159
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Product Attribute Grid

mkonchalski:

Well....So far here is what I have done to Stock By Attributes...

1. Added SKU support. Printing a SKU for each and every varient, as well as printing that SKU to orders. I don't need it available to customers, but I am going to add it in, in the event that someone does need SKU support for customers.

2. 0 Stock. In SBA, you can't just put in 0 under quantity, you have to type 00, or +0 or -0. This is a pain in the ######.

Those are the two things I have changed for SBA...

As for the GRID....

1. Using the EXPLODE function in SBA display to display products in the grid format I need.

2. I have the module displaying and adding the product to the cart. With the attribute hidden fields, and it also checks all stock level by SBA. This works for me since all products with attributes, are controlled by SBA, and all others have standard stock check from the Products database...

I have yet to Get the attributes and price to display correctly. in the shopping cart. At least in the attribute list. The attribute hidden fields are working wonderfully, I should have it worked out this weekend though. I gave up on it for the last few days and took a mini vacation to ease my mind from ripping apart code. I'll make sure I post everything up for the world to see soon. I can send anyone that wants to see my modifications a sample if they want to see, PM me.
Can't wait to see your final solutions..:smile:

Re: the bolded item.. I don't know which version of SBA you have installed, but the 4.7 version written by Kuroi will indeed allow you to zero out your inventory or even delete a product variant with no muss or fuss about it.. You simply enter "0" for the quantity in stock, save and it works perfectly..

For my money the Ver 4.7 of SBA by Kuroi (as opposed to the MultiAdd and Ajax versions) is the only stable SUPPORTED version of SBA available..

The authors of the MultiAdd and Ajax versions unfortunately put their version up and have failed to properly support them. The Ajax version is missing important files it needs to work, and most folks have had to kluge together code to make this version whole.. I have tried both of the "other" versions and have never been able to get either one to work properly.. (plus I see no real benefit of the MultiAdd or Ajax versions)

From following the SBA support thread, the Ajax version and the MultiAdd versions of SBA are the versions people most often have issues with. That said I do use is the stylesheet from the MultiAdd version of SBA.. I like the way it makes a visual distinction between the products and it's variants.. Otherwise the Kuroi version of SBA is stable and works EXACTLY as Kuroi has described it. (no filler added:smile:)

I can't say for sure, but I believe that when the author of this mod says it works with SBA, that he means the Kuroi release of SBA, and not "the others":laugh:.

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

2 Oct 2009, 12:01 AM
#160
mrgtih2 avatar

mrgtih2

New Zenner

Join Date:
Jul 2009
Posts:
6
Plugin Contributions:
0

Re: Product Attribute Grid

Thanks to thomasharding's post and some PM his code inserted into the file absolute_products_with_attributes.php in the includes/extra_cart_actions/ folder we now have the uploads working but with a glitch. It doesn't add the attribute to the cart so it would be hard for the owner of the site to know that someone added an upload.

I am reaching out to the devs or anyone else for some help to get this to work.

Here is the code that was used ,

##########BEGIN UPLOAD HACK#############

      $real_ids = isset($_POST['id']) ? $_POST['id'] : "";
      if (isset($_GET['number_of_uploads']) && $_GET['number_of_uploads'] > 0) {
        /**
         * Need the upload class for attribute type that allows user uploads.
         *
         */
        include(DIR_WS_CLASSES . 'upload.php');
        for ($i = 1, $n = $_GET['number_of_uploads']; $i <= $n; $i++) {
          if (zen_not_null($_FILES['id']['tmp_name'][TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]]) and ($_FILES['id']['tmp_name'][TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] != 'none')) {
            $products_options_file = new upload('id');
            $products_options_file->set_destination(DIR_FS_UPLOADS);
            $products_options_file->set_output_messages('session');
            if ($products_options_file->parse(TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i])) {
              $products_image_extension = substr($products_options_file->filename, strrpos($products_options_file->filename, '.'));

//Arch 04/2007 - to add product name to uploaded file
$prod_image_name = substr($products_options_file->filename, 0,-4);
//eof
if ($_SESSION['customer_id']) {
$db->Execute("insert into " . TABLE_FILES_UPLOADED . " (sesskey, customers_id, files_uploaded_name) values('" . zen_session_id() . "', '" . $_SESSION['customer_id'] . "', '" . zen_db_input($products_options_file->filename) . "')");
} else {
$db->Execute("insert into " . TABLE_FILES_UPLOADED . " (sesskey, files_uploaded_name) values('" . zen_session_id() . "', '" . zen_db_input($products_options_file->filename) . "')");
}
$insert_id = $db->Insert_ID() . $prod_image_name ;
$real_ids[TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] = $insert_id . ". " . $products_options_file->filename;
$products_options_file->set_filename("$insert_id" . $products_image_extension);
if (!($products_options_file->save())) {
break;
}
} else {
break;
}
} else { // No file uploaded -- use previous value
$real_ids[TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] = $_POST[TEXT_PREFIX . UPLOAD_PREFIX . $i];
}
}
//$this->add_cart($_POST['products_id'], $this->get_quantity(zen_get_uprid($_POST['products_id'], $real_ids))+($new_qty), $real_ids);
}
##########END UPLOAD HACK#############

If someone has any Ideas please let us know, Thanks!