Whenever I try to add or change something in the fusion core template I get this message and I didn't touch line 85.

I would like to add $vars['fusion_uc_display_price'] = drupal_render($node->content['model']); to the template. It is listed in product.tpl but not in the template so it shows under product-additional instead.
This is what's in product.tpl

<div id="product-details" class="clear">
          <div id="field-group">
            <?php print $fusion_uc_weight; ?>
            <?php print $fusion_uc_dimensions; ?>
            <?php print $fusion_uc_model; ?>
            <?php print $fusion_uc_list_price; ?>
            <?php print $fusion_uc_sell_price; ?>
            <?php print $fusion_uc_cost; ?>
          </div>

Also this if ($vars['fusion_uc_list_price'] == '') only checks if list-price is empty. I would like it to check if list-price is less than or equal to sell-price. When I made the change, I also got the error above. How do can I fix this? Thanks.

Comments

sheena_d’s picture

fehin,

Are you saying you made changes to template.php?

Without being able to see your code, I can't really troubleshoot it, but more than likely you left out a semi colon somewhere or you began a string with single quotes and ended with double quotes, etc. If you're getting that error on line 85 then the problem might actually be on line 84. Look over your code carefully and make sure there are no errors like that.

If the error persists, feel free to post your code and we can take a look.

Thanks,
Sheena

fehin’s picture

Yes I made changes to template.php but all I added was $vars['fusion_uc_display_price'] = drupal_render($node->content['model']); after $vars['fusion_uc_body'] = drupal_render($node->content['body']); on line 164. I didn't touch line 85.

This is what is on line 85:
$vars['primary_links_tree'] ']= theme('links', $vars['primary_links'], array('class' '=> 'menu'));

I noticed there is an additional '] on line 85 but this was already there and it doesn't generate an error until I try to add a line of my own on different line.

sociotech’s picture

fehin,

If you look at your original template.php file (or download 6.x-1.0-rc1 again and look at its template.php file) you should see that the addition quote and bracket are not present in line 85. You or someone else must have added them accidentally at some time while editing the file.

Please replace that line in your template.php with the correct line from the unedited template.php file and try again.

fehin’s picture

I didn't touch the original, I was working on a copy. I just downloaded the theme again and line 85 in template.php in fusion core still looks like this $vars['primary_links_tree'] ']= theme('links', $vars['primary_links'], array('class' '=> 'menu'));

I already found a solution though. I add the if statement in my product.tpl.php instead. Thanks.

sociotech’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nilanja1987’s picture

Title: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /sites/all/themes/fusion/fusion_core/template.php on line 85 » Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\server\www\myserver.dev\public_html\rgfvalid.php on line

I'm trying to make a registration form for my project. To create the registration form I use the following code inside "rgform.php:

<html>
<body>
<form method="post" action="rgfvalid.php">
<table>

<tr><td>Username:</td><td><input type=text
input name="user" value=""></td></tr>

<tr><td>Email:</td><td><input type=text
input name="email" value=""></td></tr>

<tr><td>Pass:</td><td><input type=password
input name="pass" value=""></td></tr>

<tr><td>Verify Pass:</td><td><input type=password
name=vpass></td></tr>

<tr><td colspan=2 align=center><input type=submit
value=Register></td></tr>

</table>

</form>
</body>
</html>

For validation & collect data in mysql database use the following code inside "rgfvalid.php"

<html>
<body>
<?php
$user= $_POST["user"];
$email= $_POST["email"];
$pass= $_POST["pass"];
$vpass= $_POST["vpass"];
$con= mysql_connect("localhost","root","joy87");
if(!$con)
{
   die('could not connect:' .mysql_error());
}
mysql_select_db("test");
if (!$user || !$email || !$pass || !$vpass)
{
   print "You must fill all fields.";
  }
$dupe1= mysql_num_rows(mysql_query("select * from table where user='$user' "));
if ($dupe1 > 0)
  {
    print "Someone already has that username.";
   }
$dupe2 = mysql_num_rows(mysql_query("select * from table where email='$email' "));
if ($dupe2 > 0)
   {
     print "Someone already has that email";
    }
if ($pass != $vpass)
   {
     paint "The password do not match";
    }
mysql_query("insert into table (user, email, pass) values('$user','$email','$pass')");
print "You are now register";
?>
</body>
</html>

When I enter "http://localhost/rgform.php" it works fine. But when submit all the field and click to "submit" it shows the following error
"Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\server\www\myserver.dev\public_html\rgfvalid.php on line 30"

Please help me as soon as possible...

sheena_d’s picture

nilanja1987,

This has absolutely nothing to do with the Fusion theme and you should absolutely never make forms this way for a Drupal site.

aquariumtap’s picture

paint "The password do not match" should be print, but Sheena is right, you should not be writing code like this within Drupal and it has nothing to do with Fusion.