Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error on Tax Exempt Contribution


eist1

Recommended Posts

Could someone let me know if they know what the problem is with the Tax Exempt Contrib. I was getting a [/b] Parse error: parse error, unexpected $end in c:\inetpub\wwwroot\catalog3\create_account.php on line 608 (which there are only 607 lines, 608 is a blank line underneath, but no matter how many line you add, it is always the the last blank line) when installing it on my store, so I tried a fresh of OSC with nothing on it, and copied the contrib files into the appropriate folders, and still got the same error. (actually after fixing this file Parse error: parse error, unexpected ',' in c:\inetpub\wwwroot\catalog3\includes\classes\shopping_cart.php on line 372) Change the line from this:

'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : '')),

 

to this

 

'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : ''),

 

Taking one ) out.

 

But after getting it up and running, I try to create an account, and I get this error [/b] Parse error: parse error, unexpected $end in c:\inetpub\wwwroot\catalog3\create_account.php on line 608

 

If someone want to try it out, the contrib is located at http://www.oscommerce.com/community/contri...arch,tax+exempt

 

Please let me know if there is another solution for Tax Exempt

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

I'm trying to fix the exact same problem, I've narrowed the parsing error down to somewhere in this section of create_account.php...

 

<?php // BEGIN - Tax Exempt and Organization Discounts ?>
             <tr>
               <td class="main"><?php echo ENTRY_TAX_EXEMPT; ?></td>
              <td class="main">
<?php
   if ($account['customers_tax_exempt'] == '1') {
     echo ENTRY_TAX_EXEMPT_YES;
   } else {
     echo ENTRY_TAX_EXEMPT_NO;
   }
   if ($process == true) {
  echo tep_draw_hidden_field('tax_exempt');  
 }
?></td>
         </tr>
         <tr>
           <td class="main"> <?php echo ENTRY_TAX_EXEMPT_ID; ?></td>
           <td class="main"> 
<?php
   if ($process == true) {
     echo $tax_exempt_id . tep_draw_hidden_field('tax_exempt_id');
   } else {
     echo tep_draw_input_field('tax_exempt_id', $account['customers_tax_exempt_id']) . ' ' . ENTRY_TAX_EXEMPT_ID_TEXT;
   }
?>
             </tr>

             <tr>
               <td class="main"><?php echo ENTRY_ORG_TYPE; ?></td>
               <td class="main">
<?php
   if ($process == true) {
$organization_query = tep_db_query("select org_type_title, org_type_id from " . TABLE_ORGANIZATION_TYPE . " where org_type_id = " . $organization_type);
$organization_row = tep_db_fetch_array($organization_query);
echo $organization_row['org_type_title'];
       echo tep_draw_hidden_field('organization_type');    
   } else {
     $organization_array = array();
     $organization_query = tep_db_query("select org_type_title, org_type_id from " . TABLE_ORGANIZATION_TYPE . " order by org_type_title asc");
     while ($organization_values = tep_db_fetch_array($organization_query)) {
       $organization_array[] = array('id' => $organization_values['org_type_id'], 'text' => $organization_values['org_type_title']);
    }
?>

 

There's also a problem in account_edit.php that I have yet to delve into.

Link to comment
Share on other sites

  • 6 months later...

I have found quite a few errors with this contribution, including this one. I'm wondering if it was due to my installation or database creation. Did anyone figure it out?

Link to comment
Share on other sites

  • 3 months later...

I found some errors. This one was quite interesting...Look at the last section of code you added. The while loop needs an end bracket, the bracket is for the conditinal.

while ($organization_values = tep_db_fetch_array($organization_query)) {
      $organization_array[] = array('id' => $organization_values['org_type_id'], 'text' => $organization_values['org_type_title']);
[color="red"]} [/color]  
}

Edited by mmkangas
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...