This is a discussion on File diff from OSC advanced_search.php within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; Hi, I am customizing and installing Product Extra Fields, and so far it was working fine, but I needed and ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#11
| |||
| |||
| Hi, I am customizing and installing Product Extra Fields, and so far it was working fine, but I needed and additional feature not included in the package so I started to browse the code and modify it, then I realize something was missing from the installation, and when I added I start to get this error : 'Parse error: syntax error, unexpected T_ELSE in /home/... line 55' When I read the instructions I found a discrepancy between OSCMax and the code, which is understandable, as some lines that used to be in advanced_search.php in OScMAx are instead in advanced_search_result.php. Particularly this portion(Please read my comments added to the original code): PHP Code: because of BTS there are already in php This is completely useless in oscMax code because it uses a different way to validate those fields PHP Code: Please note I validated additional fields and has a slight modification from the oscMax original before adding this missing code. PHP Code: |
| Sponsored Links | ||
| ||
|
#12
| |||
| |||
| I am not able to edit anything I am quoting but using [php] tags, with my previous code, sorry for the mess!!! |
|
#13
| |||
| |||
| Thanks for replying in fact it was a missing } After much searching I found out there was also a validating function inside advanced_search.js.php Now I want to validate a select, because the current validation from the contribution, but I don't know which function it must be used or if have to create a new one. The only function that seems to check the form is >>> PHP Code: Code: function check_form() {
var error_message = "<?php echo JS_ERROR; ?>";
var error_found = false;
var error_field;
var keywords = document.advanced_search.keywords.value;
var dfrom = document.advanced_search.dfrom.value;
var dto = document.advanced_search.dto.value;
//Start Age and Height Variables mod added
var afrom = document.advanced_search.afrom.value;
var ato = document.advanced_search.ato.value;
var afrom_float;
var ato_float;
//height
var hfrom = document.advanced_search.hfrom.value;
var hto = document.advanced_search.hto.value;
var hfrom_float;
var hto_float;
//End
var pfrom = document.advanced_search.pfrom.value;
var pto = document.advanced_search.pto.value;
var pfrom_float;
var pto_float;
<!-- /*if ( ((keywords == '') || (keywords.length < 1)) && ((dfrom == '') || (dfrom == '<?php //echo DOB_FORMAT_STRING; ?>') || (dfrom.length < 1)) && ((dto == '') || (dto == '<?php //echo DOB_FORMAT_STRING; ?>') || (dto.length < 1)) && ((pfrom == '') || (pfrom.length < 1)) && ((pto == '') || (pto.length < 1)) )*/ -->
PHP Code: Here is the portion of the code where the SELECTS are within the Advanced Search form: PHP Code: |
|
#14
| |||
| |||
| I don't understand why the values of my select end up empty http://.../advanced_search_result.ph...09%2F07%2F2008 I have a SELECT pulldown menu in my advanced search form >>> PHP Code: Please Select >>> Blond >>> Brunette If either one is selected the SELECT type behaves like is the option is Please SELECT as you can see above. My function 'tep_get_hair' added to general_output.php under includes/functions/ PHP Code: When I check at the source of the browser's output in the advanced search form I noticed>>> HTML Code: td class="fieldKey">Hair:</td> <td class="fieldValue"><select name="products_to_products_extra_fields_id"><option value="" selected="selected">Please Select</option><option value="" selected="selected">Blond</option><option value="" selected="selected">Brunette</option></select></td> </tr> <tr> <td class="fieldKey">Eyes:</td> <td class="fieldValue"><select name="products_to_products_extra_fields_id"><option value="" selected="selected">Please Select</option><option value="" selected="selected">Green</option><option value="" selected="selected">Hazel</option></select></td> Should I create another table and refer to it instead? All extra fields are validated in .js and php ... so why I don't get any values from those selects?[/quote] |
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| No access to php.ini file! | crystina | osCMax v2 Installation issues | 3 | 04-05-2007 08:25 PM |
| file diff software | chrismole | Off topic & Chit Chat | 4 | 01-15-2007 09:58 PM |
| Hello i need help with my english.php file | reysent | osCommerce 2.2 Modification Help | 6 | 02-20-2005 09:28 AM |
| Error on checkout_process.php file ...please help ??? | nrwalker | osCommerce 2.2 Modification Help | 1 | 06-28-2004 06:19 PM |
| check_ip.php missing file? | AtroxAngel | osCommerce 2.2 Installation Help | 1 | 01-24-2003 07:04 AM |