Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Option Types v2


Zappo

Recommended Posts

If I have only text-input fields on a product, the entered info does not carry over to the shopping cart... BUT... if I have text-input fields on a product that ALSO has a drop-down of any sort, then all the entered info carries over to the shopping cart correctly.

I'm guessing you have another contrib installed...

Can't reproduce the error, and don't see how this could occur elsewhise.

I suggest you check your application_top.php

That's where the Text attributes are handled, and added to cart.

There's a line in there: if ($HTTP_POST_VARS['number_of_uploads'] > 0) {, and I'm thinking that line only get's fired when a "normal" attribute is added...

Let me know how it works out.

Like Eek said... It never hurts to help!
----------------------------------------

Link to comment
Share on other sites

Thanks, Zappo. Yes, there are other contributions installed. Here is the section of code that I believe may be firing only if a drop-down is used. Could you give me any hints as to the section you think is requiring a drop-down:

 

// customer adds a product from the products page
//BOF qpbpp
// BOF: MOD - QT Pro
//    case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
//    $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);



  case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id']) && ($HTTP_POST_VARS['products_id']==(int)$HTTP_POST_VARS['products_id'])) {
       $attributes=array();
       if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) {
         $attrlist=explode(',',$HTTP_POST_VARS['attrcomb']);
         foreach ($attrlist as $attr) {
           list($oid, $oval)=explode('-',$attr);
           if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval)
             $attributes[$oid]=$oval;
         }
       }
       if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) {
         foreach ($HTTP_POST_VARS['id'] as $key=>$val) {
           if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)
             $attributes=$attributes + $HTTP_POST_VARS['id'];
         }
       }
       $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+ $HTTP_POST_VARS['cart_quantity'], $attributes);
// EOF: MOD - QT Pro
//EOF qpbp - changed cart_quantity
                   }
       tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
       break;

Link to comment
Share on other sites

Thanks, Zappo. Yes, there are other contributions installed. Here is the section of code that I believe may be firing only if a drop-down is used. Could you give me any hints as to the section you think is requiring a drop-down:

Hmmm... some strange things in there...

Fist off, I'd remove: " && ($HTTP_POST_VARS['products_id']==(int)$HTTP_POST_VARS['products_id'])"

seems pretty useless...

Furthermore, you seem to be using QTPro, and I don't know in how many ways QTPro can conflict with Option Types...

Anyway, the line: "if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)" seems to check for posted attributes, and filter out only the Numeric keys and values... (and text is not numeric nor an integer (if you want to allow only numbers, remove the (int))

Here too I find the double check for numeric values very strange!!! (is_numeric() is the same as (int))

You haven't added Option Types code. You don't need uploads, or what?

Like Eek said... It never hurts to help!
----------------------------------------

Link to comment
Share on other sites

Thanks for the pointers, Zappo. We don't need uploads, but the new code still should have been added to app_top. Let me back-track and see what's up. I'll also try to decipher why certain code was added to app_top. The shopping cart is also not updating/deleting correctly (sometimes it's duplicating the item) either for items that have options, so I've got some digging to do. Thanks for your pointers. Let me see what I can find.

Link to comment
Share on other sites

Hi,

 

Thanks for this excellent contribution.

 

I do have one issue at present, when I edit an already created option in Products Attributes | Product Options I get the following warnings ...

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/vjgowns/public_html/admin/includes/functions/database.php on line 99

 

Warning: Cannot modify header information - headers already sent by (output started at /home/vjgowns/public_html/admin/includes/functions/database.php:99) in /home/vjgowns/public_html/admin/includes/functions/general.php on line 22

 

I then click the back button on the browser, click cancel button next to update and the screen refreshes showing the update has in fact worked.

 

Also a feature request ... It would be handy ( at least for me ) to have an option that just embeds some html within the options to allow instructions, hints etc on which option is appropriate for the customer.

 

Thanks for being there ...

Link to comment
Share on other sites

Hi!

I've installed contribut Option Type (v.2.1.3), it turned out to be a great staff, thank you.

 

