Jimgo Posted March 15, 2007 Share Posted March 15, 2007 And where i can find how to do that? I search in the README file but i can't found how to edit admin/includes/functions/general.php Quote Link to comment Share on other sites More sharing options...
stevel Posted March 15, 2007 Author Share Posted March 15, 2007 Sorry, I meant html_output.php Quote Steve  Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Jimgo Posted March 16, 2007 Share Posted March 16, 2007 That is!!! Thanx a lot for the support!!!! Quote Link to comment Share on other sites More sharing options...
Guest Posted March 19, 2007 Share Posted March 19, 2007 (edited) Hey all !  I've got an error on my html_output with this mod T_ENCAPSED_STRING :(  on this line =>  $field .= '>' .tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';  from  ////// Output a form pull down menu function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) { $field = '<select name="' . tep_output_string($name) . '"';  if (tep_not_null($parameters)) $field .= ' ' . $parameters;  $field .= '>';  if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);  for ($i=0, $n=sizeof($values); $i<$n; $i++) { $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"'; if ($default == $values[$i]['id']) { $field .= ' SELECTED'; }  $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>'; } $field .= '</select>';  if ($required == true) $field .= TEXT_FIELD_REQUIRED;  return $field; }  I've got FCKeditor installed  I really need your help ! Edited March 19, 2007 by exocom2 Quote Link to comment Share on other sites More sharing options...
stevel Posted March 19, 2007 Author Share Posted March 19, 2007 (edited) I'm not sure why you think the error is related to this contribution, but...  In the code:  '\'' => '''  That text at the end is three apostrophes, so you get mismatched quotes.  Now it may be that you posted something else, but the forum is displaying it incorrectly. I can't manage to post what SHOULD be there directly, instead of ''' it should be '& #039;' without the space.  This code is not part of the Country-State Selector contribution.  Are you perhaps using some sort of web-based editor to edit the code? Don't. Edit the source on your local computer, ideally with a PHP-aware editor (I use Dreamweaver), then upload. Otherwise you haven't the faintest clue what is being put on your server. Edited March 19, 2007 by stevel Quote Steve  Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Guest Posted March 19, 2007 Share Posted March 19, 2007 um...  I used webexpert 6 and when I save the html_output and upload the file I obtain an error :( so that may not be a conflict with your contrib and fckeditor ;)  I tried with my notepad and everything works  sorry for inconveniences  Thx for your reply that help me to find ;) have a nice day ;) Quote Link to comment Share on other sites More sharing options...
Guest Posted March 19, 2007 Share Posted March 19, 2007 I can't edit :( Â Thx for the three apostrophes, I solve this problem too ;) Quote Link to comment Share on other sites More sharing options...
Ohem Posted March 24, 2007 Share Posted March 24, 2007 Hi! Â I'm using osc2nuke http://www.osc2nuke.com/project/ and tried install contry-state but it gave me a blank page. the contribution isn't compatible? Quote Link to comment Share on other sites More sharing options...
stevel Posted March 24, 2007 Author Share Posted March 24, 2007 If you get a blank page, then you have a PHP syntax error which you need to fix. Look in your PHP error log, if you have one, or re-enable PHP error reporting to see what the error is.  I have no idea if this contribution is "compatible" with osc2nuke, but I haven't yet encountered an issue where it was incompatible with a 2.2MS2 or derivative version of osC. Quote Steve  Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Ohem Posted March 24, 2007 Share Posted March 24, 2007 If you get a blank page, then you have a PHP syntax error which you need to fix. Look in your PHP error log, if you have one, or re-enable PHP error reporting to see what the error is. I have no idea if this contribution is "compatible" with osc2nuke, but I haven't yet encountered an issue where it was incompatible with a 2.2MS2 or derivative version of osC.  Though only so far I've noticed it's only in "modules.php?name=catalog&file=create_account" i get an blank screen. Quote Link to comment Share on other sites More sharing options...
stevel Posted March 24, 2007 Author Share Posted March 24, 2007 Doesn't matter - you have a PHP syntax error somewhere. You'll have to find it and fix it. The blank screen is the symptom when PHP exits before writing any HTML output. If you have PHP error reporting on, you'll see the error message, but otherwise you won't. If your web server has a CGI error log you can examine, the error may be shown there.  Assuming that this osc2nuke is a layer on top of normal osC, you could start by comparing create_account.php with the pre-edited version supplied in the contribution, using a good file difference tool such as BeyondCompare. Quote Steve  Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Ohem Posted April 12, 2007 Share Posted April 12, 2007 Doesn't matter - you have a PHP syntax error somewhere. You'll have to find it and fix it. The blank screen is the symptom when PHP exits before writing any HTML output. If you have PHP error reporting on, you'll see the error message, but otherwise you won't. If your web server has a CGI error log you can examine, the error may be shown there. Assuming that this osc2nuke is a layer on top of normal osC, you could start by comparing create_account.php with the pre-edited version supplied in the contribution, using a good file difference tool such as BeyondCompare.  Alright i made it work......partially at least, got some problems (as expected). The drop-down/text field is placed at the wrong place, up in the left corner instead being in the form and i just fail to find the html/table tags for the whole form. Also, the page/site doesn't refresh when a country is selected even though i followed the instructions, the refresh code entry should be in another file?  Here's a picture of it in action:  ( Note: I'm still using osc2nuke )  Quote Link to comment Share on other sites More sharing options...
stevel Posted April 12, 2007 Author Share Posted April 12, 2007 The bad placement indicates a problem with table (or tr/td) tags. When I have a problem like this I add text tags in various places of the page and then view the HTML source of the rendered page to see what came from where. Opening the page source in an HTML editor or even the source view of Firefox can highlight HTML errors.  Also look at the rendered HTML to see if the refresh function is present and check for JavaScript errors that would prevent it from being run. (Firefox's error console is what I look at.) Quote Steve  Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
ianric Posted April 18, 2007 Share Posted April 18, 2007 The bad placement indicates a problem with table (or tr/td) tags. When I have a problem like this I add text tags in various places of the page and then view the HTML source of the rendered page to see what came from where. Opening the page source in an HTML editor or even the source view of Firefox can highlight HTML errors. Also look at the rendered HTML to see if the refresh function is present and check for JavaScript errors that would prevent it from being run. (Firefox's error console is what I look at.)  Hi  I am trying to integrate this with FEC and having probs with the FEC create_account2.php file. That file shows 2 address forms side by side. I have got the drop downs populated but when I select from the list, the page doesn't refresh and I get the yellow triangle, bottom left, saying "line 309 char 4 action is null or not an object".  I have managed to fix other probs so if someone could point me in the right direction it would be appreciated.  Many thanks  Ian Quote Link to comment Share on other sites More sharing options...
jderouen Posted April 18, 2007 Share Posted April 18, 2007 I love the contribution and have been using it for quite a while, but... I think it (or, more likely, a mistake I made installing it) may have broken the ability for customers to edit their addresses or to add new addresses.  When someone clicks edit, add, or delete, they just get a blank screen.  It calls this:  https://secure.nameservers.com/megostore.co...c43e321218ed87e  And just shows a blank web page.  Can anyone help?  Thanks, Joe DeRouen Quote Link to comment Share on other sites More sharing options...
stevel Posted April 19, 2007 Author Share Posted April 19, 2007 Ian,  View the web page in a browser and see what is at line 309. Any JavaScript errors will prevent the page from refreshing.  Joe, you have introduced a PHP syntax error. Examine your CGI error logs, if the server has them, or turn on PHP error reporting to see what it is. Quote Steve  Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
ianric Posted April 19, 2007 Share Posted April 19, 2007 Ian, View the web page in a browser and see what is at line 309. Any JavaScript errors will prevent the page from refreshing.  Joe, you have introduced a PHP syntax error. Examine your CGI error logs, if the server has them, or turn on PHP error reporting to see what it is. Hi Stevel  Thanks for the reply. I've redone the coding part and experimented. The form in the FEC contrib is split in half. the left half is for the billing addy and the right is for the shipping addy. This column also has a checkbox to copy the billing info to the shipping info.  if I change the country drop down on the billing side first I get the error at 309  <script type="text/javascript"> function refresh_form(form_name) { form_name.action.value = 'refresh'; //this is 309 form_name.submit(); return true; } </script>  If I start from name going down all is OK, the states don't refresh by country at this stage, I pick the checkbox to copy the info to the shipping side and ALL the data apart from state is transfered. I get an error here at line 286 state.value is null or not an object  function ShipToBillPerson(form) { if (form.copy.checked) { InitSaveVariables(form); form.ShipFirstName.value = form.firstname.value; form.ShipLastName.value = form.lastname.value; form.shipcountry.value = form.country.value; //form.shipcompany.value = form.company.value; form.ShipAddress.value = form.street_address.value; form.shipsuburb.value = form.suburb.value; form.ShipCity.value = form.City.value; form.shippostcode.value = form.postcode.value; form.shippingstate.value = form.state.value; //this is line 286 //form.ShipState.selectedIndex = form.state.selectedIndex; //form.ShipConfirm.checked = form.BillConfirm.checked; } else {  Hope this makes sense and is easy to follow.  Cheers  Ian Quote Link to comment Share on other sites More sharing options...
jderouen Posted April 19, 2007 Share Posted April 19, 2007 As the risk of sounding stupid, how do I turn on PHP Error Reporting? Quote Link to comment Share on other sites More sharing options...
stevel Posted April 19, 2007 Author Share Posted April 19, 2007 Ian,  Can you give me a URL to look at for myself?  Joe,  This is typically done by creating a text file called php.ini in your store directory with the following two lines: error_reporting = E_ALL display_errors = On  See http://www.phpfreaks.com/tutorials/72/0.php for more information on php.ini files. When you are done debugging, remove the file.  You could also see if your web host provides a "CGI error log" that records such errors. Some do. Quote Steve  Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
ianric Posted April 20, 2007 Share Posted April 20, 2007 Ian, Can you give me a URL to look at for myself?  Joe,  This is typically done by creating a text file called php.ini in your store directory with the following two lines: error_reporting = E_ALL display_errors = On  See http://www.phpfreaks.com/tutorials/72/0.php for more information on php.ini files. When you are done debugging, remove the file.  You could also see if your web host provides a "CGI error log" that records such errors. Some do.  Stevel  here is the url www.icr-records.co.uk Add an item to the cart and pick checkout. The FEC "problem" page kicks in then.  Cheers  Ian Quote Link to comment Share on other sites More sharing options...
ianric Posted April 20, 2007 Share Posted April 20, 2007 Stevel here is the url www.icr-records.co.uk Add an item to the cart and pick checkout. The FEC "problem" page kicks in then.  Cheers  Ian Oops! That should be www.icr-records.co.uk/oscommerce  Cheers  Ian :blush: Quote Link to comment Share on other sites More sharing options...
stevel Posted April 20, 2007 Author Share Posted April 20, 2007 Ian,  I see a couple of problems. First, on the left column select tag for country, you have  onChange="return refresh_form(createaccount);"  However, the name of the form on that page is not createaccount, it is checkout.  Second, the field for the shipping country does not include the onChange action. That needs to be added.  A third problem, unrelated to this, is that your img tag for the "visual verifier" is malformed, missing the closing bracket.  I can't see your PHP code so you need to make sure that it properly establishes the country for both fields on a refresh. Quote Steve  Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
jderouen Posted April 20, 2007 Share Posted April 20, 2007 Okay, I created the php.ini w/ the lines you said and put it into the store directory, but nothing had changed. address_book_process.php still just comes up with a blank page, and no error messages show up. Am I doing something wrong? Quote Link to comment Share on other sites More sharing options...
SweetiesDirect Posted April 20, 2007 Share Posted April 20, 2007 I installed this yesterday and thought I had been successful. (Ie. the state selector worked as expected) Â However, when doing some testing earlier today, I found that the address book function seems to have messed up. Whenever I try to edit an address, or add a new one, I get; Â Parse error: syntax error, unexpected $end in /home/sweeties/public_html/address_book_process.php on line 427 Â HELP! :blink: Â Can anybody advise what is causing the problem? (Initially the error was an unexpected } at line 120, which I removed, then this error took it's place) Â Thanks, Quote Link to comment Share on other sites More sharing options...
ianric Posted April 23, 2007 Share Posted April 23, 2007 Oops! That should be www.icr-records.co.uk/oscommerce Cheers  Ian :blush:  Hi Stevel  Thanks for looking. I'll have a look tomorrow.  Many thanks  Ian Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.