Jump to content
Sign in to follow this  
eist1

Error on Tax Exempt Contribution

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×