But when i tried to upload the file (field "File" on product_info page), I could not see if the upload has been successful, there were no error messages ('Error: File type not allowed.') or success messages ('Success: file saved successfully.').

 

Trying to find the way out I added the following code:

 

if ($messageStack->size('upload') > 0) { echo $messageStack->output('upload'); }

to the file catalog\includes\header.php

 

After that I received error messages, but i still got no success messages ('Success: file saved successfully.') :(

 

What should I do?

Edited by Ketzer
Link to comment
Share on other sites

Hello:

 

Looking for a bit of help on the option types images part.

 

If I have two Product options set to use images when I go to the catalog and try to select the first option every option value for both product options is shown no matter which product option is tried.

 

IE:

 

Product Options:

Fonts Image

Logo Image

 

Option Values:

Fonts Contemporary

Fonts Roman

Fonts Script

Logo Circle

Logo Flowers

Logo Borders

 

Now if you go to the catalog this is what happens:

 

Fonts shows correctly - shows only the 3 font options

 

When you try to select a Logo:

All 3 fonts show and all 3 logo choices show in the drop down.

 

Can anyone help???

 

Thanks!

 

I too have faced this problem.

Has solved as follows:

 

Open includes/modules/option_types.php

 

Find

$Image_displayed = 0;

Below add

$Image_Dropdown[$product_info['products_id']]='';
$ImageText[$product_info['products_id']]='';
$First_ImageText[$product_info['products_id']]='';

 

Find

$ImageSelector_Name = $ProdOpt_Name . ': <script language="JavaScript" type="text/JavaScript">var ImageText'.$product_info['products_id'] . ' = new Array(' . $ImageText[$product_info['products_id']] . ')</script>';
$ImageSelector_Dropdown = '<select name="' . $Image_Dropdown_ID . '" onChange="document.getElementById(\'ImageSelect' . $product_info['products_id'] . '\').innerHTML=ImageText'.$product_info['products_id'].'[this.selectedIndex];">' . $Image_Dropdown[$product_info['products_id']] . '</select> ' . $ProdOpt_Comment;

 

Replace with

$ImageSelector_Name = $ProdOpt_Name . ': <script language="JavaScript" type="text/JavaScript">var ImageText'.$ProdOpt_ID . ' = new Array(' . $ImageText[$product_info['products_id']] . ')</script>';
$ImageSelector_Dropdown = '<select name="' . $Image_Dropdown_ID . '" onChange="document.getElementById(\'ImageSelect' . $ProdOpt_ID . '\').innerHTML=ImageText'.$ProdOpt_ID.'[this.selectedIndex];">' . $Image_Dropdown[$product_info['products_id']] . '</select> ' . $ProdOpt_Comment;

 

Find

<center><?php echo '<div class="main" id="ImageSelect' . $product_info['products_id'] . '">' . $First_ImageText[$product_info['products_id']] . '</div>';?></center>

 

Replace with

<center><?php echo '<div class="main" id="ImageSelect' . $ProdOpt_ID . '">' . $First_ImageText[$product_info['products_id']] . '</div>';?></center>

It works :)

Link to comment
Share on other sites

I too have faced this problem.

Has solved as follows:

 

Open includes/modules/option_types.php

 

Find

$Image_displayed = 0;

Below add

$Image_Dropdown[$product_info['products_id']]='';
$ImageText[$product_info['products_id']]='';
$First_ImageText[$product_info['products_id']]='';

 

Find

$ImageSelector_Name = $ProdOpt_Name . ': <script language="JavaScript" type="text/JavaScript">var ImageText'.$product_info['products_id'] . ' = new Array(' . $ImageText[$product_info['products_id']] . ')</script>';
$ImageSelector_Dropdown = '<select name="' . $Image_Dropdown_ID . '" onChange="document.getElementById(\'ImageSelect' . $product_info['products_id'] . '\').innerHTML=ImageText'.$product_info['products_id'].'[this.selectedIndex];">' . $Image_Dropdown[$product_info['products_id']] . '</select> ' . $ProdOpt_Comment;

 

Replace with

$ImageSelector_Name = $ProdOpt_Name . ': <script language="JavaScript" type="text/JavaScript">var ImageText'.$ProdOpt_ID . ' = new Array(' . $ImageText[$product_info['products_id']] . ')</script>';
$ImageSelector_Dropdown = '<select name="' . $Image_Dropdown_ID . '" onChange="document.getElementById(\'ImageSelect' . $ProdOpt_ID . '\').innerHTML=ImageText'.$ProdOpt_ID.'[this.selectedIndex];">' . $Image_Dropdown[$product_info['products_id']] . '</select> ' . $ProdOpt_Comment;

 

Find

<center><?php echo '<div class="main" id="ImageSelect' . $product_info['products_id'] . '">' . $First_ImageText[$product_info['products_id']] . '</div>';?></center>

 

Replace with

<center><?php echo '<div class="main" id="ImageSelect' . $ProdOpt_ID . '">' . $First_ImageText[$product_info['products_id']] . '</div>';?></center>

It works :)

 

THANK YOU!! YOU ROCK!!! :)

Link to comment
Share on other sites

I've been testing this contribution on WP.osC along with the smtp auth contribution and I have it mostly working. The most important feature for me is the file uploader, although I really appreciate the attribute and option management as well as image options. Here's where I'm at:

 


  •  
  • I've never been able to get it to upload the file. It just fails silently making me think it did something.
  • For a while the customer's file name path was being displayed in the shopping cart, but now that's not working either.
  • I integrated the AJAX downloader posted a few messages back, but that doesn't help or hurt. I've removed that change and I still can't get the file to upload or, now, even be recognized.
     

 

I know it's something I broke when I integrated it, but could someone give me a pointer to where to look? In case it matters, here is what I'm building this on:

 


  •  
  • Windows Server 2008 R2
  • PHP 5.3.0
  • MySQL 5.1.40
  • WP.osC 1.0 RC2 (built on osCommerce 2.2RC2a)
  • Option Types V2.1.3
     

I'm used to being able to debug through my code (C, C++, C#, etc.) and with PHP I don't have a decent debugger, so I feel like I'm flying blind. Even putting echo statements in doesn't help me see what's going on because often they don't show up.

 

Any help you can give me would be great. I've literally been up all night trying to solve this problem.

 

If you want to see it, you can go to test.gameshirtz.com/shop.

 

Thanks,

David

 

PS I should also say how much I appreciate the contribution and how well it has been supported. Thanks, Zappo, as well as everyone else who has been helping on this. It's very much appreciated.

Edited by DavidPotter
Link to comment
Share on other sites

I found the problem. Some of it was my own fault during the merge, but there was one bug in the original contribution code I downloaded. In shopping_cart.php around line 172, look for this:

 

$imageDir = (tep_session_registered) ? UPL_DIR : TMP_DIR;

 

Replace it with this:

 

$imageDir = (tep_session_is_registered('customer_id')) ? UPL_DIR : TMP_DIR;

 

Works like a charm.

 

Oh, I should also add that I found a debugging solution. I'm using PHPeclipse with Xdebug. It's a pretty buggy solution, but it's better than no debugger at all.

Edited by DavidPotter
Link to comment
Share on other sites

I'm running into a problem with the link for an item in the cart when there is an image file as one of the options. When the user clicks either the product name link or the product image link, the window goes dark and a spinner is displayed as if it is going to display an image, but it never does. I'm wondering if that has something to do with the product id having an image name in it (e.g. id{2}1{1}18{txt_5}foo.png). This strikes me as a Javascript effect, but I don't know enough about all the lightbox stuff, etc. or Javascript to know where to go with it.

 

Can someone?

 

Check it out at http://test.gameshirtz.com/shop/

 

Thanks,

David

Link to comment
Share on other sites

I'm running into a problem with the link for an item in the cart when there is an image file as one of the options. When the user clicks either the product name link or the product image link, the window goes dark and a spinner is displayed as if it is going to display an image, but it never does. I'm wondering if that has something to do with the product id having an image name in it (e.g. id{2}1{1}18{txt_5}foo.png). This strikes me as a Javascript effect, but I don't know enough about all the lightbox stuff, etc. or Javascript to know where to go with it.

Hi David. Nice site you have there!

I believe you are correct. It seems like Lightbox automatically detects the Image links, to add a zoom effect.

However, I don't believe I inserted any lightbox (or other "popup") javascript... (did I?!?)

The only thing I can think of to (quickly and easily) fix this, is to change the sort order, to make sure the uploads are never added to the end of the link.

You can also remove the image from the link (or the entire attributes stuff), as it is only used for filling the selected fields with the previous values... (in product_info.php)

 

This IS a bug however, and SHOULD be fixed in the future...

I'll add it to my ToDo list...

Edited by Zappo

Like Eek said... It never hurts to help!
----------------------------------------

Link to comment
Share on other sites

Hi David. Nice site you have there!

I believe you are correct. It seems like Lightbox automatically detects the Image links, to add a zoom effect.

However, I don't believe I inserted any lightbox (or other "popup") javascript... (did I?!?)

The only thing I can think of to (quickly and easily) fix this, is to change the sort order, to make sure the uploads are never added to the end of the link.

You can also remove the image from the link (or the entire attributes stuff), as it is only used for filling the selected fields with the previous values... (in product_info.php)

 

This IS a bug however, and SHOULD be fixed in the future...

I'll add it to my ToDo list...

 

Thanks :)

 

I'll take a look at that and see what I come up with. I have to fix it, so I'll let you know when I'm done.

 

By the way, I forgot to mention one other thing I had to do to fix my problem with the file not making it to the cart. I had to make sure that all the hidden fields were placed before the submit button, including the one for number_of_uploads. I don't know if that is due to being merged into WP.osC or something else I did, but I wanted to mention it.

 

As for the presence of lightbox, that was added by WP.osC. Pretty cool, except when it isn't :blink:

Link to comment
Share on other sites

Dear Zappo,

 

I need a little help if possible.

 

I would like to make sure one of the options is aways selected when using radio buttons. Normally, this should be the lower price or the first option from top. In order to achieve this in option_types.php I changed $checked = true to false; } else {$checked = false to true;. This change forced selection. The only problem is that it selects always the bottom option (radio button).

 

I hope you could suggest a way to select the top one?

 

the page as example:

http://www.artzoom.co.uk/product_info.php?cPath=3&products_id=32

 

below is the code in question:

 

 

case OPTIONS_TYPE_RADIO:

$tmp_html = '<table>';

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$product_info['products_id'] . "' and pa.options_id = '" . $ProdOpt_ID . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "' order by pa.products_options_sort_order");

while ($products_options_array = tep_db_fetch_array($products_options_query)) {

if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$ProdOpt_ID]) && ($products_options_array['products_options_values_id'] == $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$ProdOpt_ID])) {

$checked = false;

} else {

$checked = true;

}

$tmp_html .= '<tr><td class="main">';

$tmp_html .= tep_draw_radio_field('id[' . $ProdOpt_ID . ']', $products_options_array['products_options_values_id'], $checked);

$tmp_html .= $products_options_array['products_options_values_name'];

if ($products_options_array['options_values_price'] != '0') {

$tmp_html .= ' (' . $products_options_array['price_prefix'] . $currencies->display_price($products_options_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

}

$tmp_html .= '</tr></td>';

}

$tmp_html .= '</table>'; ?>

<tr>

<td class="main"><?php echo '<strong>'. $ProdOpt_Name . ':</strong>' ; ?><?php echo $tmp_html .'<small>' . $ProdOpt_Comment . '</small>'; ?> </td>

</tr> <?php

Link to comment
Share on other sites

Dear Zappo,

 

I need a little help if possible.

Try something like this:

	if ((isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$ProdOpt_ID]) && ($products_options_array['products_options_values_id'] == $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$ProdOpt_ID])) || empty($checked)) {
	$checked = true;
} else {
	$checked = false;
}

Notice that I switched the true/false. (It should be in this order originally)

Haven't tried this, but as this should set the first attribute that's pulled from database as selected (OR the attribute that's also stored in cart with the same product), it should work...

Edited by Zappo

Like Eek said... It never hurts to help!
----------------------------------------

Link to comment
Share on other sites

I modified how file attributes are displayed in the cart so that attributes that are images would be displayed as a thumbnail. Here's the code change.

 

Change this (around line 170):

 

        while (list($option, $value) = each($products[$i]['attributes'])) {
//BOF - Zappo - Option Types v2 - Rearanged Product(s) cart-listing, added Options Column, Upload preview link, and added Prices to Attributes
         $imageDir = (tep_session_registered) ? UPL_DIR : TMP_DIR;
         $image_link1 = '';
         $image_link2 = '';
         if (file_exists($imageDir.$products[$i][$option]['products_options_values_name'])) {
           $image_link1 = '<a href="' . $imageDir . $products[$i][$option]['products_options_values_name'] . '" target="_blank">';
           $image_link2 = tep_image(DIR_WS_ICONS . 'view.gif') . '</a>';
         }
         $Option_Price = ($products[$i][$option]['options_values_price'] != '0') ? ' - (' . $products[$i][$option]['price_prefix'] . $currencies->display_price($products[$i][$option]['options_values_price'], tep_get_tax_rate($products[$i]['tax_class_id'])) . ')' : '';
         $products_Options .= '<small>- ' . $products[$i][$option]['products_options_name'] . ': <i>' . $image_link1 . $products[$i][$option]['products_options_values_name'] . $image_link2 . '</i>' . $Option_Price . '</small><br>';
       }

 

to this:

 

        $imageDir = (tep_session_is_registered('customer_id')) ? UPL_DIR : TMP_DIR;
       while (list($option, $value) = each($products[$i]['attributes'])) {
//BOF - Zappo - Option Types v2 - Rearanged Product(s) cart-listing, added Options Column, Upload preview link, and added Prices to Attributes
           $image_link1 = '';
           $image_link2 = '';
           $attr_value = $products[$i][$option]['products_options_values_name'];
           $full_file_path = $imageDir . $attr_value;
           if (file_exists($full_file_path)) {
               $image_link1 = '<a href="' . $full_file_path . '" target="_blank">';
               // If the file is an image that can be displayed by most browsers, display it as one in the cart.
               if (in_array(strtolower(substr($attr_value, strrpos($attr_value, '.')+1)), array('jpg', 'jpeg', 'gif', 'png', 'bmp'))) {
                   $image_link2 = '<br/><div style="text-align: center;">' . tep_image($full_file_path, $attr_value, '', SMALL_IMAGE_HEIGHT) . '</div></a>';
               } else {
                   $image_link2 = tep_image(DIR_WS_ICONS . 'view.gif') . '</a>';
               }
           }
           $Option_Price = ($products[$i][$option]['options_values_price'] != '0')
                           ? ' - (' . $products[$i][$option]['price_prefix'] .
                             $currencies->display_price($products[$i][$option]['options_values_price'], tep_get_tax_rate($products[$i]['tax_class_id'])) . ')'
                           : '';
           $products_Options .= '<small>- ' . $attr_value . ': <i>' . $image_link1 . $attr_value . $image_link2 . '</i>' . $Option_Price . '</small><br>';
       }

 

The key part is where it sets the $image_link2 variable. Let me know if you see any problems with this or make improvements to it.

 

Note: Please forgive any code reformatting. It should be minor. I've been debugging and I needed to understand it better and long lines just drive me batty. The one noticeable line that looks very different but should be exactly the same is the one that sets the $Option_Price variable.

 

Thanks,

David

Edited by DavidPotter
Link to comment
Share on other sites

I made a typo in the code above. Change this:

 

$products_Options .= '<small>- ' . $attr_value . ': <i>' . $image_link1 . $attr_value . $image_link2 . '</i>' . $Option_Price . '</small><br>';

 

to this:

 

$products_Options .= '<small>- ' . $products[$i][$option]['products_options_name'] . ': <i>' . $image_link1 . $attr_value . $image_link2 . '</i>' . $Option_Price . '</small><br>';

 

Sorry about that.

Link to comment
Share on other sites

I think I've been able to remove the upload file name from the product id. It requires changes to three files - includes\application_top.php, shopping_cart.php, and includes\classes\shopping_cart.php. If you're using WP.osc like I am, then you'll make changes to includes\modules\module16.php instead of the first shopping_cart.php file.

 

Basically what you do is use the id from the row in the file_uploads table as the value for the file upload attribute. There's some extra work to do if the user selected a file from the drop-down list instead of uploading a new one. Then in the two shopping cart scripts you use that id to look up the file name from the file_uploads table.

 

I'm still testing this and I don't have time to post the full solution at the moment, but I'm pretty pleased with the results. I'll try to post my solution soon.

Link to comment
Share on other sites

I think I've been able to remove the upload file name from the product id. It requires changes to three files - includes\application_top.php, shopping_cart.php, and includes\classes\shopping_cart.php. If you're using WP.osc like I am, then you'll make changes to includes\modules\module16.php instead of the first shopping_cart.php file.

 

Basically what you do is use the id from the row in the file_uploads table as the value for the file upload attribute. There's some extra work to do if the user selected a file from the drop-down list instead of uploading a new one. Then in the two shopping cart scripts you use that id to look up the file name from the file_uploads table.

 

I'm still testing this and I don't have time to post the full solution at the moment, but I'm pretty pleased with the results. I'll try to post my solution soon.

Thanks David!

Good work.

Nice to see people getting involved, to improve Option Types v2!

Like Eek said... It never hurts to help!
----------------------------------------

Link to comment
Share on other sites

Try something like this:

	if ((isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$ProdOpt_ID]) && ($products_options_array['products_options_values_id'] == $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$ProdOpt_ID])) || empty($checked)) {

thanks

 

i tried it and there was some problem still, then i tried this:

and it seem to work for the top option but not for the bottom:

 

if ((isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$ProdOpt_ID]) && ($products_options_array['products_options_values_id'] == $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$ProdOpt_ID])) || [b]!isset[/b]($checked)) {

$checked = true;

} else {

$checked = false;

}

 

http://www.artzoom.co.uk/product_info.php?cPath=3&products_id=32

Link to comment
Share on other sites

The fix for

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/vjgowns/public_html/admin/includes/functions/database.php on line 99

Warning: Cannot modify header information - headers already sent by (output started at /home/vjgowns/public_html/admin/includes/functions/database.php:99) in /home/vjgowns/public_html/admin/includes/functions/general.php on line 22

 

is approximately line 136 in the products_attributes.php file (found in the admin folder)

$pov2po = tep_db_fetch_array($optionType_query);

change to...

$pov2po = tep_db_fetch_array($pov2po_query);

 

Special Thanks to Zappo and thanks to everybody who volunteers to improve OSCommerce and the Open Source concept. Many as one can turn the earth.

Link to comment
Share on other sites

for oscommerce-2.2rc2a

 

the $_POST (s) should be changed to $HTTP_POST_VARS

Bad advice!

$HTTP_POST_VARS is the deprecated version of $_POST

I advise everyone to replace ALL $HTTP_POST_VARS, $HTTP_GET_VARS etc etc with $_POST and $_GET

Like Eek said... It never hurts to help!
----------------------------------------

Link to comment
Share on other sites

for oscommerce-2.2rc2a

 

the $_POST (s) should be changed to $HTTP_POST_VARS

 

explanation on the difference of $_POST and $HTTP_POST_VARS

 

$_POST is new since PHP version 4.1.0

 

$HTTP_POST_VARS is the old version of PHP if you are still using PHP versions before 4.1.0

 

in your newer PHP versions the register_long_arrays might be turned off which need to be turned on to support the older version $HTTP_POST_VARS

 

but zappo is right in that $_POST is the new way

Edited by Silver Captain
Link to comment
Share on other sites

$_POST is new since PHP version 4.1.0

Indeed, and in my opinion, nobody should still be running THAT low a PHP version.

Also, I don't think you can find a host that's running such old versions.

Basically, the entire osC package is outdated...

Like Eek said... It never hurts to help!
----------------------------------------

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...